From: Marco Varlese Date: Mon, 12 Feb 2018 08:08:21 +0000 (+0100) Subject: SCTP: fix build errors on ubuntu bionic X-Git-Tag: v18.04-rc1~338 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=18b631560b17d5fd143c87d77f86a371cb93e6d8;p=vpp.git SCTP: fix build errors on ubuntu bionic Change-Id: I070771794be92fd9a6e800ca0022e52d592cd1a4 Signed-off-by: Marco Varlese --- diff --git a/src/vnet/sctp/sctp_output.c b/src/vnet/sctp/sctp_output.c index 276d7e70213..7657d0cd1e9 100644 --- a/src/vnet/sctp/sctp_output.c +++ b/src/vnet/sctp/sctp_output.c @@ -503,13 +503,12 @@ sctp_compute_mac (sctp_connection_t * sctp_conn, HMAC_CTX *ctx; #else HMAC_CTX ctx; - const EVP_MD *md = EVP_sha1 (); #endif unsigned int len = 0; - + const EVP_MD *md = EVP_sha1 (); #if OPENSSL_VERSION_NUMBER >= 0x10100000L ctx = HMAC_CTX_new (); - HMAC_Init_ex (&ctx, &state_cookie->creation_time, + HMAC_Init_ex (ctx, &state_cookie->creation_time, sizeof (state_cookie->creation_time), md, NULL); HMAC_Update (ctx, (const unsigned char *) &sctp_conn, sizeof (sctp_conn)); HMAC_Final (ctx, state_cookie->mac, &len); @@ -517,7 +516,6 @@ sctp_compute_mac (sctp_connection_t * sctp_conn, HMAC_CTX_init (&ctx); HMAC_Init_ex (&ctx, &state_cookie->creation_time, sizeof (state_cookie->creation_time), md, NULL); - HMAC_Update (&ctx, (const unsigned char *) &sctp_conn, sizeof (sctp_conn)); HMAC_Final (&ctx, state_cookie->mac, &len); HMAC_CTX_cleanup (&ctx);