Skip to content

Commit

Permalink
fix bz#1934: newer OpenSSL versions will require HMAC_CTX_Init before
Browse files Browse the repository at this point in the history
HMAC_init (this change in policy seems insane to me)
ok dtucker@
  • Loading branch information
djm committed Dec 2, 2011
1 parent 5efde69 commit 4fe32cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ssh/mac.c
@@ -1,4 +1,4 @@
/* $OpenBSD: mac.c,v 1.16 2011/08/02 01:22:11 djm Exp $ */
/* $OpenBSD: mac.c,v 1.17 2011/12/02 00:43:57 djm Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
*
Expand Down Expand Up @@ -111,6 +111,7 @@ mac_init(Mac *mac)
case SSH_EVP:
if (mac->evp_md == NULL)
return -1;
HMAC_CTX_init(&mac->evp_ctx);
HMAC_Init(&mac->evp_ctx, mac->key, mac->key_len, mac->evp_md);
return 0;
case SSH_UMAC:
Expand Down

0 comments on commit 4fe32cd

Please sign in to comment.