summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509v3/v3_ncons.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/x509v3/v3_ncons.c54
1 files changed, 46 insertions, 8 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_ncons.c b/src/lib/libcrypto/x509v3/v3_ncons.c
index 7cb272a58f..e154b6ba18 100644
--- a/src/lib/libcrypto/x509v3/v3_ncons.c
+++ b/src/lib/libcrypto/x509v3/v3_ncons.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: v3_ncons.c,v 1.6 2015/02/10 05:43:09 jsing Exp $ */ 1/* $OpenBSD: v3_ncons.c,v 1.7 2015/07/25 16:00:14 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
@@ -89,18 +89,56 @@ const X509V3_EXT_METHOD v3_name_constraints = {
89 NULL 89 NULL
90}; 90};
91 91
92ASN1_SEQUENCE(GENERAL_SUBTREE) = { 92static const ASN1_TEMPLATE GENERAL_SUBTREE_seq_tt[] = {
93 ASN1_SIMPLE(GENERAL_SUBTREE, base, GENERAL_NAME), 93 {
94 ASN1_IMP_OPT(GENERAL_SUBTREE, minimum, ASN1_INTEGER, 0), 94 .flags = 0,
95 ASN1_IMP_OPT(GENERAL_SUBTREE, maximum, ASN1_INTEGER, 1) 95 .tag = 0,
96} ASN1_SEQUENCE_END(GENERAL_SUBTREE) 96 .offset = offsetof(GENERAL_SUBTREE, base),
97 .field_name = "base",
98 .item = &GENERAL_NAME_it,
99 },
100 {
101 .flags = ASN1_TFLG_IMPLICIT | ASN1_TFLG_OPTIONAL,
102 .tag = 0,
103 .offset = offsetof(GENERAL_SUBTREE, minimum),
104 .field_name = "minimum",
105 .item = &ASN1_INTEGER_it,
106 },
107 {
108 .flags = ASN1_TFLG_IMPLICIT | ASN1_TFLG_OPTIONAL,
109 .tag = 1,
110 .offset = offsetof(GENERAL_SUBTREE, maximum),
111 .field_name = "maximum",
112 .item = &ASN1_INTEGER_it,
113 },
114};
115
116const ASN1_ITEM GENERAL_SUBTREE_it = {
117 .itype = ASN1_ITYPE_SEQUENCE,
118 .utype = V_ASN1_SEQUENCE,
119 .templates = GENERAL_SUBTREE_seq_tt,
120 .tcount = sizeof(GENERAL_SUBTREE_seq_tt) / sizeof(ASN1_TEMPLATE),
121 .funcs = NULL,
122 .size = sizeof(GENERAL_SUBTREE),
123 .sname = "GENERAL_SUBTREE",
124};
97 125
98ASN1_SEQUENCE(NAME_CONSTRAINTS) = { 126static const ASN1_TEMPLATE NAME_CONSTRAINTS_seq_tt[] = {
99 ASN1_IMP_SEQUENCE_OF_OPT(NAME_CONSTRAINTS, permittedSubtrees, 127 ASN1_IMP_SEQUENCE_OF_OPT(NAME_CONSTRAINTS, permittedSubtrees,
100 GENERAL_SUBTREE, 0), 128 GENERAL_SUBTREE, 0),
101 ASN1_IMP_SEQUENCE_OF_OPT(NAME_CONSTRAINTS, excludedSubtrees, 129 ASN1_IMP_SEQUENCE_OF_OPT(NAME_CONSTRAINTS, excludedSubtrees,
102 GENERAL_SUBTREE, 1), 130 GENERAL_SUBTREE, 1),
103} ASN1_SEQUENCE_END(NAME_CONSTRAINTS) 131};
132
133const ASN1_ITEM NAME_CONSTRAINTS_it = {
134 .itype = ASN1_ITYPE_SEQUENCE,
135 .utype = V_ASN1_SEQUENCE,
136 .templates = NAME_CONSTRAINTS_seq_tt,
137 .tcount = sizeof(NAME_CONSTRAINTS_seq_tt) / sizeof(ASN1_TEMPLATE),
138 .funcs = NULL,
139 .size = sizeof(NAME_CONSTRAINTS),
140 .sname = "NAME_CONSTRAINTS",
141};
104 142
105 143
106 144