summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2015-07-25 17:07:18 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2015-07-25 17:07:18 +0000
commitf8b878a1132cb7fbe52bbd8962a3ef3d3c95cf74 (patch)
treef1085dcb08458fe6c31f507be9d2e679178b011f
parente0aa55eb7d19a41fcc516dbb2735fed441bf3b00 (diff)
Manually expand ASN.1 template macros - only change in generated assembly
is due to line numbering.
-rw-r--r--lib/libcrypto/asn1/tasn_utl.c4
-rw-r--r--lib/libcrypto/asn1/x_bignum.c26
-rw-r--r--lib/libcrypto/asn1/x_long.c26
3 files changed, 40 insertions, 16 deletions
diff --git a/lib/libcrypto/asn1/tasn_utl.c b/lib/libcrypto/asn1/tasn_utl.c
index 8e242e88107..529aaf61168 100644
--- a/lib/libcrypto/asn1/tasn_utl.c
+++ b/lib/libcrypto/asn1/tasn_utl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tasn_utl.c,v 1.10 2014/06/12 15:49:27 deraadt Exp $ */
+/* $OpenBSD: tasn_utl.c,v 1.11 2015/07/25 17:07:17 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2000.
*/
@@ -232,7 +232,7 @@ asn1_do_adb(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt, int nullerr)
return tt;
/* Else ANY DEFINED BY ... get the table */
- adb = ASN1_ADB_ptr(tt->item);
+ adb = (const ASN1_ADB *)tt->item;
/* Get the selector field */
sfld = offset2ptr(*pval, adb->offset);
diff --git a/lib/libcrypto/asn1/x_bignum.c b/lib/libcrypto/asn1/x_bignum.c
index dafe9b3016a..73f0f73c1c6 100644
--- a/lib/libcrypto/asn1/x_bignum.c
+++ b/lib/libcrypto/asn1/x_bignum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x_bignum.c,v 1.7 2014/07/12 16:42:47 miod Exp $ */
+/* $OpenBSD: x_bignum.c,v 1.8 2015/07/25 17:07:17 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2000.
*/
@@ -86,13 +86,25 @@ static ASN1_PRIMITIVE_FUNCS bignum_pf = {
bn_i2c
};
-ASN1_ITEM_start(BIGNUM)
-ASN1_ITYPE_PRIMITIVE, V_ASN1_INTEGER, NULL, 0, &bignum_pf, 0, "BIGNUM"
-ASN1_ITEM_end(BIGNUM)
+const ASN1_ITEM BIGNUM_it = {
+ .itype = ASN1_ITYPE_PRIMITIVE,
+ .utype = V_ASN1_INTEGER,
+ .templates = NULL,
+ .tcount = 0,
+ .funcs = &bignum_pf,
+ .size = 0,
+ .sname = "BIGNUM",
+};
-ASN1_ITEM_start(CBIGNUM)
-ASN1_ITYPE_PRIMITIVE, V_ASN1_INTEGER, NULL, 0, &bignum_pf, 0, "BIGNUM"
-ASN1_ITEM_end(CBIGNUM)
+const ASN1_ITEM CBIGNUM_it = {
+ .itype = ASN1_ITYPE_PRIMITIVE,
+ .utype = V_ASN1_INTEGER,
+ .templates = NULL,
+ .tcount = 0,
+ .funcs = &bignum_pf,
+ .size = 0,
+ .sname = "BIGNUM",
+};
static int
bn_new(ASN1_VALUE **pval, const ASN1_ITEM *it)
diff --git a/lib/libcrypto/asn1/x_long.c b/lib/libcrypto/asn1/x_long.c
index 1add3874531..90a41129bc3 100644
--- a/lib/libcrypto/asn1/x_long.c
+++ b/lib/libcrypto/asn1/x_long.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x_long.c,v 1.9 2014/07/11 08:44:47 jsing Exp $ */
+/* $OpenBSD: x_long.c,v 1.10 2015/07/25 17:07:17 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2000.
*/
@@ -85,13 +85,25 @@ static ASN1_PRIMITIVE_FUNCS long_pf = {
long_print
};
-ASN1_ITEM_start(LONG)
-ASN1_ITYPE_PRIMITIVE, V_ASN1_INTEGER, NULL, 0, &long_pf, ASN1_LONG_UNDEF, "LONG"
-ASN1_ITEM_end(LONG)
+const ASN1_ITEM LONG_it = {
+ .itype = ASN1_ITYPE_PRIMITIVE,
+ .utype = V_ASN1_INTEGER,
+ .templates = NULL,
+ .tcount = 0,
+ .funcs = &long_pf,
+ .size = ASN1_LONG_UNDEF,
+ .sname = "LONG",
+};
-ASN1_ITEM_start(ZLONG)
-ASN1_ITYPE_PRIMITIVE, V_ASN1_INTEGER, NULL, 0, &long_pf, 0, "ZLONG"
-ASN1_ITEM_end(ZLONG)
+const ASN1_ITEM ZLONG_it = {
+ .itype = ASN1_ITYPE_PRIMITIVE,
+ .utype = V_ASN1_INTEGER,
+ .templates = NULL,
+ .tcount = 0,
+ .funcs = &long_pf,
+ .size = 0,
+ .sname = "ZLONG",
+};
static int
long_new(ASN1_VALUE **pval, const ASN1_ITEM *it)