diff options
author | jsing <> | 2015-02-11 03:39:51 +0000 |
---|---|---|
committer | jsing <> | 2015-02-11 03:39:51 +0000 |
commit | a4446bfb10ec0a821da3861d90dc625a93d84cff (patch) | |
tree | d942bf9cb3a1b441f2c996072292ae69b1aa83d2 /src/lib/libcrypto/asn1/x_name.c | |
parent | dea579e3ced20a997dc9c2b82eb0c086555a68b8 (diff) | |
download | openbsd-a4446bfb10ec0a821da3861d90dc625a93d84cff.tar.gz openbsd-a4446bfb10ec0a821da3861d90dc625a93d84cff.tar.bz2 openbsd-a4446bfb10ec0a821da3861d90dc625a93d84cff.zip |
Expand most of the ASN1_SEQUENCE* and associated macros, making the data
structures visible and easier to review, without having to wade through
layers and layers of asn1t.h macros.
Change has been scripted and the generated assembly only differs by changes
to line numbers.
Discussed with beck@ miod@ tedu@
Diffstat (limited to 'src/lib/libcrypto/asn1/x_name.c')
-rw-r--r-- | src/lib/libcrypto/asn1/x_name.c | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/src/lib/libcrypto/asn1/x_name.c b/src/lib/libcrypto/asn1/x_name.c index a985cf19ce..d6d5bea369 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.24 2015/02/10 08:33:10 jsing Exp $ */ | 1 | /* $OpenBSD: x_name.c,v 1.25 2015/02/11 03:39:51 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 | * |
@@ -87,10 +87,32 @@ static int i2d_name_canon(STACK_OF(STACK_OF_X509_NAME_ENTRY) *intname, | |||
87 | static int x509_name_ex_print(BIO *out, ASN1_VALUE **pval, int indent, | 87 | static int x509_name_ex_print(BIO *out, ASN1_VALUE **pval, int indent, |
88 | const char *fname, const ASN1_PCTX *pctx); | 88 | const char *fname, const ASN1_PCTX *pctx); |
89 | 89 | ||
90 | ASN1_SEQUENCE(X509_NAME_ENTRY) = { | 90 | static const ASN1_TEMPLATE X509_NAME_ENTRY_seq_tt[] = { |
91 | ASN1_SIMPLE(X509_NAME_ENTRY, object, ASN1_OBJECT), | 91 | { |
92 | ASN1_SIMPLE(X509_NAME_ENTRY, value, ASN1_PRINTABLE) | 92 | .flags = 0, |
93 | } ASN1_SEQUENCE_END(X509_NAME_ENTRY) | 93 | .tag = 0, |
94 | .offset = offsetof(X509_NAME_ENTRY, object), | ||
95 | .field_name = "object", | ||
96 | .item = &ASN1_OBJECT_it, | ||
97 | }, | ||
98 | { | ||
99 | .flags = 0, | ||
100 | .tag = 0, | ||
101 | .offset = offsetof(X509_NAME_ENTRY, value), | ||
102 | .field_name = "value", | ||
103 | .item = &ASN1_PRINTABLE_it, | ||
104 | }, | ||
105 | }; | ||
106 | |||
107 | const ASN1_ITEM X509_NAME_ENTRY_it = { | ||
108 | .itype = ASN1_ITYPE_SEQUENCE, | ||
109 | .utype = V_ASN1_SEQUENCE, | ||
110 | .templates = X509_NAME_ENTRY_seq_tt, | ||
111 | .tcount = sizeof(X509_NAME_ENTRY_seq_tt) / sizeof(ASN1_TEMPLATE), | ||
112 | .funcs = NULL, | ||
113 | .size = sizeof(X509_NAME_ENTRY), | ||
114 | .sname = "X509_NAME_ENTRY", | ||
115 | }; | ||
94 | 116 | ||
95 | 117 | ||
96 | X509_NAME_ENTRY * | 118 | X509_NAME_ENTRY * |