summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/bio_enc.c
diff options
context:
space:
mode:
authormiod <>2014-04-27 20:26:49 +0000
committermiod <>2014-04-27 20:26:49 +0000
commit45bb7f0ae87ddf787dd06d515db9afb04a74bf6c (patch)
tree319f4236c4f33e8d28d3d3a51c99e82d996e948f /src/lib/libcrypto/evp/bio_enc.c
parentcbbb78bcf8e4dca14564fbea5fdfe0703e2951cc (diff)
downloadopenbsd-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/evp/bio_enc.c')
-rw-r--r--src/lib/libcrypto/evp/bio_enc.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/lib/libcrypto/evp/bio_enc.c b/src/lib/libcrypto/evp/bio_enc.c
index 8fe9a45e48..3362c25768 100644
--- a/src/lib/libcrypto/evp/bio_enc.c
+++ b/src/lib/libcrypto/evp/bio_enc.c
@@ -87,18 +87,16 @@ typedef struct enc_struct
87 char buf[ENC_BLOCK_SIZE+BUF_OFFSET+2]; 87 char buf[ENC_BLOCK_SIZE+BUF_OFFSET+2];
88 } BIO_ENC_CTX; 88 } BIO_ENC_CTX;
89 89
90static BIO_METHOD methods_enc= 90static BIO_METHOD methods_enc= {
91 { 91 .type = BIO_TYPE_CIPHER,
92 BIO_TYPE_CIPHER,"cipher", 92 .name = "cipher",
93 enc_write, 93 .bwrite = enc_write,
94 enc_read, 94 .bread = enc_read,
95 NULL, /* enc_puts, */ 95 .ctrl = enc_ctrl,
96 NULL, /* enc_gets, */ 96 .create = enc_new,
97 enc_ctrl, 97 .destroy = enc_free,
98 enc_new, 98 .callback_ctrl = enc_callback_ctrl
99 enc_free, 99};
100 enc_callback_ctrl,
101 };
102 100
103BIO_METHOD *BIO_f_cipher(void) 101BIO_METHOD *BIO_f_cipher(void)
104 { 102 {