| 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 /* | 5 /* |
| 6 * Support for various policy related extensions | 6 * Support for various policy related extensions |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "seccomon.h" | 9 #include "seccomon.h" |
| 10 #include "secport.h" | 10 #include "secport.h" |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 /* decode the user notice */ | 636 /* decode the user notice */ |
| 637 rv = SEC_QuickDERDecodeItem(arena, oidSeq, CERT_OidSeqTemplate, &newSeqItem)
; | 637 rv = SEC_QuickDERDecodeItem(arena, oidSeq, CERT_OidSeqTemplate, &newSeqItem)
; |
| 638 | 638 |
| 639 if ( rv != SECSuccess ) { | 639 if ( rv != SECSuccess ) { |
| 640 goto loser; | 640 goto loser; |
| 641 } | 641 } |
| 642 | 642 |
| 643 return(oidSeq); | 643 return(oidSeq); |
| 644 | 644 |
| 645 loser: | 645 loser: |
| 646 if (arena) { |
| 647 PORT_FreeArena(arena, PR_FALSE); |
| 648 } |
| 646 return(NULL); | 649 return(NULL); |
| 647 } | 650 } |
| 648 | 651 |
| 649 | 652 |
| 650 void | 653 void |
| 651 CERT_DestroyOidSequence(CERTOidSequence *oidSeq) | 654 CERT_DestroyOidSequence(CERTOidSequence *oidSeq) |
| 652 { | 655 { |
| 653 if ( oidSeq != NULL ) { | 656 if ( oidSeq != NULL ) { |
| 654 PORT_FreeArena(oidSeq->arena, PR_FALSE); | 657 PORT_FreeArena(oidSeq->arena, PR_FALSE); |
| 655 } | 658 } |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 if (certInhibitAny == NULL || dest == NULL) { | 820 if (certInhibitAny == NULL || dest == NULL) { |
| 818 return SECFailure; | 821 return SECFailure; |
| 819 } | 822 } |
| 820 | 823 |
| 821 if (SEC_ASN1EncodeItem (arena, dest, certInhibitAny, | 824 if (SEC_ASN1EncodeItem (arena, dest, certInhibitAny, |
| 822 CERT_InhibitAnyTemplate) == NULL) { | 825 CERT_InhibitAnyTemplate) == NULL) { |
| 823 rv = SECFailure; | 826 rv = SECFailure; |
| 824 } | 827 } |
| 825 return(rv); | 828 return(rv); |
| 826 } | 829 } |
| OLD | NEW |