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/engine/eng_rdrand.c | |
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/engine/eng_rdrand.c')
-rw-r--r-- | src/lib/libcrypto/engine/eng_rdrand.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/lib/libcrypto/engine/eng_rdrand.c b/src/lib/libcrypto/engine/eng_rdrand.c index 4e9e91d54b..ba1b5bfbff 100644 --- a/src/lib/libcrypto/engine/eng_rdrand.c +++ b/src/lib/libcrypto/engine/eng_rdrand.c | |||
@@ -84,15 +84,11 @@ static int get_random_bytes (unsigned char *buf, int num) | |||
84 | static int random_status (void) | 84 | static int random_status (void) |
85 | { return 1; } | 85 | { return 1; } |
86 | 86 | ||
87 | static RAND_METHOD rdrand_meth = | 87 | static RAND_METHOD rdrand_meth = { |
88 | { | 88 | .bytes = get_random_bytes, |
89 | NULL, /* seed */ | 89 | .pseudorand = get_random_bytes, |
90 | get_random_bytes, | 90 | .status = random_status |
91 | NULL, /* cleanup */ | 91 | }; |
92 | NULL, /* add */ | ||
93 | get_random_bytes, | ||
94 | random_status, | ||
95 | }; | ||
96 | 92 | ||
97 | static int rdrand_init(ENGINE *e) | 93 | static int rdrand_init(ENGINE *e) |
98 | { return 1; } | 94 | { return 1; } |