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
I suggest you look at the following bugs, *and their dependents*, first:
http://bugzilla.mozilla.org/show_bug.cgi?id=210584 http://bugzilla.mozilla.org/show_bug.cgi?id=210709
IMO, your best bet is to write he function I described before that compares ASCII names ignoring whitespace.
-- Nelson B
_______________________________________________ mozilla-crypto mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-crypto
