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

Side by Side Diff: nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.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
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_infoaccess.c 5 * pkix_pl_infoaccess.c
6 * 6 *
7 * InfoAccess Object Definitions 7 * InfoAccess Object Definitions
8 * 8 *
9 */ 9 */
10 10
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 * DESCRIPTION: 504 * DESCRIPTION:
505 * 505 *
506 * This function parses the string beginning at "startPos" into tokens using 506 * This function parses the string beginning at "startPos" into tokens using
507 * the separator contained in "separator" and the terminator contained in 507 * the separator contained in "separator" and the terminator contained in
508 * "terminator", copying the tokens into space allocated from the arena 508 * "terminator", copying the tokens into space allocated from the arena
509 * pointed to by "arena". It stores in "tokens" a null-terminated array of 509 * pointed to by "arena". It stores in "tokens" a null-terminated array of
510 * pointers to those tokens. 510 * pointers to those tokens.
511 * 511 *
512 * PARAMETERS 512 * PARAMETERS
513 * "arena" 513 * "arena"
514 * Address of a PRArenaPool to be used in populating the LDAPLocation. 514 * Address of a PLArenaPool to be used in populating the LDAPLocation.
515 * Must be non-NULL. 515 * Must be non-NULL.
516 * "startPos" 516 * "startPos"
517 * The address of char string that contains a subset of ldap location. 517 * The address of char string that contains a subset of ldap location.
518 * "tokens" 518 * "tokens"
519 * The address of an array of char string for storing returned tokens. 519 * The address of an array of char string for storing returned tokens.
520 * Must be non-NULL. 520 * Must be non-NULL.
521 * "separator" 521 * "separator"
522 * The character that is taken as token separator. Must be non-NULL. 522 * The character that is taken as token separator. Must be non-NULL.
523 * "terminator" 523 * "terminator"
524 * The character that is taken as parsing terminator. Must be non-NULL. 524 * The character that is taken as parsing terminator. Must be non-NULL.
525 * "plContext" 525 * "plContext"
526 * Platform-specific context pointer. 526 * Platform-specific context pointer.
527 * THREAD SAFETY: 527 * THREAD SAFETY:
528 * Thread Safe (see Thread Safety Definitions in Programmer's Guide) 528 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
529 * RETURNS: 529 * RETURNS:
530 * Returns NULL if the function succeeds. 530 * Returns NULL if the function succeeds.
531 * Returns an InfoAccess Error if the function fails in a non-fatal way. 531 * Returns an InfoAccess Error if the function fails in a non-fatal way.
532 * Returns a Fatal Error if the function fails in an unrecoverable way. 532 * Returns a Fatal Error if the function fails in an unrecoverable way.
533 */ 533 */
534 static PKIX_Error * 534 static PKIX_Error *
535 pkix_pl_InfoAccess_ParseTokens( 535 pkix_pl_InfoAccess_ParseTokens(
536 PRArenaPool *arena, 536 PLArenaPool *arena,
537 char **startPos, /* return update */ 537 char **startPos, /* return update */
538 char ***tokens, 538 char ***tokens,
539 char separator, 539 char separator,
540 char terminator, 540 char terminator,
541 void *plContext) 541 void *plContext)
542 { 542 {
543 PKIX_UInt32 numFilters = 0; 543 PKIX_UInt32 numFilters = 0;
544 char *endPos = NULL; 544 char *endPos = NULL;
545 char **filterP = NULL; 545 char **filterP = NULL;
546 546
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 } 655 }
656 *dst = *src; /* the terminating null */ 656 *dst = *src; /* the terminating null */
657 } 657 }
658 658
659 /* 659 /*
660 * FUNCTION: pkix_pl_InfoAccess_ParseLocation 660 * FUNCTION: pkix_pl_InfoAccess_ParseLocation
661 * DESCRIPTION: 661 * DESCRIPTION:
662 * 662 *
663 * This function parses the GeneralName pointed to by "generalName" into the 663 * This function parses the GeneralName pointed to by "generalName" into the
664 * fields of the LDAPRequestParams pointed to by "request" and a domainName 664 * fields of the LDAPRequestParams pointed to by "request" and a domainName
665 * pointed to by "pDomainName", using the PRArenaPool pointed to by "arena" to 665 * pointed to by "pDomainName", using the PLArenaPool pointed to by "arena" to
666 * allocate storage for the request components and for the domainName string. 666 * allocate storage for the request components and for the domainName string.
667 * 667 *
668 * The expected GeneralName string should be in the format described by the 668 * The expected GeneralName string should be in the format described by the
669 * following BNF: 669 * following BNF:
670 * 670 *
671 * ldap://<ldap-server-site>/[cn=<cname>][,o=<org>][,c=<country>]? 671 * ldap://<ldap-server-site>/[cn=<cname>][,o=<org>][,c=<country>]?
672 * [caCertificate|crossCertificatPair|certificateRevocationList]; 672 * [caCertificate|crossCertificatPair|certificateRevocationList];
673 * [binary|<other-type>] 673 * [binary|<other-type>]
674 * [[,caCertificate|crossCertificatPair|certificateRevocationList] 674 * [[,caCertificate|crossCertificatPair|certificateRevocationList]
675 * [binary|<other-type>]]* 675 * [binary|<other-type>]]*
676 * 676 *
677 * PARAMETERS 677 * PARAMETERS
678 * "generalName" 678 * "generalName"
679 * Address of the GeneralName whose LDAPLocation is to be parsed. Must be 679 * Address of the GeneralName whose LDAPLocation is to be parsed. Must be
680 * non-NULL. 680 * non-NULL.
681 * "arena" 681 * "arena"
682 * Address of PRArenaPool to be used for the domainName and for components 682 * Address of PLArenaPool to be used for the domainName and for components
683 * of the LDAPRequest. Must be non-NULL. 683 * of the LDAPRequest. Must be non-NULL.
684 * "request" 684 * "request"
685 * Address of the LDAPRequestParams into which request components are 685 * Address of the LDAPRequestParams into which request components are
686 * stored. Must be non-NULL. 686 * stored. Must be non-NULL.
687 * *pDomainName" 687 * *pDomainName"
688 * Address at which the domainName is stored. Must be non-NULL. 688 * Address at which the domainName is stored. Must be non-NULL.
689 * "plContext" 689 * "plContext"
690 * Platform-specific context pointer. 690 * Platform-specific context pointer.
691 * THREAD SAFETY: 691 * THREAD SAFETY:
692 * Thread Safe (see Thread Safety Definitions in Programmer's Guide) 692 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
693 * RETURNS: 693 * RETURNS:
694 * Returns NULL if the function succeeds. 694 * Returns NULL if the function succeeds.
695 * Returns an InfoAccess Error if the function fails in a non-fatal way. 695 * Returns an InfoAccess Error if the function fails in a non-fatal way.
696 * Returns a Fatal Error if the function fails in an unrecoverable way. 696 * Returns a Fatal Error if the function fails in an unrecoverable way.
697 */ 697 */
698 PKIX_Error * 698 PKIX_Error *
699 pkix_pl_InfoAccess_ParseLocation( 699 pkix_pl_InfoAccess_ParseLocation(
700 PKIX_PL_GeneralName *generalName, 700 PKIX_PL_GeneralName *generalName,
701 PRArenaPool *arena, 701 PLArenaPool *arena,
702 LDAPRequestParams *request, 702 LDAPRequestParams *request,
703 char **pDomainName, 703 char **pDomainName,
704 void *plContext) 704 void *plContext)
705 { 705 {
706 PKIX_PL_String *locationString = NULL; 706 PKIX_PL_String *locationString = NULL;
707 PKIX_UInt32 len = 0; 707 PKIX_UInt32 len = 0;
708 PKIX_UInt32 ncIndex = 0; 708 PKIX_UInt32 ncIndex = 0;
709 char *domainName = NULL; 709 char *domainName = NULL;
710 char **avaArray = NULL; 710 char **avaArray = NULL;
711 char **attrArray = NULL; 711 char **attrArray = NULL;
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 attr = *(++attrArray); 861 attr = *(++attrArray);
862 } 862 }
863 863
864 cleanup: 864 cleanup:
865 865
866 PKIX_PL_Free(locationAscii, plContext); 866 PKIX_PL_Free(locationAscii, plContext);
867 PKIX_DECREF(locationString); 867 PKIX_DECREF(locationString);
868 868
869 PKIX_RETURN(INFOACCESS); 869 PKIX_RETURN(INFOACCESS);
870 } 870 }
OLDNEW
« no previous file with comments | « nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.h ('k') | nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_nameconstraints.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698