diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2015-02-11 04:00:40 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2015-02-11 04:00:40 +0000 |
commit | 855cfdd02f6edced6ce938b8f90e92871cef8bb8 (patch) | |
tree | 34a6fc7633ad45998ffef32e73c1868368d30abd | |
parent | aeaac866c83fd4383009cd21727c6c48c8865291 (diff) |
Remove initialisers with default values from the ASN1 data structures.
Minor changes in generated assembly due to the compiler swapping from
.quad 0/.long 0 to .zero, along with changes due to line numbering.
-rw-r--r-- | lib/libcrypto/asn1/n_pkey.c | 18 | ||||
-rw-r--r-- | lib/libcrypto/asn1/nsseq.c | 10 | ||||
-rw-r--r-- | lib/libcrypto/asn1/p5_pbe.c | 7 | ||||
-rw-r--r-- | lib/libcrypto/asn1/p5_pbev2.c | 14 | ||||
-rw-r--r-- | lib/libcrypto/asn1/p8_pkey.c | 14 | ||||
-rw-r--r-- | lib/libcrypto/asn1/x_algor.c | 6 | ||||
-rw-r--r-- | lib/libcrypto/asn1/x_crl.c | 28 | ||||
-rw-r--r-- | lib/libcrypto/asn1/x_exten.c | 8 | ||||
-rw-r--r-- | lib/libcrypto/asn1/x_name.c | 7 | ||||
-rw-r--r-- | lib/libcrypto/asn1/x_nx509.c | 6 | ||||
-rw-r--r-- | lib/libcrypto/asn1/x_pubkey.c | 11 | ||||
-rw-r--r-- | lib/libcrypto/asn1/x_req.c | 20 | ||||
-rw-r--r-- | lib/libcrypto/asn1/x_sig.c | 7 | ||||
-rw-r--r-- | lib/libcrypto/asn1/x_spki.c | 7 | ||||
-rw-r--r-- | lib/libcrypto/asn1/x_val.c | 7 | ||||
-rw-r--r-- | lib/libcrypto/asn1/x_x509.c | 29 | ||||
-rw-r--r-- | lib/libcrypto/asn1/x_x509a.c | 12 |
17 files changed, 23 insertions, 188 deletions
diff --git a/lib/libcrypto/asn1/n_pkey.c b/lib/libcrypto/asn1/n_pkey.c index 8f65a4b9262..bb369fde6ec 100644 --- a/lib/libcrypto/asn1/n_pkey.c +++ b/lib/libcrypto/asn1/n_pkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_pkey.c,v 1.24 2015/02/11 03:39:51 jsing Exp $ */ +/* $OpenBSD: n_pkey.c,v 1.25 2015/02/11 04:00:39 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -88,24 +88,15 @@ typedef struct netscape_encrypted_pkey_st { static const ASN1_AUX NETSCAPE_ENCRYPTED_PKEY_aux = { - .app_data = NULL, .flags = ASN1_AFLG_BROKEN, - .ref_offset = 0, - .ref_lock = 0, - .asn1_cb = NULL, - .enc_offset = 0, }; static const ASN1_TEMPLATE NETSCAPE_ENCRYPTED_PKEY_seq_tt[] = { { - .flags = 0, - .tag = 0, .offset = offsetof(NETSCAPE_ENCRYPTED_PKEY, os), .field_name = "os", .item = &ASN1_OCTET_STRING_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(NETSCAPE_ENCRYPTED_PKEY, enckey), .field_name = "enckey", .item = &X509_SIG_it, @@ -152,22 +143,16 @@ NETSCAPE_ENCRYPTED_PKEY_free(NETSCAPE_ENCRYPTED_PKEY *a) static const ASN1_TEMPLATE NETSCAPE_PKEY_seq_tt[] = { { - .flags = 0, - .tag = 0, .offset = offsetof(NETSCAPE_PKEY, version), .field_name = "version", .item = &LONG_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(NETSCAPE_PKEY, algor), .field_name = "algor", .item = &X509_ALGOR_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(NETSCAPE_PKEY, private_key), .field_name = "private_key", .item = &ASN1_OCTET_STRING_it, @@ -179,7 +164,6 @@ const ASN1_ITEM NETSCAPE_PKEY_it = { .utype = V_ASN1_SEQUENCE, .templates = NETSCAPE_PKEY_seq_tt, .tcount = sizeof(NETSCAPE_PKEY_seq_tt) / sizeof(ASN1_TEMPLATE), - .funcs = NULL, .size = sizeof(NETSCAPE_PKEY), .sname = "NETSCAPE_PKEY", }; diff --git a/lib/libcrypto/asn1/nsseq.c b/lib/libcrypto/asn1/nsseq.c index dff9b189d94..8b39278692d 100644 --- a/lib/libcrypto/asn1/nsseq.c +++ b/lib/libcrypto/asn1/nsseq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nsseq.c,v 1.9 2015/02/11 03:39:51 jsing Exp $ */ +/* $OpenBSD: nsseq.c,v 1.10 2015/02/11 04:00:39 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -76,24 +76,16 @@ nsseq_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) /* Netscape certificate sequence structure */ static const ASN1_AUX NETSCAPE_CERT_SEQUENCE_aux = { - .app_data = NULL, - .flags = 0, - .ref_offset = 0, - .ref_lock = 0, .asn1_cb = nsseq_cb, - .enc_offset = 0, }; static const ASN1_TEMPLATE NETSCAPE_CERT_SEQUENCE_seq_tt[] = { { - .flags = 0, - .tag = 0, .offset = offsetof(NETSCAPE_CERT_SEQUENCE, type), .field_name = "type", .item = &ASN1_OBJECT_it, }, { .flags = ASN1_TFLG_EXPLICIT | ASN1_TFLG_SEQUENCE_OF | ASN1_TFLG_OPTIONAL, - .tag = 0, .offset = offsetof(NETSCAPE_CERT_SEQUENCE, certs), .field_name = "certs", .item = &X509_it, diff --git a/lib/libcrypto/asn1/p5_pbe.c b/lib/libcrypto/asn1/p5_pbe.c index 6d08cb28a14..3e7057bb246 100644 --- a/lib/libcrypto/asn1/p5_pbe.c +++ b/lib/libcrypto/asn1/p5_pbe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p5_pbe.c,v 1.19 2015/02/11 03:39:51 jsing Exp $ */ +/* $OpenBSD: p5_pbe.c,v 1.20 2015/02/11 04:00:39 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -68,15 +68,11 @@ static const ASN1_TEMPLATE PBEPARAM_seq_tt[] = { { - .flags = 0, - .tag = 0, .offset = offsetof(PBEPARAM, salt), .field_name = "salt", .item = &ASN1_OCTET_STRING_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(PBEPARAM, iter), .field_name = "iter", .item = &ASN1_INTEGER_it, @@ -88,7 +84,6 @@ const ASN1_ITEM PBEPARAM_it = { .utype = V_ASN1_SEQUENCE, .templates = PBEPARAM_seq_tt, .tcount = sizeof(PBEPARAM_seq_tt) / sizeof(ASN1_TEMPLATE), - .funcs = NULL, .size = sizeof(PBEPARAM), .sname = "PBEPARAM", }; diff --git a/lib/libcrypto/asn1/p5_pbev2.c b/lib/libcrypto/asn1/p5_pbev2.c index f967f25d3dc..795721fad2d 100644 --- a/lib/libcrypto/asn1/p5_pbev2.c +++ b/lib/libcrypto/asn1/p5_pbev2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p5_pbev2.c,v 1.20 2015/02/11 03:39:51 jsing Exp $ */ +/* $OpenBSD: p5_pbev2.c,v 1.21 2015/02/11 04:00:39 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999-2004. */ @@ -68,15 +68,11 @@ static const ASN1_TEMPLATE PBE2PARAM_seq_tt[] = { { - .flags = 0, - .tag = 0, .offset = offsetof(PBE2PARAM, keyfunc), .field_name = "keyfunc", .item = &X509_ALGOR_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(PBE2PARAM, encryption), .field_name = "encryption", .item = &X509_ALGOR_it, @@ -88,7 +84,6 @@ const ASN1_ITEM PBE2PARAM_it = { .utype = V_ASN1_SEQUENCE, .templates = PBE2PARAM_seq_tt, .tcount = sizeof(PBE2PARAM_seq_tt) / sizeof(ASN1_TEMPLATE), - .funcs = NULL, .size = sizeof(PBE2PARAM), .sname = "PBE2PARAM", }; @@ -121,29 +116,23 @@ PBE2PARAM_free(PBE2PARAM *a) static const ASN1_TEMPLATE PBKDF2PARAM_seq_tt[] = { { - .flags = 0, - .tag = 0, .offset = offsetof(PBKDF2PARAM, salt), .field_name = "salt", .item = &ASN1_ANY_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(PBKDF2PARAM, iter), .field_name = "iter", .item = &ASN1_INTEGER_it, }, { .flags = ASN1_TFLG_OPTIONAL, - .tag = 0, .offset = offsetof(PBKDF2PARAM, keylength), .field_name = "keylength", .item = &ASN1_INTEGER_it, }, { .flags = ASN1_TFLG_OPTIONAL, - .tag = 0, .offset = offsetof(PBKDF2PARAM, prf), .field_name = "prf", .item = &X509_ALGOR_it, @@ -155,7 +144,6 @@ const ASN1_ITEM PBKDF2PARAM_it = { .utype = V_ASN1_SEQUENCE, .templates = PBKDF2PARAM_seq_tt, .tcount = sizeof(PBKDF2PARAM_seq_tt) / sizeof(ASN1_TEMPLATE), - .funcs = NULL, .size = sizeof(PBKDF2PARAM), .sname = "PBKDF2PARAM", }; diff --git a/lib/libcrypto/asn1/p8_pkey.c b/lib/libcrypto/asn1/p8_pkey.c index 486aa8d42ca..e7edda714bd 100644 --- a/lib/libcrypto/asn1/p8_pkey.c +++ b/lib/libcrypto/asn1/p8_pkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p8_pkey.c,v 1.14 2015/02/11 03:39:51 jsing Exp $ */ +/* $OpenBSD: p8_pkey.c,v 1.15 2015/02/11 04:00:39 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -76,38 +76,26 @@ pkey_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) } static const ASN1_AUX PKCS8_PRIV_KEY_INFO_aux = { - .app_data = NULL, - .flags = 0, - .ref_offset = 0, - .ref_lock = 0, .asn1_cb = pkey_cb, - .enc_offset = 0, }; static const ASN1_TEMPLATE PKCS8_PRIV_KEY_INFO_seq_tt[] = { { - .flags = 0, - .tag = 0, .offset = offsetof(PKCS8_PRIV_KEY_INFO, version), .field_name = "version", .item = &ASN1_INTEGER_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(PKCS8_PRIV_KEY_INFO, pkeyalg), .field_name = "pkeyalg", .item = &X509_ALGOR_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(PKCS8_PRIV_KEY_INFO, pkey), .field_name = "pkey", .item = &ASN1_ANY_it, }, { .flags = ASN1_TFLG_IMPLICIT | ASN1_TFLG_SET_OF | ASN1_TFLG_OPTIONAL, - .tag = 0, .offset = offsetof(PKCS8_PRIV_KEY_INFO, attributes), .field_name = "attributes", .item = &X509_ATTRIBUTE_it, diff --git a/lib/libcrypto/asn1/x_algor.c b/lib/libcrypto/asn1/x_algor.c index c10e114318f..9fc1f7ff087 100644 --- a/lib/libcrypto/asn1/x_algor.c +++ b/lib/libcrypto/asn1/x_algor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_algor.c,v 1.19 2015/02/11 03:39:51 jsing Exp $ */ +/* $OpenBSD: x_algor.c,v 1.20 2015/02/11 04:00:39 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -63,15 +63,12 @@ static const ASN1_TEMPLATE X509_ALGOR_seq_tt[] = { { - .flags = 0, - .tag = 0, .offset = offsetof(X509_ALGOR, algorithm), .field_name = "algorithm", .item = &ASN1_OBJECT_it, }, { .flags = ASN1_TFLG_OPTIONAL, - .tag = 0, .offset = offsetof(X509_ALGOR, parameter), .field_name = "parameter", .item = &ASN1_ANY_it, @@ -83,7 +80,6 @@ const ASN1_ITEM X509_ALGOR_it = { .utype = V_ASN1_SEQUENCE, .templates = X509_ALGOR_seq_tt, .tcount = sizeof(X509_ALGOR_seq_tt) / sizeof(ASN1_TEMPLATE), - .funcs = NULL, .size = sizeof(X509_ALGOR), .sname = "X509_ALGOR", }; diff --git a/lib/libcrypto/asn1/x_crl.c b/lib/libcrypto/asn1/x_crl.c index 338a7841893..7b76d2ec47e 100644 --- a/lib/libcrypto/asn1/x_crl.c +++ b/lib/libcrypto/asn1/x_crl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_crl.c,v 1.23 2015/02/11 03:39:51 jsing Exp $ */ +/* $OpenBSD: x_crl.c,v 1.24 2015/02/11 04:00:39 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -73,22 +73,17 @@ static void setup_idp(X509_CRL *crl, ISSUING_DIST_POINT *idp); static const ASN1_TEMPLATE X509_REVOKED_seq_tt[] = { { - .flags = 0, - .tag = 0, .offset = offsetof(X509_REVOKED, serialNumber), .field_name = "serialNumber", .item = &ASN1_INTEGER_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(X509_REVOKED, revocationDate), .field_name = "revocationDate", .item = &ASN1_TIME_it, }, { .flags = ASN1_TFLG_SEQUENCE_OF | ASN1_TFLG_OPTIONAL, - .tag = 0, .offset = offsetof(X509_REVOKED, extensions), .field_name = "extensions", .item = &X509_EXTENSION_it, @@ -100,7 +95,6 @@ const ASN1_ITEM X509_REVOKED_it = { .utype = V_ASN1_SEQUENCE, .templates = X509_REVOKED_seq_tt, .tcount = sizeof(X509_REVOKED_seq_tt) / sizeof(ASN1_TEMPLATE), - .funcs = NULL, .size = sizeof(X509_REVOKED), .sname = "X509_REVOKED", }; @@ -140,59 +134,46 @@ crl_inf_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) static const ASN1_AUX X509_CRL_INFO_aux = { - .app_data = NULL, .flags = ASN1_AFLG_ENCODING, - .ref_offset = 0, - .ref_lock = 0, .asn1_cb = crl_inf_cb, .enc_offset = offsetof(X509_CRL_INFO, enc), }; static const ASN1_TEMPLATE X509_CRL_INFO_seq_tt[] = { { .flags = ASN1_TFLG_OPTIONAL, - .tag = 0, .offset = offsetof(X509_CRL_INFO, version), .field_name = "version", .item = &ASN1_INTEGER_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(X509_CRL_INFO, sig_alg), .field_name = "sig_alg", .item = &X509_ALGOR_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(X509_CRL_INFO, issuer), .field_name = "issuer", .item = &X509_NAME_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(X509_CRL_INFO, lastUpdate), .field_name = "lastUpdate", .item = &ASN1_TIME_it, }, { .flags = ASN1_TFLG_OPTIONAL, - .tag = 0, .offset = offsetof(X509_CRL_INFO, nextUpdate), .field_name = "nextUpdate", .item = &ASN1_TIME_it, }, { .flags = ASN1_TFLG_SEQUENCE_OF | ASN1_TFLG_OPTIONAL, - .tag = 0, .offset = offsetof(X509_CRL_INFO, revoked), .field_name = "revoked", .item = &X509_REVOKED_it, }, { .flags = ASN1_TFLG_EXPLICIT | ASN1_TFLG_SEQUENCE_OF | ASN1_TFLG_OPTIONAL, - .tag = 0, .offset = offsetof(X509_CRL_INFO, extensions), .field_name = "extensions", .item = &X509_EXTENSION_it, @@ -425,26 +406,19 @@ static const ASN1_AUX X509_CRL_aux = { .ref_offset = offsetof(X509_CRL, references), .ref_lock = CRYPTO_LOCK_X509_CRL, .asn1_cb = crl_cb, - .enc_offset = 0, }; static const ASN1_TEMPLATE X509_CRL_seq_tt[] = { { - .flags = 0, - .tag = 0, .offset = offsetof(X509_CRL, crl), .field_name = "crl", .item = &X509_CRL_INFO_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(X509_CRL, sig_alg), .field_name = "sig_alg", .item = &X509_ALGOR_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(X509_CRL, signature), .field_name = "signature", .item = &ASN1_BIT_STRING_it, diff --git a/lib/libcrypto/asn1/x_exten.c b/lib/libcrypto/asn1/x_exten.c index 6f82a71d686..b4b8cfe42a5 100644 --- a/lib/libcrypto/asn1/x_exten.c +++ b/lib/libcrypto/asn1/x_exten.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_exten.c,v 1.14 2015/02/11 03:39:51 jsing Exp $ */ +/* $OpenBSD: x_exten.c,v 1.15 2015/02/11 04:00:39 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -63,22 +63,17 @@ static const ASN1_TEMPLATE X509_EXTENSION_seq_tt[] = { { - .flags = 0, - .tag = 0, .offset = offsetof(X509_EXTENSION, object), .field_name = "object", .item = &ASN1_OBJECT_it, }, { .flags = ASN1_TFLG_OPTIONAL, - .tag = 0, .offset = offsetof(X509_EXTENSION, critical), .field_name = "critical", .item = &ASN1_BOOLEAN_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(X509_EXTENSION, value), .field_name = "value", .item = &ASN1_OCTET_STRING_it, @@ -90,7 +85,6 @@ const ASN1_ITEM X509_EXTENSION_it = { .utype = V_ASN1_SEQUENCE, .templates = X509_EXTENSION_seq_tt, .tcount = sizeof(X509_EXTENSION_seq_tt) / sizeof(ASN1_TEMPLATE), - .funcs = NULL, .size = sizeof(X509_EXTENSION), .sname = "X509_EXTENSION", }; diff --git a/lib/libcrypto/asn1/x_name.c b/lib/libcrypto/asn1/x_name.c index d6d5bea369c..910110505d2 100644 --- a/lib/libcrypto/asn1/x_name.c +++ b/lib/libcrypto/asn1/x_name.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_name.c,v 1.25 2015/02/11 03:39:51 jsing Exp $ */ +/* $OpenBSD: x_name.c,v 1.26 2015/02/11 04:00:39 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -89,15 +89,11 @@ static int x509_name_ex_print(BIO *out, ASN1_VALUE **pval, int indent, static const ASN1_TEMPLATE X509_NAME_ENTRY_seq_tt[] = { { - .flags = 0, - .tag = 0, .offset = offsetof(X509_NAME_ENTRY, object), .field_name = "object", .item = &ASN1_OBJECT_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(X509_NAME_ENTRY, value), .field_name = "value", .item = &ASN1_PRINTABLE_it, @@ -109,7 +105,6 @@ const ASN1_ITEM X509_NAME_ENTRY_it = { .utype = V_ASN1_SEQUENCE, .templates = X509_NAME_ENTRY_seq_tt, .tcount = sizeof(X509_NAME_ENTRY_seq_tt) / sizeof(ASN1_TEMPLATE), - .funcs = NULL, .size = sizeof(X509_NAME_ENTRY), .sname = "X509_NAME_ENTRY", }; diff --git a/lib/libcrypto/asn1/x_nx509.c b/lib/libcrypto/asn1/x_nx509.c index f36f1d9ecae..7e18be8c796 100644 --- a/lib/libcrypto/asn1/x_nx509.c +++ b/lib/libcrypto/asn1/x_nx509.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_nx509.c,v 1.5 2015/02/11 03:39:51 jsing Exp $ */ +/* $OpenBSD: x_nx509.c,v 1.6 2015/02/11 04:00:39 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2005. */ @@ -65,15 +65,12 @@ static const ASN1_TEMPLATE NETSCAPE_X509_seq_tt[] = { { - .flags = 0, - .tag = 0, .offset = offsetof(NETSCAPE_X509, header), .field_name = "header", .item = &ASN1_OCTET_STRING_it, }, { .flags = ASN1_TFLG_OPTIONAL, - .tag = 0, .offset = offsetof(NETSCAPE_X509, cert), .field_name = "cert", .item = &X509_it, @@ -85,7 +82,6 @@ const ASN1_ITEM NETSCAPE_X509_it = { .utype = V_ASN1_SEQUENCE, .templates = NETSCAPE_X509_seq_tt, .tcount = sizeof(NETSCAPE_X509_seq_tt) / sizeof(ASN1_TEMPLATE), - .funcs = NULL, .size = sizeof(NETSCAPE_X509), .sname = "NETSCAPE_X509", }; diff --git a/lib/libcrypto/asn1/x_pubkey.c b/lib/libcrypto/asn1/x_pubkey.c index 55084182cca..3bdbb5a5369 100644 --- a/lib/libcrypto/asn1/x_pubkey.c +++ b/lib/libcrypto/asn1/x_pubkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_pubkey.c,v 1.24 2015/02/11 03:39:51 jsing Exp $ */ +/* $OpenBSD: x_pubkey.c,v 1.25 2015/02/11 04:00:39 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -85,24 +85,15 @@ pubkey_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) } static const ASN1_AUX X509_PUBKEY_aux = { - .app_data = NULL, - .flags = 0, - .ref_offset = 0, - .ref_lock = 0, .asn1_cb = pubkey_cb, - .enc_offset = 0, }; static const ASN1_TEMPLATE X509_PUBKEY_seq_tt[] = { { - .flags = 0, - .tag = 0, .offset = offsetof(X509_PUBKEY, algor), .field_name = "algor", .item = &X509_ALGOR_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(X509_PUBKEY, public_key), .field_name = "public_key", .item = &ASN1_BIT_STRING_it, diff --git a/lib/libcrypto/asn1/x_req.c b/lib/libcrypto/asn1/x_req.c index 5e8aa21b0d1..5ffa11e2ddf 100644 --- a/lib/libcrypto/asn1/x_req.c +++ b/lib/libcrypto/asn1/x_req.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_req.c,v 1.14 2015/02/11 03:39:51 jsing Exp $ */ +/* $OpenBSD: x_req.c,v 1.15 2015/02/11 04:00:39 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -93,31 +93,22 @@ rinf_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) } static const ASN1_AUX X509_REQ_INFO_aux = { - .app_data = NULL, .flags = ASN1_AFLG_ENCODING, - .ref_offset = 0, - .ref_lock = 0, .asn1_cb = rinf_cb, .enc_offset = offsetof(X509_REQ_INFO, enc), }; static const ASN1_TEMPLATE X509_REQ_INFO_seq_tt[] = { { - .flags = 0, - .tag = 0, .offset = offsetof(X509_REQ_INFO, version), .field_name = "version", .item = &ASN1_INTEGER_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(X509_REQ_INFO, subject), .field_name = "subject", .item = &X509_NAME_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(X509_REQ_INFO, pubkey), .field_name = "pubkey", .item = &X509_PUBKEY_it, @@ -127,7 +118,6 @@ static const ASN1_TEMPLATE X509_REQ_INFO_seq_tt[] = { */ { .flags = ASN1_TFLG_IMPLICIT | ASN1_TFLG_SET_OF | ASN1_TFLG_OPTIONAL, - .tag = 0, .offset = offsetof(X509_REQ_INFO, attributes), .field_name = "attributes", .item = &X509_ATTRIBUTE_it, @@ -175,27 +165,19 @@ static const ASN1_AUX X509_REQ_aux = { .flags = ASN1_AFLG_REFCOUNT, .ref_offset = offsetof(X509_REQ, references), .ref_lock = CRYPTO_LOCK_X509_REQ, - .asn1_cb = 0, - .enc_offset = 0, }; static const ASN1_TEMPLATE X509_REQ_seq_tt[] = { { - .flags = 0, - .tag = 0, .offset = offsetof(X509_REQ, req_info), .field_name = "req_info", .item = &X509_REQ_INFO_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(X509_REQ, sig_alg), .field_name = "sig_alg", .item = &X509_ALGOR_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(X509_REQ, signature), .field_name = "signature", .item = &ASN1_BIT_STRING_it, diff --git a/lib/libcrypto/asn1/x_sig.c b/lib/libcrypto/asn1/x_sig.c index 090a454ffb4..702bc40e558 100644 --- a/lib/libcrypto/asn1/x_sig.c +++ b/lib/libcrypto/asn1/x_sig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_sig.c,v 1.10 2015/02/11 03:39:51 jsing Exp $ */ +/* $OpenBSD: x_sig.c,v 1.11 2015/02/11 04:00:39 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -63,15 +63,11 @@ static const ASN1_TEMPLATE X509_SIG_seq_tt[] = { { - .flags = 0, - .tag = 0, .offset = offsetof(X509_SIG, algor), .field_name = "algor", .item = &X509_ALGOR_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(X509_SIG, digest), .field_name = "digest", .item = &ASN1_OCTET_STRING_it, @@ -83,7 +79,6 @@ const ASN1_ITEM X509_SIG_it = { .utype = V_ASN1_SEQUENCE, .templates = X509_SIG_seq_tt, .tcount = sizeof(X509_SIG_seq_tt) / sizeof(ASN1_TEMPLATE), - .funcs = NULL, .size = sizeof(X509_SIG), .sname = "X509_SIG", }; diff --git a/lib/libcrypto/asn1/x_spki.c b/lib/libcrypto/asn1/x_spki.c index 6250c1343b2..2aa860feb91 100644 --- a/lib/libcrypto/asn1/x_spki.c +++ b/lib/libcrypto/asn1/x_spki.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_spki.c,v 1.10 2015/02/11 03:39:51 jsing Exp $ */ +/* $OpenBSD: x_spki.c,v 1.11 2015/02/11 04:00:39 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -67,15 +67,11 @@ static const ASN1_TEMPLATE NETSCAPE_SPKAC_seq_tt[] = { { - .flags = 0, - .tag = 0, .offset = offsetof(NETSCAPE_SPKAC, pubkey), .field_name = "pubkey", .item = &X509_PUBKEY_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(NETSCAPE_SPKAC, challenge), .field_name = "challenge", .item = &ASN1_IA5STRING_it, @@ -87,7 +83,6 @@ const ASN1_ITEM NETSCAPE_SPKAC_it = { .utype = V_ASN1_SEQUENCE, .templates = NETSCAPE_SPKAC_seq_tt, .tcount = sizeof(NETSCAPE_SPKAC_seq_tt) / sizeof(ASN1_TEMPLATE), - .funcs = NULL, .size = sizeof(NETSCAPE_SPKAC), .sname = "NETSCAPE_SPKAC", }; diff --git a/lib/libcrypto/asn1/x_val.c b/lib/libcrypto/asn1/x_val.c index 3f1d830d3e4..eb2ba783bb1 100644 --- a/lib/libcrypto/asn1/x_val.c +++ b/lib/libcrypto/asn1/x_val.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_val.c,v 1.10 2015/02/11 03:39:51 jsing Exp $ */ +/* $OpenBSD: x_val.c,v 1.11 2015/02/11 04:00:39 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -63,15 +63,11 @@ static const ASN1_TEMPLATE X509_VAL_seq_tt[] = { { - .flags = 0, - .tag = 0, .offset = offsetof(X509_VAL, notBefore), .field_name = "notBefore", .item = &ASN1_TIME_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(X509_VAL, notAfter), .field_name = "notAfter", .item = &ASN1_TIME_it, @@ -83,7 +79,6 @@ const ASN1_ITEM X509_VAL_it = { .utype = V_ASN1_SEQUENCE, .templates = X509_VAL_seq_tt, .tcount = sizeof(X509_VAL_seq_tt) / sizeof(ASN1_TEMPLATE), - .funcs = NULL, .size = sizeof(X509_VAL), .sname = "X509_VAL", }; diff --git a/lib/libcrypto/asn1/x_x509.c b/lib/libcrypto/asn1/x_x509.c index 1f29d5498a3..70d38221b6b 100644 --- a/lib/libcrypto/asn1/x_x509.c +++ b/lib/libcrypto/asn1/x_x509.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_x509.c,v 1.22 2015/02/11 03:39:51 jsing Exp $ */ +/* $OpenBSD: x_x509.c,v 1.23 2015/02/11 04:00:39 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -66,59 +66,42 @@ #include <openssl/x509v3.h> static const ASN1_AUX X509_CINF_aux = { - .app_data = NULL, .flags = ASN1_AFLG_ENCODING, - .ref_offset = 0, - .ref_lock = 0, - .asn1_cb = 0, .enc_offset = offsetof(X509_CINF, enc), }; static const ASN1_TEMPLATE X509_CINF_seq_tt[] = { { .flags = ASN1_TFLG_EXPLICIT | ASN1_TFLG_OPTIONAL, - .tag = 0, .offset = offsetof(X509_CINF, version), .field_name = "version", .item = &ASN1_INTEGER_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(X509_CINF, serialNumber), .field_name = "serialNumber", .item = &ASN1_INTEGER_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(X509_CINF, signature), .field_name = "signature", .item = &X509_ALGOR_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(X509_CINF, issuer), .field_name = "issuer", .item = &X509_NAME_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(X509_CINF, validity), .field_name = "validity", .item = &X509_VAL_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(X509_CINF, subject), .field_name = "subject", .item = &X509_NAME_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(X509_CINF, key), .field_name = "key", .item = &X509_PUBKEY_it, @@ -138,7 +121,8 @@ static const ASN1_TEMPLATE X509_CINF_seq_tt[] = { .item = &ASN1_BIT_STRING_it, }, { - .flags = ASN1_TFLG_EXPLICIT | ASN1_TFLG_SEQUENCE_OF | ASN1_TFLG_OPTIONAL, + .flags = ASN1_TFLG_EXPLICIT | ASN1_TFLG_SEQUENCE_OF | + ASN1_TFLG_OPTIONAL, .tag = 3, .offset = offsetof(X509_CINF, extensions), .field_name = "extensions", @@ -232,26 +216,19 @@ static const ASN1_AUX X509_aux = { .ref_offset = offsetof(X509, references), .ref_lock = CRYPTO_LOCK_X509, .asn1_cb = x509_cb, - .enc_offset = 0, }; static const ASN1_TEMPLATE X509_seq_tt[] = { { - .flags = 0, - .tag = 0, .offset = offsetof(X509, cert_info), .field_name = "cert_info", .item = &X509_CINF_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(X509, sig_alg), .field_name = "sig_alg", .item = &X509_ALGOR_it, }, { - .flags = 0, - .tag = 0, .offset = offsetof(X509, signature), .field_name = "signature", .item = &ASN1_BIT_STRING_it, diff --git a/lib/libcrypto/asn1/x_x509a.c b/lib/libcrypto/asn1/x_x509a.c index be8ebbdcbbf..c0624d674b0 100644 --- a/lib/libcrypto/asn1/x_x509a.c +++ b/lib/libcrypto/asn1/x_x509a.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_x509a.c,v 1.12 2015/02/11 03:39:51 jsing Exp $ */ +/* $OpenBSD: x_x509a.c,v 1.13 2015/02/11 04:00:39 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -74,13 +74,13 @@ static X509_CERT_AUX *aux_get(X509 *x); static const ASN1_TEMPLATE X509_CERT_AUX_seq_tt[] = { { .flags = ASN1_TFLG_SEQUENCE_OF | ASN1_TFLG_OPTIONAL, - .tag = 0, .offset = offsetof(X509_CERT_AUX, trust), .field_name = "trust", .item = &ASN1_OBJECT_it, }, { - .flags = ASN1_TFLG_IMPLICIT | ASN1_TFLG_SEQUENCE_OF | ASN1_TFLG_OPTIONAL, + .flags = ASN1_TFLG_IMPLICIT | ASN1_TFLG_SEQUENCE_OF | + ASN1_TFLG_OPTIONAL, .tag = 0, .offset = offsetof(X509_CERT_AUX, reject), .field_name = "reject", @@ -88,20 +88,19 @@ static const ASN1_TEMPLATE X509_CERT_AUX_seq_tt[] = { }, { .flags = ASN1_TFLG_OPTIONAL, - .tag = 0, .offset = offsetof(X509_CERT_AUX, alias), .field_name = "alias", .item = &ASN1_UTF8STRING_it, }, { .flags = ASN1_TFLG_OPTIONAL, - .tag = 0, .offset = offsetof(X509_CERT_AUX, keyid), .field_name = "keyid", .item = &ASN1_OCTET_STRING_it, }, { - .flags = ASN1_TFLG_IMPLICIT | ASN1_TFLG_SEQUENCE_OF | ASN1_TFLG_OPTIONAL, + .flags = ASN1_TFLG_IMPLICIT | ASN1_TFLG_SEQUENCE_OF | + ASN1_TFLG_OPTIONAL, .tag = 1, .offset = offsetof(X509_CERT_AUX, other), .field_name = "other", @@ -114,7 +113,6 @@ const ASN1_ITEM X509_CERT_AUX_it = { .utype = V_ASN1_SEQUENCE, .templates = X509_CERT_AUX_seq_tt, .tcount = sizeof(X509_CERT_AUX_seq_tt) / sizeof(ASN1_TEMPLATE), - .funcs = NULL, .size = sizeof(X509_CERT_AUX), .sname = "X509_CERT_AUX", }; |