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 #include "cert.h" | 5 #include "cert.h" |
6 #include "secoid.h" | 6 #include "secoid.h" |
7 #include "secder.h" /* XXX remove this when remove the DERTemplates */ | 7 #include "secder.h" /* XXX remove this when remove the DERTemplates */ |
8 #include "secasn1.h" | 8 #include "secasn1.h" |
9 #include "secitem.h" | 9 #include "secitem.h" |
10 #include <stdarg.h> | 10 #include <stdarg.h> |
11 #include "secerr.h" | 11 #include "secerr.h" |
12 #include "certi.h" | 12 #include "certi.h" |
13 | 13 |
14 static const SEC_ASN1Template cert_AVATemplate[] = { | 14 static const SEC_ASN1Template cert_AVATemplate[] = { |
15 { SEC_ASN1_SEQUENCE, | 15 { SEC_ASN1_SEQUENCE, |
16 0, NULL, sizeof(CERTAVA) }, | 16 0, NULL, sizeof(CERTAVA) }, |
17 { SEC_ASN1_OBJECT_ID, | 17 { SEC_ASN1_OBJECT_ID, |
18 » offsetof(CERTAVA,type), }, | 18 » offsetof(CERTAVA,type) }, |
19 { SEC_ASN1_ANY, | 19 { SEC_ASN1_ANY, |
20 » offsetof(CERTAVA,value), }, | 20 » offsetof(CERTAVA,value) }, |
21 { 0, } | 21 { 0 } |
22 }; | 22 }; |
23 | 23 |
24 const SEC_ASN1Template CERT_RDNTemplate[] = { | 24 const SEC_ASN1Template CERT_RDNTemplate[] = { |
25 { SEC_ASN1_SET_OF, | 25 { SEC_ASN1_SET_OF, |
26 offsetof(CERTRDN,avas), cert_AVATemplate, sizeof(CERTRDN) } | 26 offsetof(CERTRDN,avas), cert_AVATemplate, sizeof(CERTRDN) } |
27 }; | 27 }; |
28 | 28 |
29 | 29 |
30 static int | 30 static int |
31 CountArray(void **array) | 31 CountArray(void **array) |
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 } | 692 } |
693 ·········· | 693 ·········· |
694 avaValue.data = utf8Val; | 694 avaValue.data = utf8Val; |
695 avaValue.len = utf8ValLen; | 695 avaValue.len = utf8ValLen; |
696 } | 696 } |
697 | 697 |
698 retItem = SECITEM_DupItem(&avaValue); | 698 retItem = SECITEM_DupItem(&avaValue); |
699 PORT_FreeArena(newarena, PR_FALSE); | 699 PORT_FreeArena(newarena, PR_FALSE); |
700 return retItem; | 700 return retItem; |
701 } | 701 } |
OLD | NEW |