views:

97

answers:

1

WARNNING: Total certificate newbie

I have a certificate that is used for server authentication and I want to check if that certificate is validate for the url that the server is publish on.

for example: if the certificate is for *.myserver.com then any url that its host part ends with myserver.com is valid.

What I would like is something like this:

bool IsValid(string certificateHash, string url)

Is there any sample or api that will give me that?

I'm working on Windows and I have to use the Windows API.

P.S. I'm not interested in checking the validity of the issuer, time stemps, etc, only the Certification Path (Not sure I'm using the right term here).

A: 

The CN of a certificate says for which Domain the Certificate is valid. It may help you to view a SSL-Certificate in Firefox/IE to guess which field means what. (For example connect to https://cacert.org)

And I thought that a certificate can only match a FQDN (Full Qualified Domain Name) - no wildcards.

cimnine
AFAIK wildcard are supported
Shay Erlichmen
You're right. http://wiki.cacert.org/WildcardCertificates
cimnine