OLD | NEW |
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_ldapresponse.c | 5 * pkix_pl_ldapresponse.c |
6 * | 6 * |
7 */ | 7 */ |
8 | 8 |
9 #include <fcntl.h> | 9 #include <fcntl.h> |
10 #include "pkix_pl_ldapresponse.h" | 10 #include "pkix_pl_ldapresponse.h" |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 * FUNCTION: pkix_pl_LdapResponse_Decode | 521 * FUNCTION: pkix_pl_LdapResponse_Decode |
522 * DESCRIPTION: | 522 * DESCRIPTION: |
523 * | 523 * |
524 * This function decodes the DER data contained in the LdapResponse pointed to | 524 * This function decodes the DER data contained in the LdapResponse pointed to |
525 * by "response", using the arena pointed to by "arena", and storing at | 525 * by "response", using the arena pointed to by "arena", and storing at |
526 * "pStatus" SECSuccess if the decoding was successful and SECFailure | 526 * "pStatus" SECSuccess if the decoding was successful and SECFailure |
527 * otherwise. The decoded message is stored in an element of "response". | 527 * otherwise. The decoded message is stored in an element of "response". |
528 * | 528 * |
529 * PARAMETERS | 529 * PARAMETERS |
530 * "arena" | 530 * "arena" |
531 * The address of the PRArenaPool to be used in the decoding. Must be | 531 * The address of the PLArenaPool to be used in the decoding. Must be |
532 * non-NULL. | 532 * non-NULL. |
533 * "response" | 533 * "response" |
534 * The address of the LdapResponse whose DER data is to be decoded. Must | 534 * The address of the LdapResponse whose DER data is to be decoded. Must |
535 * be non-NULL. | 535 * be non-NULL. |
536 * "pStatus" | 536 * "pStatus" |
537 * The address at which is stored the status from the decoding, SECSuccess | 537 * The address at which is stored the status from the decoding, SECSuccess |
538 * if successful, SECFailure otherwise. Must be non-NULL. | 538 * if successful, SECFailure otherwise. Must be non-NULL. |
539 * "plContext" | 539 * "plContext" |
540 * Platform-specific context pointer. | 540 * Platform-specific context pointer. |
541 * THREAD SAFETY: | 541 * THREAD SAFETY: |
542 * Thread Safe (see Thread Safety Definitions in Programmer's Guide) | 542 * Thread Safe (see Thread Safety Definitions in Programmer's Guide) |
543 * RETURNS: | 543 * RETURNS: |
544 * Returns NULL if the function succeeds. | 544 * Returns NULL if the function succeeds. |
545 * Returns an LdapResponse Error if the function fails in a non-fatal way. | 545 * Returns an LdapResponse Error if the function fails in a non-fatal way. |
546 * Returns a Fatal Error if the function fails in an unrecoverable way. | 546 * Returns a Fatal Error if the function fails in an unrecoverable way. |
547 */ | 547 */ |
548 PKIX_Error * | 548 PKIX_Error * |
549 pkix_pl_LdapResponse_Decode( | 549 pkix_pl_LdapResponse_Decode( |
550 PRArenaPool *arena, | 550 PLArenaPool *arena, |
551 PKIX_PL_LdapResponse *response, | 551 PKIX_PL_LdapResponse *response, |
552 SECStatus *pStatus, | 552 SECStatus *pStatus, |
553 void *plContext) | 553 void *plContext) |
554 { | 554 { |
555 LDAPMessage *msg; | 555 LDAPMessage *msg; |
556 SECStatus rv = SECFailure; | 556 SECStatus rv = SECFailure; |
557 | 557 |
558 PKIX_ENTER(LDAPRESPONSE, "PKIX_PL_LdapResponse_Decode"); | 558 PKIX_ENTER(LDAPRESPONSE, "PKIX_PL_LdapResponse_Decode"); |
559 PKIX_NULLCHECK_THREE(arena, response, pStatus); | 559 PKIX_NULLCHECK_THREE(arena, response, pStatus); |
560 | 560 |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 PKIX_ERROR(PKIX_GETATTRIBUTESCALLEDFORNONENTRYMESSAGE); | 777 PKIX_ERROR(PKIX_GETATTRIBUTESCALLEDFORNONENTRYMESSAGE); |
778 } | 778 } |
779 | 779 |
780 *pAttributes = response-> | 780 *pAttributes = response-> |
781 decoded.protocolOp.op.searchResponseEntryMsg.attributes; | 781 decoded.protocolOp.op.searchResponseEntryMsg.attributes; |
782 | 782 |
783 cleanup: | 783 cleanup: |
784 | 784 |
785 PKIX_RETURN(LDAPRESPONSE); | 785 PKIX_RETURN(LDAPRESPONSE); |
786 } | 786 } |
OLD | NEW |