简体   繁体   中英

Is there a way to detect if the certificate is invalid on the client side?

I am the owner of a website on an intranet and I want to reject users with invalid certificate, (for instance if a user X does not have the dedicated certificate installed on his machine he will not be allowed to access my website) :

在此处输入图片说明

Is there a way to detect ( with javascript ) if the certificate is invalid on the client side ?

What you are trying to do is fundamentally incorrect. The certificate is requested from the client to the server and the server sends its public key. A session key is then created on the client side to setup the asymm encryption.

The certificate on the web server must be signed by a trusted CA (this can be added to the client side as well). Basically the client has no control over which certificate it uses, the server will determine that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM