Nelson,

Thanks.  

I decided to use CERT_AsciiToName() and CERT_CompareName() to do this.
So the code looks something like:

CERTCertificate *cert;
CERTName *expectedName;
SECComparison compResult;
char *myDNString = "CN=joetester,OU=Testing,O=testCorp,C=US";

cert = PK11_FindCertFromNickname( "myCert" ); /* Get the cert */
expectedName = CERT_AsciiToName( myDNstring) /* Convert my fixed DN
string */
compResult = CERT_CompareName( &cert->subject, expectedName );
if ( compResult == SECEqual ) {
  printf( "Cert subject matches myDNstring\n" );
}

Whatchya think?

-- POC
_______________________________________________
mozilla-crypto mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-crypto

Reply via email to