Bug 484111: Must escape all DER DNS names when converting to zStrings.

r=Julien.pierre


git-svn-id: svn://10.0.0.236/trunk@256621 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
nelson%bolyard.com 2009-03-23 02:18:19 +00:00
parent 3cbecd7e62
commit 1f7c868bde

View File

@ -39,7 +39,7 @@
/*
* Certificate handling code
*
* $Id: certdb.c,v 1.99 2009-03-20 18:03:57 nelson%bolyard.com Exp $
* $Id: certdb.c,v 1.100 2009-03-23 02:18:19 nelson%bolyard.com Exp $
*/
#include "nssilock.h"
@ -1554,7 +1554,7 @@ cert_VerifySubjectAltName(CERTCertificate *cert, const char *hn)
int cnLen = current->name.other.len;
rv = CERT_RFC1485_EscapeAndQuote(cn, cnBufLen,
current->name.other.data, cnLen);
if (rv != SECSuccess && PORT_GetError == SEC_ERROR_OUTPUT_LEN) {
if (rv != SECSuccess && PORT_GetError() == SEC_ERROR_OUTPUT_LEN) {
cnBufLen = cnLen * 3 + 3; /* big enough for worst case */
cn = (char *)PORT_ArenaAlloc(arena, cnBufLen);
if (!cn)