summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/p5_pbe.c
diff options
context:
space:
mode:
authorjsing <>2015-02-11 03:39:51 +0000
committerjsing <>2015-02-11 03:39:51 +0000
commitb07f4d1849544c2c966cb30d49bdb02358dc608d (patch)
treed942bf9cb3a1b441f2c996072292ae69b1aa83d2 /src/lib/libcrypto/asn1/p5_pbe.c
parente816a1ec1d4411707051912b945e8eab7a5a94e8 (diff)
downloadopenbsd-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/p5_pbe.c')
-rw-r--r--src/lib/libcrypto/asn1/p5_pbe.c32
1 files changed, 27 insertions, 5 deletions
diff --git a/src/lib/libcrypto/asn1/p5_pbe.c b/src/lib/libcrypto/asn1/p5_pbe.c
index 7491a5bdc7..6d08cb28a1 100644
--- a/src/lib/libcrypto/asn1/p5_pbe.c
+++ b/src/lib/libcrypto/asn1/p5_pbe.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p5_pbe.c,v 1.18 2015/02/09 15:05:59 jsing Exp $ */ 1/* $OpenBSD: p5_pbe.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 1999. 3 * project 1999.
4 */ 4 */
@@ -66,10 +66,32 @@
66 66
67/* PKCS#5 password based encryption structure */ 67/* PKCS#5 password based encryption structure */
68 68
69ASN1_SEQUENCE(PBEPARAM) = { 69static const ASN1_TEMPLATE PBEPARAM_seq_tt[] = {
70 ASN1_SIMPLE(PBEPARAM, salt, ASN1_OCTET_STRING), 70 {
71 ASN1_SIMPLE(PBEPARAM, iter, ASN1_INTEGER) 71 .flags = 0,
72} ASN1_SEQUENCE_END(PBEPARAM) 72 .tag = 0,
73 .offset = offsetof(PBEPARAM, salt),
74 .field_name = "salt",
75 .item = &ASN1_OCTET_STRING_it,
76 },
77 {
78 .flags = 0,
79 .tag = 0,
80 .offset = offsetof(PBEPARAM, iter),
81 .field_name = "iter",
82 .item = &ASN1_INTEGER_it,
83 },
84};
85
86const ASN1_ITEM PBEPARAM_it = {
87 .itype = ASN1_ITYPE_SEQUENCE,
88 .utype = V_ASN1_SEQUENCE,
89 .templates = PBEPARAM_seq_tt,
90 .tcount = sizeof(PBEPARAM_seq_tt) / sizeof(ASN1_TEMPLATE),
91 .funcs = NULL,
92 .size = sizeof(PBEPARAM),
93 .sname = "PBEPARAM",
94};
73 95
74 96
75PBEPARAM * 97PBEPARAM *