简体   繁体   中英

Digital Certificate Issue

Ok, let me explain my situation. I want to simulate communication between a client and a server.

I created a self-signed certificate called "TestCA" and installed it in the Trusted Certification Root Authorities section.

Using this self-signed certificate, I created two other certificates, one with name "ServerCert" and subject "CN=localhost:2001" and the other with name "ClientCert" and subject name "CN=www.client.com" and installed both in the Personal section of the certificates folder.

I deployed a web service in IIS as HTTPS using the certificate with subject name ["CN=localhost:2001"]. The web service was deployed on [localhost] and port 2001. Now, when I try to browse to the web service, internet explorer gives me this error:

The security certificate presented by this website was issued for a different website's address.

Security certificate problems may indicate an attempt to fool you or intercept any data you send to the server.

I don't know why it is giving me this error since the subject name of the certificate is ["CN=localhost:2001"] and the web address of the website being browsed is [https://localhost:2001/].

How can I solve this problem so that IE does not display this error?

The port number is not relevant when you create a certificate. Please create certificate for localhost with the subject name localhost (not CN=localhost , but localhost ). You will be able to access to localhost without warnings. Also, for www.client.com please create certificate with the subject name client.com (not CN=www.client.com )

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