Fix code to work when subjectAltName extension not present in server cert.
Bug 103752. git-svn-id: svn://10.0.0.236/trunk@126091 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
/*
|
||||
* Certificate handling code
|
||||
*
|
||||
* $Id: certdb.c,v 1.34 2002-07-30 19:32:33 nelsonb%netscape.com Exp $
|
||||
* $Id: certdb.c,v 1.35 2002-07-30 23:15:43 nelsonb%netscape.com Exp $
|
||||
*/
|
||||
|
||||
#include "nssilock.h"
|
||||
@@ -1313,9 +1313,11 @@ cert_VerifySubjectAltName(CERTCertificate *cert, const char *hn)
|
||||
|
||||
rv = CERT_FindCertExtension(cert, SEC_OID_X509_SUBJECT_ALT_NAME,
|
||||
&subAltName);
|
||||
if (rv != SECSuccess)
|
||||
if (rv != SECSuccess) {
|
||||
if (PORT_GetError() == SEC_ERROR_EXTENSION_NOT_FOUND)
|
||||
PORT_SetError(SSL_ERROR_BAD_CERT_DOMAIN);
|
||||
goto finish;
|
||||
|
||||
}
|
||||
rv = SECFailure;
|
||||
arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
|
||||
if (!arena)
|
||||
|
||||
Reference in New Issue
Block a user