Skip to content

Commit

Permalink
Fix OpenSSL ESP HMAC calculation
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Feb 18, 2015
1 parent f2f7bf2 commit 7a86304
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openssl-esp.c
Expand Up @@ -218,7 +218,7 @@ int encrypt_esp_packet(struct openconnect_info *vpninfo, struct pkt *pkt)
}

HMAC_CTX_copy(&hmac_ctx, &vpninfo->esp_out.hmac);
HMAC_Update(&hmac_ctx, (void *)&pkt->esp, sizeof(pkt->esp) + pkt->len);
HMAC_Update(&hmac_ctx, (void *)&pkt->esp, sizeof(pkt->esp) + crypt_len);
HMAC_Final(&hmac_ctx, pkt->data + crypt_len, &hmac_len);
HMAC_CTX_cleanup(&hmac_ctx);

Expand Down

0 comments on commit 7a86304

Please sign in to comment.