crypto.c (ntp-4.2.8p14) | : | crypto.c (ntp-4.2.8p15) | ||
---|---|---|---|---|
skipping to change at line 73 | skipping to change at line 73 | |||
} | } | |||
else if (!CMAC_Update(ctx, pkt_data, (size_t)pkt_size)) { | else if (!CMAC_Update(ctx, pkt_data, (size_t)pkt_size)) { | |||
msyslog(LOG_ERR, "make_mac: CMAC %s Update failed.", C MAC); | msyslog(LOG_ERR, "make_mac: CMAC %s Update failed.", C MAC); | |||
} | } | |||
else if (!CMAC_Final(ctx, digest, &slen)) { | else if (!CMAC_Final(ctx, digest, &slen)) { | |||
msyslog(LOG_ERR, "make_mac: CMAC %s Final failed.", C MAC); | msyslog(LOG_ERR, "make_mac: CMAC %s Final failed.", C MAC); | |||
slen = 0; | slen = 0; | |||
} | } | |||
len = (u_int)slen; | len = (u_int)slen; | |||
CMAC_CTX_cleanup(ctx); | if (ctx) | |||
CMAC_CTX_free(ctx); | ||||
/* Test our AES-128-CMAC implementation */ | /* Test our AES-128-CMAC implementation */ | |||
} else /* MD5 MAC handling */ | } else /* MD5 MAC handling */ | |||
#endif | #endif | |||
{ | { | |||
EVP_MD_CTX * ctx; | EVP_MD_CTX * ctx; | |||
if (!(ctx = EVP_MD_CTX_new())) { | if (!(ctx = EVP_MD_CTX_new())) { | |||
msyslog(LOG_ERR, "make_mac: MAC %s Digest CTX new failed. ", | msyslog(LOG_ERR, "make_mac: MAC %s Digest CTX new failed. ", | |||
macname); | macname); | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 2 lines changed or added |