summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/x_val.c
diff options
context:
space:
mode:
authorjsing <>2015-02-11 03:39:51 +0000
committerjsing <>2015-02-11 03:39:51 +0000
commita4446bfb10ec0a821da3861d90dc625a93d84cff (patch)
treed942bf9cb3a1b441f2c996072292ae69b1aa83d2 /src/lib/libcrypto/asn1/x_val.c
parentdea579e3ced20a997dc9c2b82eb0c086555a68b8 (diff)
downloadopenbsd-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_val.c')
-rw-r--r--src/lib/libcrypto/asn1/x_val.c32
1 files changed, 27 insertions, 5 deletions
diff --git a/src/lib/libcrypto/asn1/x_val.c b/src/lib/libcrypto/asn1/x_val.c
index 27835e94da..3f1d830d3e 100644
--- a/src/lib/libcrypto/asn1/x_val.c
+++ b/src/lib/libcrypto/asn1/x_val.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x_val.c,v 1.9 2015/02/09 15:05:59 jsing Exp $ */ 1/* $OpenBSD: x_val.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
64ASN1_SEQUENCE(X509_VAL) = { 64static const ASN1_TEMPLATE X509_VAL_seq_tt[] = {
65 ASN1_SIMPLE(X509_VAL, notBefore, ASN1_TIME), 65 {
66 ASN1_SIMPLE(X509_VAL, notAfter, ASN1_TIME) 66 .flags = 0,
67} ASN1_SEQUENCE_END(X509_VAL) 67 .tag = 0,
68 .offset = offsetof(X509_VAL, notBefore),
69 .field_name = "notBefore",
70 .item = &ASN1_TIME_it,
71 },
72 {
73 .flags = 0,
74 .tag = 0,
75 .offset = offsetof(X509_VAL, notAfter),
76 .field_name = "notAfter",
77 .item = &ASN1_TIME_it,
78 },
79};
80
81const ASN1_ITEM X509_VAL_it = {
82 .itype = ASN1_ITYPE_SEQUENCE,
83 .utype = V_ASN1_SEQUENCE,
84 .templates = X509_VAL_seq_tt,
85 .tcount = sizeof(X509_VAL_seq_tt) / sizeof(ASN1_TEMPLATE),
86 .funcs = NULL,
87 .size = sizeof(X509_VAL),
88 .sname = "X509_VAL",
89};
68 90
69 91
70X509_VAL * 92X509_VAL *