aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDirkjan Bussink <d.bussink@gmail.com>2020-12-14 11:58:00 +0100
committerJakub Jelen <jjelen@redhat.com>2021-01-11 10:45:22 +0100
commit1991bdac0da9569c3f1dd416461d5a58fb24dd7d (patch)
tree6dc99b1a44cebe85e4507d474c694ac760908e6f /src
parent8eb15e5cff500d010918bc092bd1fc7423ad6f75 (diff)
downloadlibssh-1991bdac0da9569c3f1dd416461d5a58fb24dd7d.tar.gz
libssh-1991bdac0da9569c3f1dd416461d5a58fb24dd7d.tar.xz
libssh-1991bdac0da9569c3f1dd416461d5a58fb24dd7d.zip
Remove unneeded version conditional
The HMAC_CTX_free function in the compat layer already handles this so there's no need to add conditional logic to the code here. Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcrypto.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/libcrypto.c b/src/libcrypto.c
index 0dc103c3..cf375603 100644
--- a/src/libcrypto.c
+++ b/src/libcrypto.c
@@ -454,17 +454,10 @@ void hmac_update(HMACCTX ctx, const void *data, unsigned long len) {
HMAC_Update(ctx, data, len);
}
-void hmac_final(HMACCTX ctx, unsigned char *hashmacbuf, unsigned int *len) {
- HMAC_Final(ctx,hashmacbuf,len);
-
-#if OPENSSL_VERSION_NUMBER > 0x10100000L
- HMAC_CTX_free(ctx);
- ctx = NULL;
-#else
- HMAC_cleanup(ctx);
- SAFE_FREE(ctx);
- ctx = NULL;
-#endif
+void hmac_final(HMACCTX ctx, unsigned char *hashmacbuf, unsigned int *len)
+{
+ HMAC_Final(ctx, hashmacbuf, len);
+ HMAC_CTX_free(ctx);
}
static void evp_cipher_init(struct ssh_cipher_struct *cipher) {