From e4ba6662215c0efb3ae15b2cde946e8117912524 Mon Sep 17 00:00:00 2001 From: Viktor Dukhovni Date: Mon, 14 Nov 2016 14:55:53 +1100 Subject: [PATCH] hcrypto compiler warnings --- lib/hcrypto/evp-openssl.c | 2 ++ lib/hcrypto/rand.c | 2 +- lib/hcrypto/validate.c | 11 ++++++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/hcrypto/evp-openssl.c b/lib/hcrypto/evp-openssl.c index 5f2a5ab93..d660abe7c 100644 --- a/lib/hcrypto/evp-openssl.c +++ b/lib/hcrypto/evp-openssl.c @@ -407,12 +407,14 @@ get_EVP_MD(heim_base_once_t *once, hc_EVP_MD *hc_memoize, #include "evp-hcrypto.h" #define OSSL_CIPHER_ALGORITHM(name, flags) \ + extern const hc_EVP_CIPHER *hc_EVP_ossl_##name(void); \ const hc_EVP_CIPHER *hc_EVP_ossl_##name(void) \ { \ return hc_EVP_hcrypto_##name(); \ } #define OSSL_MD_ALGORITHM(name) \ + extern const hc_EVP_MD *hc_EVP_ossl_##name(void); \ const hc_EVP_MD *hc_EVP_ossl_##name(void) \ { \ return hc_EVP_hcrypto_##name(); \ diff --git a/lib/hcrypto/rand.c b/lib/hcrypto/rand.c index 3b34b61d2..b3b7ea09c 100644 --- a/lib/hcrypto/rand.c +++ b/lib/hcrypto/rand.c @@ -53,7 +53,7 @@ * See the library functions here: @ref hcrypto_rand */ -const static RAND_METHOD *selected_meth = NULL; +static const RAND_METHOD *selected_meth = NULL; static ENGINE *selected_engine = NULL; static void diff --git a/lib/hcrypto/validate.c b/lib/hcrypto/validate.c index c76245062..562e5aa4d 100644 --- a/lib/hcrypto/validate.c +++ b/lib/hcrypto/validate.c @@ -60,7 +60,8 @@ static struct tests hc_tests[] = { "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 16, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - "\xdc\x95\xc0\x78\xa2\x40\x89\x89\xad\x48\xa2\x14\x92\x84\x20\x87" + "\xdc\x95\xc0\x78\xa2\x40\x89\x89\xad\x48\xa2\x14\x92\x84\x20\x87", + NULL }, #if 0 { @@ -84,7 +85,8 @@ static struct tests hc_tests[] = { "\xbf\x9a\x12\xb7\x26\x69\xfd\x05", 16, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - "\x55\x95\x97\x76\xa9\x6c\x66\x40\x64\xc7\xf4\x1c\x21\xb7\x14\x1b" + "\x55\x95\x97\x76\xa9\x6c\x66\x40\x64\xc7\xf4\x1c\x21\xb7\x14\x1b", + NULL }, #if 0 { @@ -205,7 +207,8 @@ static struct tests hc_tests[] = { "\x89\x21\xc2\xf5\xa4\x63\x93\x8c" "\xe0\x98\x22\x65\xee\xf7\x01\x79" "\xbc\x55\x3f\x33\x9e\xb1\xa4\xc1" - "\xaf\x5f\x6a\x54\x7f" + "\xaf\x5f\x6a\x54\x7f", + NULL } }; @@ -247,8 +250,10 @@ test_cipher(struct tests *t) if (memcmp(d, t->indata, t->datasize) != 0) errx(1, "%s: decrypt not the same", t->name); +#if 0 if (t->outiv) /* XXXX check */; +#endif EVP_CIPHER_CTX_cleanup(&ectx); EVP_CIPHER_CTX_cleanup(&dctx);