summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/bio_b64.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_b64.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_b64.c')
-rw-r--r--src/lib/libcrypto/evp/bio_b64.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/lib/libcrypto/evp/bio_b64.c b/src/lib/libcrypto/evp/bio_b64.c
index 27fc587ca8..02631ec05a 100644
--- a/src/lib/libcrypto/evp/bio_b64.c
+++ b/src/lib/libcrypto/evp/bio_b64.c
@@ -91,18 +91,17 @@ typedef struct b64_struct
91 char tmp[B64_BLOCK_SIZE]; 91 char tmp[B64_BLOCK_SIZE];
92 } BIO_B64_CTX; 92 } BIO_B64_CTX;
93 93
94static BIO_METHOD methods_b64= 94static BIO_METHOD methods_b64= {
95 { 95 .type = BIO_TYPE_BASE64,
96 BIO_TYPE_BASE64,"base64 encoding", 96 .name = "base64 encoding",
97 b64_write, 97 .bwrite = b64_write,
98 b64_read, 98 .bread = b64_read,
99 b64_puts, 99 .bputs = b64_puts,
100 NULL, /* b64_gets, */ 100 .ctrl = b64_ctrl,
101 b64_ctrl, 101 .create = b64_new,
102 b64_new, 102 .destroy = b64_free,
103 b64_free, 103 .callback_ctrl = b64_callback_ctrl
104 b64_callback_ctrl, 104};
105 };
106 105
107BIO_METHOD *BIO_f_base64(void) 106BIO_METHOD *BIO_f_base64(void)
108 { 107 {