提交 374d543f 编写于 作者: R Richard Levitte

Small fixes of cryptodev engine

- guard CRYPTO_3DES_CBC
- add a missing cast
Reviewed-by: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2203)
上级 290a0419
...@@ -176,7 +176,9 @@ static struct { ...@@ -176,7 +176,9 @@ static struct {
} ciphers[] = { } ciphers[] = {
{CRYPTO_ARC4, NID_rc4, 0, 16}, {CRYPTO_ARC4, NID_rc4, 0, 16},
{CRYPTO_DES_CBC, NID_des_cbc, 8, 8}, {CRYPTO_DES_CBC, NID_des_cbc, 8, 8},
# if !defined(CRYPTO_ALGORITHM_MIN) || defined(CRYPTO_3DES_CBC)
{CRYPTO_3DES_CBC, NID_des_ede3_cbc, 8, 24}, {CRYPTO_3DES_CBC, NID_des_ede3_cbc, 8, 24},
# endif
# if !defined(CRYPTO_ALGORITHM_MIN) || defined(CRYPTO_3DES_ECB) # if !defined(CRYPTO_ALGORITHM_MIN) || defined(CRYPTO_3DES_ECB)
{CRYPTO_3DES_ECB, NID_des_ede3_ecb, 0, 24}, {CRYPTO_3DES_ECB, NID_des_ede3_ecb, 0, 24},
# endif # endif
...@@ -1144,7 +1146,7 @@ static int cryptodev_digest_final(EVP_MD_CTX *ctx, unsigned char *md) ...@@ -1144,7 +1146,7 @@ static int cryptodev_digest_final(EVP_MD_CTX *ctx, unsigned char *md)
cryp.ses = sess->ses; cryp.ses = sess->ses;
cryp.flags = 0; cryp.flags = 0;
cryp.len = state->mac_len; cryp.len = state->mac_len;
cryp.src = state->mac_data; cryp.src = (void *)state->mac_data;
cryp.dst = NULL; cryp.dst = NULL;
cryp.mac = (void *)md; cryp.mac = (void *)md;
if (ioctl(state->d_fd, CIOCCRYPT, &cryp) < 0) { if (ioctl(state->d_fd, CIOCCRYPT, &cryp) < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册