openssl: make it use 'shortcut' function HMAC()
authorEugene Crosser <evgenii.cherkashin@profitbricks.com>
Wed, 15 Aug 2018 16:31:37 +0000 (18:31 +0200)
committerEugene Crosser <evgenii.cherkashin@profitbricks.com>
Wed, 15 Aug 2018 16:31:37 +0000 (18:31 +0200)
Actually, we may avoid the complexity of managing HMAC_CTX by
using "convenience" function HMAC() instead of CTX-based family.
In this form, the program compiles against openssl 1.1.x (but
the configure option "--disable-openssl" is kept in case someone
dislikes openssl).

Signed-off-by: Eugene Crosser <evgenii.cherkashin@profitbricks.com>
ossl_crypto.c

index e0e10bce4e3a7b59a98a4819a383d4cc2489b640..4cf0afae3572088262bc3523eb02d5ca4718effa 100644 (file)
@@ -75,7 +75,7 @@ static unsigned long ossl_hmac(const void *key, int const keylen,
                        const void *pt, const int tlen,
                        void *tag, int *taglen)
 {
-#if 1
+#if 0
        HMAC_CTX hctx;
 
        HMAC_CTX_init(&hctx);