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_nx509.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_nx509.c')
-rw-r--r-- | src/lib/libcrypto/asn1/x_nx509.c | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/src/lib/libcrypto/asn1/x_nx509.c b/src/lib/libcrypto/asn1/x_nx509.c index 9738560c19..f36f1d9eca 100644 --- a/src/lib/libcrypto/asn1/x_nx509.c +++ b/src/lib/libcrypto/asn1/x_nx509.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x_nx509.c,v 1.4 2015/02/09 15:05:59 jsing Exp $ */ | 1 | /* $OpenBSD: x_nx509.c,v 1.5 2015/02/11 03:39:51 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 2005. | 3 | * project 2005. |
4 | */ | 4 | */ |
@@ -63,10 +63,32 @@ | |||
63 | 63 | ||
64 | /* Old netscape certificate wrapper format */ | 64 | /* Old netscape certificate wrapper format */ |
65 | 65 | ||
66 | ASN1_SEQUENCE(NETSCAPE_X509) = { | 66 | static const ASN1_TEMPLATE NETSCAPE_X509_seq_tt[] = { |
67 | ASN1_SIMPLE(NETSCAPE_X509, header, ASN1_OCTET_STRING), | 67 | { |
68 | ASN1_OPT(NETSCAPE_X509, cert, X509) | 68 | .flags = 0, |
69 | } ASN1_SEQUENCE_END(NETSCAPE_X509) | 69 | .tag = 0, |
70 | .offset = offsetof(NETSCAPE_X509, header), | ||
71 | .field_name = "header", | ||
72 | .item = &ASN1_OCTET_STRING_it, | ||
73 | }, | ||
74 | { | ||
75 | .flags = ASN1_TFLG_OPTIONAL, | ||
76 | .tag = 0, | ||
77 | .offset = offsetof(NETSCAPE_X509, cert), | ||
78 | .field_name = "cert", | ||
79 | .item = &X509_it, | ||
80 | }, | ||
81 | }; | ||
82 | |||
83 | const ASN1_ITEM NETSCAPE_X509_it = { | ||
84 | .itype = ASN1_ITYPE_SEQUENCE, | ||
85 | .utype = V_ASN1_SEQUENCE, | ||
86 | .templates = NETSCAPE_X509_seq_tt, | ||
87 | .tcount = sizeof(NETSCAPE_X509_seq_tt) / sizeof(ASN1_TEMPLATE), | ||
88 | .funcs = NULL, | ||
89 | .size = sizeof(NETSCAPE_X509), | ||
90 | .sname = "NETSCAPE_X509", | ||
91 | }; | ||
70 | 92 | ||
71 | 93 | ||
72 | NETSCAPE_X509 * | 94 | NETSCAPE_X509 * |