Clear ssl client certificate state from javascript

2019-03-19 08:09发布

问题:

I'm looking for a way to clear the SSL client certificate cache in Firefox as a kind of "log out" functionality so that the server does not recognize me anymore via the client certificate the next time I connect to it. The solution from clear-ssl-client-certificate-state-from-javascript

 if (window.crypto) window.crypto.logout();

does not work anymore in the current version of Firefox.

With firefox 33.0.2 the Proprietary window.crypto properties/functions are removed

How can I do this in the current Firefox version?

回答1:

You can enable window.crypto by setting

dom.webcrypto.enabled = true

in about:config.

However there is no out of box replacement for FF 33.
It seems like Mozilla rolled it back in FF34, so it should be available there again.

EDIT: There is an replacement: http://www.w3.org/TR/WebCryptoAPI/



回答2:

There is not an official solution for FF & Chrome. for a unofficial solution see: Web Crypto API — An Authentication of Data and People in SSL