diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/x_name.c')
-rw-r--r-- | src/lib/libcrypto/asn1/x_name.c | 42 |
1 files changed, 35 insertions, 7 deletions
diff --git a/src/lib/libcrypto/asn1/x_name.c b/src/lib/libcrypto/asn1/x_name.c index 569c6fe346..be936318d8 100644 --- a/src/lib/libcrypto/asn1/x_name.c +++ b/src/lib/libcrypto/asn1/x_name.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x_name.c,v 1.30 2015/07/15 17:41:56 miod Exp $ */ | 1 | /* $OpenBSD: x_name.c,v 1.31 2015/07/24 15:09:52 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -145,13 +145,41 @@ X509_NAME_ENTRY_dup(X509_NAME_ENTRY *x) | |||
145 | * so declare two template wrappers for this | 145 | * so declare two template wrappers for this |
146 | */ | 146 | */ |
147 | 147 | ||
148 | ASN1_ITEM_TEMPLATE(X509_NAME_ENTRIES) = | 148 | static const ASN1_TEMPLATE X509_NAME_ENTRIES_item_tt = { |
149 | ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SET_OF, 0, RDNS, X509_NAME_ENTRY) | 149 | .flags = ASN1_TFLG_SET_OF, |
150 | ASN1_ITEM_TEMPLATE_END(X509_NAME_ENTRIES) | 150 | .tag = 0, |
151 | .offset = 0, | ||
152 | .field_name = "RDNS", | ||
153 | .item = &X509_NAME_ENTRY_it, | ||
154 | }; | ||
155 | |||
156 | const ASN1_ITEM X509_NAME_ENTRIES_it = { | ||
157 | .itype = ASN1_ITYPE_PRIMITIVE, | ||
158 | .utype = -1, | ||
159 | .templates = &X509_NAME_ENTRIES_item_tt, | ||
160 | .tcount = 0, | ||
161 | .funcs = NULL, | ||
162 | .size = 0, | ||
163 | .sname = "X509_NAME_ENTRIES", | ||
164 | }; | ||
151 | 165 | ||
152 | ASN1_ITEM_TEMPLATE(X509_NAME_INTERNAL) = | 166 | static const ASN1_TEMPLATE X509_NAME_INTERNAL_item_tt = { |
153 | ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, Name, X509_NAME_ENTRIES) | 167 | .flags = ASN1_TFLG_SEQUENCE_OF, |
154 | ASN1_ITEM_TEMPLATE_END(X509_NAME_INTERNAL) | 168 | .tag = 0, |
169 | .offset = 0, | ||
170 | .field_name = "Name", | ||
171 | .item = &X509_NAME_ENTRIES_it, | ||
172 | }; | ||
173 | |||
174 | const ASN1_ITEM X509_NAME_INTERNAL_it = { | ||
175 | .itype = ASN1_ITYPE_PRIMITIVE, | ||
176 | .utype = -1, | ||
177 | .templates = &X509_NAME_INTERNAL_item_tt, | ||
178 | .tcount = 0, | ||
179 | .funcs = NULL, | ||
180 | .size = 0, | ||
181 | .sname = "X509_NAME_INTERNAL", | ||
182 | }; | ||
155 | 183 | ||
156 | /* Normally that's where it would end: we'd have two nested STACK structures | 184 | /* Normally that's where it would end: we'd have two nested STACK structures |
157 | * representing the ASN1. Unfortunately X509_NAME uses a completely different | 185 | * representing the ASN1. Unfortunately X509_NAME uses a completely different |