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 "plarena.h" | 5 #include "plarena.h" |
6 #include "seccomon.h" | 6 #include "seccomon.h" |
7 #include "secitem.h" | 7 #include "secitem.h" |
8 #include "secoidt.h" | 8 #include "secoidt.h" |
9 #include "secasn1.h" | 9 #include "secasn1.h" |
10 #include "secder.h" | 10 #include "secder.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 static const SEC_ASN1Template CERTNameConstraintTemplate[] = { | 26 static const SEC_ASN1Template CERTNameConstraintTemplate[] = { |
27 { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(CERTNameConstraint) }, | 27 { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(CERTNameConstraint) }, |
28 { SEC_ASN1_ANY, offsetof(CERTNameConstraint, DERName) }, | 28 { SEC_ASN1_ANY, offsetof(CERTNameConstraint, DERName) }, |
29 { SEC_ASN1_OPTIONAL | SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 0,· | 29 { SEC_ASN1_OPTIONAL | SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 0,· |
30 offsetof(CERTNameConstraint, min), | 30 offsetof(CERTNameConstraint, min), |
31 SEC_ASN1_SUB(SEC_IntegerTemplate) },· | 31 SEC_ASN1_SUB(SEC_IntegerTemplate) },· |
32 { SEC_ASN1_OPTIONAL | SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 1,· | 32 { SEC_ASN1_OPTIONAL | SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 1,· |
33 offsetof(CERTNameConstraint, max), | 33 offsetof(CERTNameConstraint, max), |
34 SEC_ASN1_SUB(SEC_IntegerTemplate) }, | 34 SEC_ASN1_SUB(SEC_IntegerTemplate) }, |
35 { 0, } | 35 { 0 } |
36 }; | 36 }; |
37 | 37 |
38 const SEC_ASN1Template CERT_NameConstraintSubtreeSubTemplate[] = { | 38 const SEC_ASN1Template CERT_NameConstraintSubtreeSubTemplate[] = { |
39 { SEC_ASN1_SEQUENCE_OF | SEC_ASN1_XTRN, 0, SEC_ASN1_SUB(SEC_AnyTemplate) } | 39 { SEC_ASN1_SEQUENCE_OF | SEC_ASN1_XTRN, 0, SEC_ASN1_SUB(SEC_AnyTemplate) } |
40 }; | 40 }; |
41 | 41 |
42 static const SEC_ASN1Template CERTNameConstraintsTemplate[] = { | 42 static const SEC_ASN1Template CERTNameConstraintsTemplate[] = { |
43 { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(CERTNameConstraints) }, | 43 { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(CERTNameConstraints) }, |
44 { SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 0,· | 44 { SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 0,· |
45 offsetof(CERTNameConstraints, DERPermited),· | 45 offsetof(CERTNameConstraints, DERPermited),· |
46 CERT_NameConstraintSubtreeSubTemplate}, | 46 CERT_NameConstraintSubtreeSubTemplate}, |
47 { SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 1,· | 47 { SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 1,· |
48 offsetof(CERTNameConstraints, DERExcluded),· | 48 offsetof(CERTNameConstraints, DERExcluded),· |
49 CERT_NameConstraintSubtreeSubTemplate}, | 49 CERT_NameConstraintSubtreeSubTemplate}, |
50 { 0, } | 50 { 0 } |
51 }; | 51 }; |
52 | 52 |
53 | 53 |
54 static const SEC_ASN1Template CERTOthNameTemplate[] = { | 54 static const SEC_ASN1Template CERTOthNameTemplate[] = { |
55 { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(OtherName) }, | 55 { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(OtherName) }, |
56 { SEC_ASN1_OBJECT_ID,· | 56 { SEC_ASN1_OBJECT_ID,· |
57 offsetof(OtherName, oid) }, | 57 offsetof(OtherName, oid) }, |
58 { SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_CONSTRUCTED | SEC_ASN1_EXPLICIT | | 58 { SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_CONSTRUCTED | SEC_ASN1_EXPLICIT | |
59 SEC_ASN1_XTRN | 0, offsetof(OtherName, name), | 59 SEC_ASN1_XTRN | 0, offsetof(OtherName, name), |
60 SEC_ASN1_SUB(SEC_AnyTemplate) }, | 60 SEC_ASN1_SUB(SEC_AnyTemplate) }, |
61 { 0, }· | 61 { 0 }· |
62 }; | 62 }; |
63 | 63 |
64 static const SEC_ASN1Template CERTOtherNameTemplate[] = { | 64 static const SEC_ASN1Template CERTOtherNameTemplate[] = { |
65 { SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_CONSTRUCTED | 0 , | 65 { SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_CONSTRUCTED | 0 , |
66 offsetof(CERTGeneralName, name.OthName), CERTOthNameTemplate,· | 66 offsetof(CERTGeneralName, name.OthName), CERTOthNameTemplate,· |
67 sizeof(CERTGeneralName) } | 67 sizeof(CERTGeneralName) } |
68 }; | 68 }; |
69 | 69 |
70 static const SEC_ASN1Template CERT_RFC822NameTemplate[] = { | 70 static const SEC_ASN1Template CERT_RFC822NameTemplate[] = { |
71 { SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 1 , | 71 { SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 1 , |
(...skipping 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1976 break; | 1976 break; |
1977 } | 1977 } |
1978 list->name = cert_CombineNamesLists(list->name, name); | 1978 list->name = cert_CombineNamesLists(list->name, name); |
1979 list->len++; | 1979 list->len++; |
1980 done: | 1980 done: |
1981 PZ_Unlock(list->lock); | 1981 PZ_Unlock(list->lock); |
1982 } | 1982 } |
1983 return; | 1983 return; |
1984 } | 1984 } |
1985 #endif | 1985 #endif |
OLD | NEW |