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_algor.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_algor.c')
-rw-r--r-- | src/lib/libcrypto/asn1/x_algor.c | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/src/lib/libcrypto/asn1/x_algor.c b/src/lib/libcrypto/asn1/x_algor.c index f7cae9499a..c10e114318 100644 --- a/src/lib/libcrypto/asn1/x_algor.c +++ b/src/lib/libcrypto/asn1/x_algor.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x_algor.c,v 1.18 2015/02/10 08:33:10 jsing Exp $ */ | 1 | /* $OpenBSD: x_algor.c,v 1.19 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 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
@@ -61,10 +61,32 @@ | |||
61 | #include <openssl/asn1.h> | 61 | #include <openssl/asn1.h> |
62 | #include <openssl/asn1t.h> | 62 | #include <openssl/asn1t.h> |
63 | 63 | ||
64 | ASN1_SEQUENCE(X509_ALGOR) = { | 64 | static const ASN1_TEMPLATE X509_ALGOR_seq_tt[] = { |
65 | ASN1_SIMPLE(X509_ALGOR, algorithm, ASN1_OBJECT), | 65 | { |
66 | ASN1_OPT(X509_ALGOR, parameter, ASN1_ANY) | 66 | .flags = 0, |
67 | } ASN1_SEQUENCE_END(X509_ALGOR) | 67 | .tag = 0, |
68 | .offset = offsetof(X509_ALGOR, algorithm), | ||
69 | .field_name = "algorithm", | ||
70 | .item = &ASN1_OBJECT_it, | ||
71 | }, | ||
72 | { | ||
73 | .flags = ASN1_TFLG_OPTIONAL, | ||
74 | .tag = 0, | ||
75 | .offset = offsetof(X509_ALGOR, parameter), | ||
76 | .field_name = "parameter", | ||
77 | .item = &ASN1_ANY_it, | ||
78 | }, | ||
79 | }; | ||
80 | |||
81 | const ASN1_ITEM X509_ALGOR_it = { | ||
82 | .itype = ASN1_ITYPE_SEQUENCE, | ||
83 | .utype = V_ASN1_SEQUENCE, | ||
84 | .templates = X509_ALGOR_seq_tt, | ||
85 | .tcount = sizeof(X509_ALGOR_seq_tt) / sizeof(ASN1_TEMPLATE), | ||
86 | .funcs = NULL, | ||
87 | .size = sizeof(X509_ALGOR), | ||
88 | .sname = "X509_ALGOR", | ||
89 | }; | ||
68 | 90 | ||
69 | ASN1_ITEM_TEMPLATE(X509_ALGORS) = | 91 | ASN1_ITEM_TEMPLATE(X509_ALGORS) = |
70 | ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, algorithms, X509_ALGOR) | 92 | ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, algorithms, X509_ALGOR) |