How to get Certificate List using JavaScript or jQuery?

99封情书 提交于 2019-12-07 07:49:23

问题


We are using Applet previously to get Key Store Certificates installed in client's machine. Now as chrome stops NPAPI, Applet is not working now, so finding some solution using Javascript / jQuery.

I am trying to get the total Certificate List for installs in KeyStore, but I can't find any solutions. Does any one know how to get the full Certificate List using JavaScript or jQuery?


回答1:


You cannot do that with JavaScript running in the client.

See the following entry of the WebCrypto mailing list:

On Wed, Jun 24, 2015 at 1:50 PM, Jeffrey Walton wrote:

I see the WebCrypto API will allow discovery of keys (http://www.w3.org/TR/WebCryptoAPI/):

In addition to operations such as signature generation and verification, hashing and verification, and encryption and decryption, the API provides interfaces for key generation, key derivation, key import and export, and key discovery.

Certificates have public keys, and they are not as sensitive as private keys.

Will the WebCrypto API allow discovery/enumeration of certificates?

Examples of what I would like to discover or enumerate (in addition to the private keys):

  • Trusted roots
  • Client certs

Trusted Roots are in the platform's trust store. Client certs may be in the trust store.

Thanks in advance, Jeff

There are no plans from Chrome to implement such, on the hopefully obvious and significant privacy grounds.

Client certs contain PII. Trusted certs contain PII and fingerprinting.

In modern, sandboxed operating systems, such as iOS and Android, applications cannot enumerate either, as those platform providers reached the same conclusion.

So no. Never.1

1 For some really long value of never




回答2:


Get clone of below link https://github.com/scketches/ffPrintCert

install the jpm

npm install jpm --global

Create build for mozilla

jpm xpi 

Upload extension in mozilla locally and check Fire below url in mozilla

about:debugging

Load .xpi file from locally and check.



来源:https://stackoverflow.com/questions/40424927/how-to-get-certificate-list-using-javascript-or-jquery

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!