X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/7b83389d47d53105c1c52b551033706b3d62e744..6851a9c5760767525e7586051c42be49342ed0f0:/src/src/hash.c diff --git a/src/src/hash.c b/src/src/hash.c index 059e6d9bb..bde22b26a 100644 --- a/src/src/hash.c +++ b/src/src/hash.c @@ -25,7 +25,7 @@ typedef struct sha1 { sha1; #endif /*STAND_ALONE*/ - +#include /******************************************************************************/ #ifdef SHA_OPENSSL @@ -50,6 +50,9 @@ switch (h->method) { case HASH_SHA1: SHA1_Update (&h->u.sha1, data, len); break; case HASH_SHA256: SHA256_Update(&h->u.sha2, data, len); break; + /* should be blocked by init not handling these, but be explicit to + guard against accidents later (and hush up clang -Wswitch) */ + default: assert(0); } } @@ -62,6 +65,7 @@ switch (h->method) { case HASH_SHA1: SHA1_Final (b->data, &h->u.sha1); break; case HASH_SHA256: SHA256_Final(b->data, &h->u.sha2); break; + default: assert(0); } }