Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(613)

Side by Side Diff: nss/mozilla/security/nss/lib/certdb/alg1485.c

Issue 3135002: Update to NSS 3.12.7 and NSPR 4.8.6.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* alg1485.c - implementation of RFCs 1485, 1779 and 2253. 1 /* alg1485.c - implementation of RFCs 1485, 1779 and 2253.
2 * 2 *
3 * ***** BEGIN LICENSE BLOCK ***** 3 * ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * 5 *
6 * The contents of this file are subject to the Mozilla Public License Version 6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with 7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at 8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/ 9 * http://www.mozilla.org/MPL/
10 * 10 *
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 return SECSuccess; 594 return SECSuccess;
595 } 595 }
596 596
597 typedef enum { 597 typedef enum {
598 minimalEscape = 0, /* only hex escapes, and " and \ */ 598 minimalEscape = 0, /* only hex escapes, and " and \ */
599 minimalEscapeAndQuote, /* as above, plus quoting */ 599 minimalEscapeAndQuote, /* as above, plus quoting */
600 fullEscape /* no quoting, full escaping */ 600 fullEscape /* no quoting, full escaping */
601 } EQMode; 601 } EQMode;
602 602
603 /* Some characters must be escaped as a hex string, e.g. c -> \nn . 603 /* Some characters must be escaped as a hex string, e.g. c -> \nn .
604 * Others must be escaped by preceeding with a '\', e.g. c -> \c , but 604 * Others must be escaped by preceding with a '\', e.g. c -> \c , but
605 * there are certain "special characters" that may be handled by either 605 * there are certain "special characters" that may be handled by either
606 * escaping them, or by enclosing the entire attribute value in quotes. 606 * escaping them, or by enclosing the entire attribute value in quotes.
607 * A NULL value for pEQMode implies selecting minimalEscape mode. 607 * A NULL value for pEQMode implies selecting minimalEscape mode.
608 * Some callers will do quoting when needed, others will not. 608 * Some callers will do quoting when needed, others will not.
609 * If a caller selects minimalEscapeAndQuote, and the string does not 609 * If a caller selects minimalEscapeAndQuote, and the string does not
610 * need quoting, then this function changes it to minimalEscape. 610 * need quoting, then this function changes it to minimalEscape.
611 */ 611 */
612 static int 612 static int
613 cert_RFC1485_GetRequiredLen(const char *src, int srclen, EQMode *pEQMode) 613 cert_RFC1485_GetRequiredLen(const char *src, int srclen, EQMode *pEQMode)
614 { 614 {
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 { 1569 {
1570 return(CERT_GetNameElement(NULL, name, SEC_OID_AVA_DN_QUALIFIER)); 1570 return(CERT_GetNameElement(NULL, name, SEC_OID_AVA_DN_QUALIFIER));
1571 } 1571 }
1572 1572
1573 char * 1573 char *
1574 CERT_GetCertUid(CERTName *name) 1574 CERT_GetCertUid(CERTName *name)
1575 { 1575 {
1576 return(CERT_GetNameElement(NULL, name, SEC_OID_RFC1274_UID)); 1576 return(CERT_GetNameElement(NULL, name, SEC_OID_RFC1274_UID));
1577 } 1577 }
1578 1578
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698