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

Side by Side Diff: nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.c

Issue 16132005: Allow NSS to be built with NO_NSPR_10_SUPPORT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Created 7 years, 6 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
« no previous file with comments | « nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.h ('k') | nss/lib/nss/utilwrap.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* This Source Code Form is subject to the terms of the Mozilla Public 1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 /* 4 /*
5 * pkix_pl_x500name.c 5 * pkix_pl_x500name.c
6 * 6 *
7 * X500Name Object Functions 7 * X500Name Object Functions
8 * 8 *
9 */ 9 */
10 10
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 * Returns an X500NAME Error if the function fails in a non-fatal way. 285 * Returns an X500NAME Error if the function fails in a non-fatal way.
286 * Returns a Fatal Error if the function fails in an unrecoverable way. 286 * Returns a Fatal Error if the function fails in an unrecoverable way.
287 */ 287 */
288 PKIX_Error * 288 PKIX_Error *
289 pkix_pl_X500Name_CreateFromUtf8( 289 pkix_pl_X500Name_CreateFromUtf8(
290 char *stringRep, 290 char *stringRep,
291 PKIX_PL_X500Name **pName, 291 PKIX_PL_X500Name **pName,
292 void *plContext) 292 void *plContext)
293 { 293 {
294 PKIX_PL_X500Name *x500Name = NULL; 294 PKIX_PL_X500Name *x500Name = NULL;
295 PRArenaPool *arena = NULL; 295 PLArenaPool *arena = NULL;
296 CERTName *nssDN = NULL; 296 CERTName *nssDN = NULL;
297 SECItem *resultSecItem = NULL; 297 SECItem *resultSecItem = NULL;
298 298
299 PKIX_ENTER(X500NAME, "pkix_pl_X500Name_CreateFromUtf8"); 299 PKIX_ENTER(X500NAME, "pkix_pl_X500Name_CreateFromUtf8");
300 PKIX_NULLCHECK_TWO(pName, stringRep); 300 PKIX_NULLCHECK_TWO(pName, stringRep);
301 301
302 nssDN = CERT_AsciiToName(stringRep); 302 nssDN = CERT_AsciiToName(stringRep);
303 if (nssDN == NULL) { 303 if (nssDN == NULL) {
304 PKIX_ERROR(PKIX_COULDNOTCREATENSSDN); 304 PKIX_ERROR(PKIX_COULDNOTCREATENSSDN);
305 } 305 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 * FUNCTION: PKIX_PL_X500Name_CreateFromCERTName (see comments in pkix_pl_pki.h) 389 * FUNCTION: PKIX_PL_X500Name_CreateFromCERTName (see comments in pkix_pl_pki.h)
390 */ 390 */
391 391
392 PKIX_Error * 392 PKIX_Error *
393 PKIX_PL_X500Name_CreateFromCERTName( 393 PKIX_PL_X500Name_CreateFromCERTName(
394 SECItem *derName, 394 SECItem *derName,
395 CERTName *name, 395 CERTName *name,
396 PKIX_PL_X500Name **pName, 396 PKIX_PL_X500Name **pName,
397 void *plContext) 397 void *plContext)
398 { 398 {
399 PRArenaPool *arena = NULL; 399 PLArenaPool *arena = NULL;
400 SECStatus rv = SECFailure; 400 SECStatus rv = SECFailure;
401 PKIX_PL_X500Name *x500Name = NULL; 401 PKIX_PL_X500Name *x500Name = NULL;
402 402
403 PKIX_ENTER(X500NAME, "PKIX_PL_X500Name_CreateFromCERTName"); 403 PKIX_ENTER(X500NAME, "PKIX_PL_X500Name_CreateFromCERTName");
404 PKIX_NULLCHECK_ONE(pName); 404 PKIX_NULLCHECK_ONE(pName);
405 if (derName == NULL && name == NULL) { 405 if (derName == NULL && name == NULL) {
406 PKIX_ERROR(PKIX_NULLARGUMENT); 406 PKIX_ERROR(PKIX_NULLARGUMENT);
407 } 407 }
408 408
409 arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); 409 arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 * 550 *
551 * DESCRIPTION: 551 * DESCRIPTION:
552 * Returns a copy of CERTName DER representation allocated on passed in arena. 552 * Returns a copy of CERTName DER representation allocated on passed in arena.
553 * If allocation on arena can not be done, NULL is stored at "pSECName". 553 * If allocation on arena can not be done, NULL is stored at "pSECName".
554 * 554 *
555 * PARAMETERS: 555 * PARAMETERS:
556 * "xname" 556 * "xname"
557 * Address of X500Name whose CERTName flag is to be encoded. Must be 557 * Address of X500Name whose CERTName flag is to be encoded. Must be
558 * non-NULL. 558 * non-NULL.
559 * "arena" 559 * "arena"
560 * Address of the PRArenaPool to be used in the encoding, and in which 560 * Address of the PLArenaPool to be used in the encoding, and in which
561 * "pSECName" will be allocated. Must be non-NULL. 561 * "pSECName" will be allocated. Must be non-NULL.
562 * "pSECName" 562 * "pSECName"
563 * Address where result will be stored. Must be non-NULL. 563 * Address where result will be stored. Must be non-NULL.
564 * "plContext" 564 * "plContext"
565 * Platform-specific context pointer. 565 * Platform-specific context pointer.
566 * 566 *
567 * THREAD SAFETY: 567 * THREAD SAFETY:
568 * Thread Safe (see Thread Safety Definitions in Programmer's Guide) 568 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
569 * 569 *
570 * RETURNS: 570 * RETURNS:
571 * Returns NULL if the function succeeds. 571 * Returns NULL if the function succeeds.
572 * Returns a Fatal Error if the function fails in an unrecoverable way. 572 * Returns a Fatal Error if the function fails in an unrecoverable way.
573 */ 573 */
574 PKIX_Error * 574 PKIX_Error *
575 pkix_pl_X500Name_GetDERName( 575 pkix_pl_X500Name_GetDERName(
576 PKIX_PL_X500Name *xname, 576 PKIX_PL_X500Name *xname,
577 PRArenaPool *arena, 577 PLArenaPool *arena,
578 SECItem **pDERName, 578 SECItem **pDERName,
579 void *plContext) 579 void *plContext)
580 { 580 {
581 SECItem *derName = NULL; 581 SECItem *derName = NULL;
582 582
583 PKIX_ENTER(X500NAME, "pkix_pl_X500Name_GetDERName"); 583 PKIX_ENTER(X500NAME, "pkix_pl_X500Name_GetDERName");
584 584
585 PKIX_NULLCHECK_THREE(xname, arena, pDERName); 585 PKIX_NULLCHECK_THREE(xname, arena, pDERName);
586 586
587 /* Return NULL is X500Name was not created from DER */ 587 /* Return NULL is X500Name was not created from DER */
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 unsigned char **pOrgName, 713 unsigned char **pOrgName,
714 void *plContext) 714 void *plContext)
715 { 715 {
716 PKIX_ENTER(X500NAME, "pkix_pl_X500Name_GetOrgName"); 716 PKIX_ENTER(X500NAME, "pkix_pl_X500Name_GetOrgName");
717 PKIX_NULLCHECK_TWO(xname, pOrgName); 717 PKIX_NULLCHECK_TWO(xname, pOrgName);
718 718
719 *pOrgName = (unsigned char*)CERT_GetOrgName(&xname->nssDN); 719 *pOrgName = (unsigned char*)CERT_GetOrgName(&xname->nssDN);
720 720
721 PKIX_RETURN(X500NAME); 721 PKIX_RETURN(X500NAME);
722 } 722 }
OLDNEW
« no previous file with comments | « nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.h ('k') | nss/lib/nss/utilwrap.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698