diff options
author | miod <> | 2014-04-27 20:26:49 +0000 |
---|---|---|
committer | miod <> | 2014-04-27 20:26:49 +0000 |
commit | 45bb7f0ae87ddf787dd06d515db9afb04a74bf6c (patch) | |
tree | 319f4236c4f33e8d28d3d3a51c99e82d996e948f /src/lib/libcrypto/asn1 | |
parent | cbbb78bcf8e4dca14564fbea5fdfe0703e2951cc (diff) | |
download | openbsd-45bb7f0ae87ddf787dd06d515db9afb04a74bf6c.tar.gz openbsd-45bb7f0ae87ddf787dd06d515db9afb04a74bf6c.tar.bz2 openbsd-45bb7f0ae87ddf787dd06d515db9afb04a74bf6c.zip |
Use C99 initializers for the various FOO_METHOD structs. More readable, and
avoid unreadable/unmaintainable constructs like that:
const EVP_PKEY_ASN1_METHOD cmac_asn1_meth =
{
EVP_PKEY_CMAC,
EVP_PKEY_CMAC,
0,
"CMAC",
"OpenSSL CMAC method",
0,0,0,0,
0,0,0,
cmac_size,
0,
0,0,0,0,0,0,0,
cmac_key_free,
0,
0,0
};
ok matthew@ deraadt@
Diffstat (limited to 'src/lib/libcrypto/asn1')
-rw-r--r-- | src/lib/libcrypto/asn1/bio_asn1.c | 20 | ||||
-rw-r--r-- | src/lib/libcrypto/asn1/x_crl.c | 7 |
2 files changed, 12 insertions, 15 deletions
diff --git a/src/lib/libcrypto/asn1/bio_asn1.c b/src/lib/libcrypto/asn1/bio_asn1.c index 36b82758ed..327355eeda 100644 --- a/src/lib/libcrypto/asn1/bio_asn1.c +++ b/src/lib/libcrypto/asn1/bio_asn1.c | |||
@@ -124,16 +124,16 @@ static int asn1_bio_setup_ex(BIO *b, BIO_ASN1_BUF_CTX *ctx, | |||
124 | asn1_bio_state_t other_state); | 124 | asn1_bio_state_t other_state); |
125 | 125 | ||
126 | static BIO_METHOD methods_asn1 = { | 126 | static BIO_METHOD methods_asn1 = { |
127 | BIO_TYPE_ASN1, | 127 | .type = BIO_TYPE_ASN1, |
128 | "asn1", | 128 | .name = "asn1", |
129 | asn1_bio_write, | 129 | .bwrite = asn1_bio_write, |
130 | asn1_bio_read, | 130 | .bread = asn1_bio_read, |
131 | asn1_bio_puts, | 131 | .bputs = asn1_bio_puts, |
132 | asn1_bio_gets, | 132 | .bgets = asn1_bio_gets, |
133 | asn1_bio_ctrl, | 133 | .ctrl = asn1_bio_ctrl, |
134 | asn1_bio_new, | 134 | .create = asn1_bio_new, |
135 | asn1_bio_free, | 135 | .destroy = asn1_bio_free, |
136 | asn1_bio_callback_ctrl, | 136 | .callback_ctrl = asn1_bio_callback_ctrl |
137 | }; | 137 | }; |
138 | 138 | ||
139 | BIO_METHOD * | 139 | BIO_METHOD * |
diff --git a/src/lib/libcrypto/asn1/x_crl.c b/src/lib/libcrypto/asn1/x_crl.c index 674cca4a1c..097a39c4d1 100644 --- a/src/lib/libcrypto/asn1/x_crl.c +++ b/src/lib/libcrypto/asn1/x_crl.c | |||
@@ -78,11 +78,8 @@ static int def_crl_lookup(X509_CRL *crl, X509_REVOKED **ret, | |||
78 | ASN1_INTEGER *serial, X509_NAME *issuer); | 78 | ASN1_INTEGER *serial, X509_NAME *issuer); |
79 | 79 | ||
80 | static X509_CRL_METHOD int_crl_meth = { | 80 | static X509_CRL_METHOD int_crl_meth = { |
81 | 0, | 81 | .crl_lookup = def_crl_lookup, |
82 | 0, | 82 | .crl_verify = def_crl_verify |
83 | 0, | ||
84 | def_crl_lookup, | ||
85 | def_crl_verify | ||
86 | }; | 83 | }; |
87 | 84 | ||
88 | static const X509_CRL_METHOD *default_crl_method = &int_crl_meth; | 85 | static const X509_CRL_METHOD *default_crl_method = &int_crl_meth; |