summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorjsing <>2015-07-25 17:07:17 +0000
committerjsing <>2015-07-25 17:07:17 +0000
commit850d74aaf22e3da17aaf016d44c7e064e69b1fa2 (patch)
tree8d352e59e1a61984997f2ee98d727df2b1f0219f /src/lib
parent2281bb413977f28868acf99a7f40ba2a795be7cf (diff)
downloadopenbsd-850d74aaf22e3da17aaf016d44c7e064e69b1fa2.tar.gz
openbsd-850d74aaf22e3da17aaf016d44c7e064e69b1fa2.tar.bz2
openbsd-850d74aaf22e3da17aaf016d44c7e064e69b1fa2.zip
Manually expand ASN.1 template macros - only change in generated assembly
is due to line numbering.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/asn1/tasn_utl.c4
-rw-r--r--src/lib/libcrypto/asn1/x_bignum.c26
-rw-r--r--src/lib/libcrypto/asn1/x_long.c26
-rw-r--r--src/lib/libssl/src/crypto/asn1/tasn_utl.c4
-rw-r--r--src/lib/libssl/src/crypto/asn1/x_bignum.c26
-rw-r--r--src/lib/libssl/src/crypto/asn1/x_long.c26
6 files changed, 80 insertions, 32 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_utl.c b/src/lib/libcrypto/asn1/tasn_utl.c
index 8e242e8810..529aaf6116 100644
--- a/src/lib/libcrypto/asn1/tasn_utl.c
+++ b/src/lib/libcrypto/asn1/tasn_utl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tasn_utl.c,v 1.10 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: tasn_utl.c,v 1.11 2015/07/25 17:07:17 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 */
@@ -232,7 +232,7 @@ asn1_do_adb(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt, int nullerr)
232 return tt; 232 return tt;
233 233
234 /* Else ANY DEFINED BY ... get the table */ 234 /* Else ANY DEFINED BY ... get the table */
235 adb = ASN1_ADB_ptr(tt->item); 235 adb = (const ASN1_ADB *)tt->item;
236 236
237 /* Get the selector field */ 237 /* Get the selector field */
238 sfld = offset2ptr(*pval, adb->offset); 238 sfld = offset2ptr(*pval, adb->offset);
diff --git a/src/lib/libcrypto/asn1/x_bignum.c b/src/lib/libcrypto/asn1/x_bignum.c
index dafe9b3016..73f0f73c1c 100644
--- a/src/lib/libcrypto/asn1/x_bignum.c
+++ b/src/lib/libcrypto/asn1/x_bignum.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x_bignum.c,v 1.7 2014/07/12 16:42:47 miod Exp $ */ 1/* $OpenBSD: x_bignum.c,v 1.8 2015/07/25 17:07:17 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 */
@@ -86,13 +86,25 @@ static ASN1_PRIMITIVE_FUNCS bignum_pf = {
86 bn_i2c 86 bn_i2c
87}; 87};
88 88
89ASN1_ITEM_start(BIGNUM) 89const ASN1_ITEM BIGNUM_it = {
90ASN1_ITYPE_PRIMITIVE, V_ASN1_INTEGER, NULL, 0, &bignum_pf, 0, "BIGNUM" 90 .itype = ASN1_ITYPE_PRIMITIVE,
91ASN1_ITEM_end(BIGNUM) 91 .utype = V_ASN1_INTEGER,
92 .templates = NULL,
93 .tcount = 0,
94 .funcs = &bignum_pf,
95 .size = 0,
96 .sname = "BIGNUM",
97};
92 98
93ASN1_ITEM_start(CBIGNUM) 99const ASN1_ITEM CBIGNUM_it = {
94ASN1_ITYPE_PRIMITIVE, V_ASN1_INTEGER, NULL, 0, &bignum_pf, 0, "BIGNUM" 100 .itype = ASN1_ITYPE_PRIMITIVE,
95ASN1_ITEM_end(CBIGNUM) 101 .utype = V_ASN1_INTEGER,
102 .templates = NULL,
103 .tcount = 0,
104 .funcs = &bignum_pf,
105 .size = 0,
106 .sname = "BIGNUM",
107};
96 108
97static int 109static int
98bn_new(ASN1_VALUE **pval, const ASN1_ITEM *it) 110bn_new(ASN1_VALUE **pval, const ASN1_ITEM *it)
diff --git a/src/lib/libcrypto/asn1/x_long.c b/src/lib/libcrypto/asn1/x_long.c
index 1add387453..90a41129bc 100644
--- a/src/lib/libcrypto/asn1/x_long.c
+++ b/src/lib/libcrypto/asn1/x_long.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x_long.c,v 1.9 2014/07/11 08:44:47 jsing Exp $ */ 1/* $OpenBSD: x_long.c,v 1.10 2015/07/25 17:07:17 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 */
@@ -85,13 +85,25 @@ static ASN1_PRIMITIVE_FUNCS long_pf = {
85 long_print 85 long_print
86}; 86};
87 87
88ASN1_ITEM_start(LONG) 88const ASN1_ITEM LONG_it = {
89ASN1_ITYPE_PRIMITIVE, V_ASN1_INTEGER, NULL, 0, &long_pf, ASN1_LONG_UNDEF, "LONG" 89 .itype = ASN1_ITYPE_PRIMITIVE,
90ASN1_ITEM_end(LONG) 90 .utype = V_ASN1_INTEGER,
91 .templates = NULL,
92 .tcount = 0,
93 .funcs = &long_pf,
94 .size = ASN1_LONG_UNDEF,
95 .sname = "LONG",
96};
91 97
92ASN1_ITEM_start(ZLONG) 98const ASN1_ITEM ZLONG_it = {
93ASN1_ITYPE_PRIMITIVE, V_ASN1_INTEGER, NULL, 0, &long_pf, 0, "ZLONG" 99 .itype = ASN1_ITYPE_PRIMITIVE,
94ASN1_ITEM_end(ZLONG) 100 .utype = V_ASN1_INTEGER,
101 .templates = NULL,
102 .tcount = 0,
103 .funcs = &long_pf,
104 .size = 0,
105 .sname = "ZLONG",
106};
95 107
96static int 108static int
97long_new(ASN1_VALUE **pval, const ASN1_ITEM *it) 109long_new(ASN1_VALUE **pval, const ASN1_ITEM *it)
diff --git a/src/lib/libssl/src/crypto/asn1/tasn_utl.c b/src/lib/libssl/src/crypto/asn1/tasn_utl.c
index 8e242e8810..529aaf6116 100644
--- a/src/lib/libssl/src/crypto/asn1/tasn_utl.c
+++ b/src/lib/libssl/src/crypto/asn1/tasn_utl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tasn_utl.c,v 1.10 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: tasn_utl.c,v 1.11 2015/07/25 17:07:17 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 */
@@ -232,7 +232,7 @@ asn1_do_adb(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt, int nullerr)
232 return tt; 232 return tt;
233 233
234 /* Else ANY DEFINED BY ... get the table */ 234 /* Else ANY DEFINED BY ... get the table */
235 adb = ASN1_ADB_ptr(tt->item); 235 adb = (const ASN1_ADB *)tt->item;
236 236
237 /* Get the selector field */ 237 /* Get the selector field */
238 sfld = offset2ptr(*pval, adb->offset); 238 sfld = offset2ptr(*pval, adb->offset);
diff --git a/src/lib/libssl/src/crypto/asn1/x_bignum.c b/src/lib/libssl/src/crypto/asn1/x_bignum.c
index dafe9b3016..73f0f73c1c 100644
--- a/src/lib/libssl/src/crypto/asn1/x_bignum.c
+++ b/src/lib/libssl/src/crypto/asn1/x_bignum.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x_bignum.c,v 1.7 2014/07/12 16:42:47 miod Exp $ */ 1/* $OpenBSD: x_bignum.c,v 1.8 2015/07/25 17:07:17 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 */
@@ -86,13 +86,25 @@ static ASN1_PRIMITIVE_FUNCS bignum_pf = {
86 bn_i2c 86 bn_i2c
87}; 87};
88 88
89ASN1_ITEM_start(BIGNUM) 89const ASN1_ITEM BIGNUM_it = {
90ASN1_ITYPE_PRIMITIVE, V_ASN1_INTEGER, NULL, 0, &bignum_pf, 0, "BIGNUM" 90 .itype = ASN1_ITYPE_PRIMITIVE,
91ASN1_ITEM_end(BIGNUM) 91 .utype = V_ASN1_INTEGER,
92 .templates = NULL,
93 .tcount = 0,
94 .funcs = &bignum_pf,
95 .size = 0,
96 .sname = "BIGNUM",
97};
92 98
93ASN1_ITEM_start(CBIGNUM) 99const ASN1_ITEM CBIGNUM_it = {
94ASN1_ITYPE_PRIMITIVE, V_ASN1_INTEGER, NULL, 0, &bignum_pf, 0, "BIGNUM" 100 .itype = ASN1_ITYPE_PRIMITIVE,
95ASN1_ITEM_end(CBIGNUM) 101 .utype = V_ASN1_INTEGER,
102 .templates = NULL,
103 .tcount = 0,
104 .funcs = &bignum_pf,
105 .size = 0,
106 .sname = "BIGNUM",
107};
96 108
97static int 109static int
98bn_new(ASN1_VALUE **pval, const ASN1_ITEM *it) 110bn_new(ASN1_VALUE **pval, const ASN1_ITEM *it)
diff --git a/src/lib/libssl/src/crypto/asn1/x_long.c b/src/lib/libssl/src/crypto/asn1/x_long.c
index 1add387453..90a41129bc 100644
--- a/src/lib/libssl/src/crypto/asn1/x_long.c
+++ b/src/lib/libssl/src/crypto/asn1/x_long.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x_long.c,v 1.9 2014/07/11 08:44:47 jsing Exp $ */ 1/* $OpenBSD: x_long.c,v 1.10 2015/07/25 17:07:17 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 */
@@ -85,13 +85,25 @@ static ASN1_PRIMITIVE_FUNCS long_pf = {
85 long_print 85 long_print
86}; 86};
87 87
88ASN1_ITEM_start(LONG) 88const ASN1_ITEM LONG_it = {
89ASN1_ITYPE_PRIMITIVE, V_ASN1_INTEGER, NULL, 0, &long_pf, ASN1_LONG_UNDEF, "LONG" 89 .itype = ASN1_ITYPE_PRIMITIVE,
90ASN1_ITEM_end(LONG) 90 .utype = V_ASN1_INTEGER,
91 .templates = NULL,
92 .tcount = 0,
93 .funcs = &long_pf,
94 .size = ASN1_LONG_UNDEF,
95 .sname = "LONG",
96};
91 97
92ASN1_ITEM_start(ZLONG) 98const ASN1_ITEM ZLONG_it = {
93ASN1_ITYPE_PRIMITIVE, V_ASN1_INTEGER, NULL, 0, &long_pf, 0, "ZLONG" 99 .itype = ASN1_ITYPE_PRIMITIVE,
94ASN1_ITEM_end(ZLONG) 100 .utype = V_ASN1_INTEGER,
101 .templates = NULL,
102 .tcount = 0,
103 .funcs = &long_pf,
104 .size = 0,
105 .sname = "ZLONG",
106};
95 107
96static int 108static int
97long_new(ASN1_VALUE **pval, const ASN1_ITEM *it) 109long_new(ASN1_VALUE **pval, const ASN1_ITEM *it)