mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +03:00
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>
This commit is contained in:
committed by
Jakub Jelen
parent
8eb15e5cff
commit
1991bdac0d
@@ -454,17 +454,10 @@ void hmac_update(HMACCTX ctx, const void *data, unsigned long len) {
|
|||||||
HMAC_Update(ctx, data, len);
|
HMAC_Update(ctx, data, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
void hmac_final(HMACCTX ctx, unsigned char *hashmacbuf, unsigned int *len) {
|
void hmac_final(HMACCTX ctx, unsigned char *hashmacbuf, unsigned int *len)
|
||||||
|
{
|
||||||
HMAC_Final(ctx, hashmacbuf, len);
|
HMAC_Final(ctx, hashmacbuf, len);
|
||||||
|
|
||||||
#if OPENSSL_VERSION_NUMBER > 0x10100000L
|
|
||||||
HMAC_CTX_free(ctx);
|
HMAC_CTX_free(ctx);
|
||||||
ctx = NULL;
|
|
||||||
#else
|
|
||||||
HMAC_cleanup(ctx);
|
|
||||||
SAFE_FREE(ctx);
|
|
||||||
ctx = NULL;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void evp_cipher_init(struct ssh_cipher_struct *cipher) {
|
static void evp_cipher_init(struct ssh_cipher_struct *cipher) {
|
||||||
|
|||||||
Reference in New Issue
Block a user