1

How to sign a string with a certificate's private key from the browser ? I need to sign the string in the web, using de ceftificate instaled in the browser .

Can I use Web Cryptography API in this user case ?

Thanks in advance

  • What kind of certificate? TLS? That's not a signing key. Most of the keys in your trusted store are not meant for signing arbitrary strings. If you insist on it, you will need access to the private key. – mnistic Mar 21 '19 at 20:54
  • This is what i need.... acces to the private key or the browser do it for me and sign a data – user1501298 Mar 21 '19 at 22:16
  • 1
    The browser keystore is not accesible from javascript due to security restrictions. See https://stackoverflow.com/a/50208561/6371459 – pedrofb Mar 22 '19 at 06:21
  • Thanks @pedrofb I have fount this API: WebCrypto Key Discovery: http://www.w3.org/TR/webcrypto-key-discovery/. But i think there is no implementation for this API in any browser. – user1501298 Mar 22 '19 at 09:45
  • No, that API does not even have a final specification – pedrofb Mar 22 '19 at 10:44
  • So If i want to use the client certificate instaled in the browser for indentify and authenticate my client should I use a Handshake TSL/SSL protocol?? Where the server ask to the browser for the client certificate instaled in the keystore and the client select the right certificate, but How it is works? the browser use the private key of the client for sign something? I dont want to secure the conexion I want to indentify and authenticate my client. Thanks a million @pedrofb – user1501298 Mar 22 '19 at 11:29
  • _So If i want to use the client certificate instaled in the browser for indentify and authenticate my client should I use a Handshake TSL/SSL protocol??_ -->Yes, you need to configure two ways SSL authentication. _How it is works?_ ->See [this](https://stackoverflow.com/a/40883306/6371459). _I dont want to secure the conexion I want to indentify and authenticate my client._ -->You can authenticate the user using the SSL client certificate during login process and then grant access to your web – pedrofb Mar 22 '19 at 12:02
  • You may have to use any of the available Browser Extension to achieve this. Please refer https://stackoverflow.com/a/55757349/9659885 – Bharat Vasant May 24 '19 at 00:32

0 Answers0