diff options
| author | jsing <> | 2015-02-11 03:39:51 +0000 |
|---|---|---|
| committer | jsing <> | 2015-02-11 03:39:51 +0000 |
| commit | b07f4d1849544c2c966cb30d49bdb02358dc608d (patch) | |
| tree | d942bf9cb3a1b441f2c996072292ae69b1aa83d2 /src/lib/libcrypto/asn1/x_sig.c | |
| parent | e816a1ec1d4411707051912b945e8eab7a5a94e8 (diff) | |
| download | openbsd-b07f4d1849544c2c966cb30d49bdb02358dc608d.tar.gz openbsd-b07f4d1849544c2c966cb30d49bdb02358dc608d.tar.bz2 openbsd-b07f4d1849544c2c966cb30d49bdb02358dc608d.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_sig.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/x_sig.c | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/src/lib/libcrypto/asn1/x_sig.c b/src/lib/libcrypto/asn1/x_sig.c index 7c4c8c9c55..090a454ffb 100644 --- a/src/lib/libcrypto/asn1/x_sig.c +++ b/src/lib/libcrypto/asn1/x_sig.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x_sig.c,v 1.9 2015/02/09 15:05:59 jsing Exp $ */ | 1 | /* $OpenBSD: x_sig.c,v 1.10 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 | * |
| @@ -61,10 +61,32 @@ | |||
| 61 | #include <openssl/asn1t.h> | 61 | #include <openssl/asn1t.h> |
| 62 | #include <openssl/x509.h> | 62 | #include <openssl/x509.h> |
| 63 | 63 | ||
| 64 | ASN1_SEQUENCE(X509_SIG) = { | 64 | static const ASN1_TEMPLATE X509_SIG_seq_tt[] = { |
| 65 | ASN1_SIMPLE(X509_SIG, algor, X509_ALGOR), | 65 | { |
| 66 | ASN1_SIMPLE(X509_SIG, digest, ASN1_OCTET_STRING) | 66 | .flags = 0, |
| 67 | } ASN1_SEQUENCE_END(X509_SIG) | 67 | .tag = 0, |
| 68 | .offset = offsetof(X509_SIG, algor), | ||
| 69 | .field_name = "algor", | ||
| 70 | .item = &X509_ALGOR_it, | ||
| 71 | }, | ||
| 72 | { | ||
| 73 | .flags = 0, | ||
| 74 | .tag = 0, | ||
| 75 | .offset = offsetof(X509_SIG, digest), | ||
| 76 | .field_name = "digest", | ||
| 77 | .item = &ASN1_OCTET_STRING_it, | ||
| 78 | }, | ||
| 79 | }; | ||
| 80 | |||
| 81 | const ASN1_ITEM X509_SIG_it = { | ||
| 82 | .itype = ASN1_ITYPE_SEQUENCE, | ||
| 83 | .utype = V_ASN1_SEQUENCE, | ||
| 84 | .templates = X509_SIG_seq_tt, | ||
| 85 | .tcount = sizeof(X509_SIG_seq_tt) / sizeof(ASN1_TEMPLATE), | ||
| 86 | .funcs = NULL, | ||
| 87 | .size = sizeof(X509_SIG), | ||
| 88 | .sname = "X509_SIG", | ||
| 89 | }; | ||
| 68 | 90 | ||
| 69 | 91 | ||
| 70 | X509_SIG * | 92 | X509_SIG * |
