mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 11:44:38 +02:00
add EVP_Cipher with AES Counter
This commit is contained in:
committed by
Jacob Barthelmeh
parent
aed9b2d3bb
commit
de91e7df03
@@ -10104,6 +10104,7 @@ int wolfSSL_set_compression(WOLFSSL* ssl)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NO_AES
|
#ifndef NO_AES
|
||||||
|
printf("cipherType=%d\n", ctx->cipherType);
|
||||||
if (ctx->cipherType == AES_128_CBC_TYPE ||
|
if (ctx->cipherType == AES_128_CBC_TYPE ||
|
||||||
(type && XSTRNCMP(type, EVP_AES_128_CBC, EVP_AES_SIZE) == 0)) {
|
(type && XSTRNCMP(type, EVP_AES_128_CBC, EVP_AES_SIZE) == 0)) {
|
||||||
WOLFSSL_MSG(EVP_AES_128_CBC);
|
WOLFSSL_MSG(EVP_AES_128_CBC);
|
||||||
@@ -10175,7 +10176,7 @@ int wolfSSL_set_compression(WOLFSSL* ssl)
|
|||||||
ctx->enc = enc ? 1 : 0;
|
ctx->enc = enc ? 1 : 0;
|
||||||
if (key) {
|
if (key) {
|
||||||
ret = wc_AesSetKey(&ctx->cipher.aes, key, ctx->keyLen, iv,
|
ret = wc_AesSetKey(&ctx->cipher.aes, key, ctx->keyLen, iv,
|
||||||
ctx->enc ? AES_ENCRYPTION : AES_DECRYPTION));
|
AES_ENCRYPTION);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -10195,7 +10196,7 @@ int wolfSSL_set_compression(WOLFSSL* ssl)
|
|||||||
ctx->enc = enc ? 1 : 0;
|
ctx->enc = enc ? 1 : 0;
|
||||||
if (key) {
|
if (key) {
|
||||||
ret = wc_AesSetKey(&ctx->cipher.aes, key, ctx->keyLen, iv,
|
ret = wc_AesSetKey(&ctx->cipher.aes, key, ctx->keyLen, iv,
|
||||||
ctx->enc ? AES_ENCRYPTION : AES_DECRYPTION));
|
AES_ENCRYPTION);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -10215,7 +10216,7 @@ int wolfSSL_set_compression(WOLFSSL* ssl)
|
|||||||
ctx->enc = enc ? 1 : 0;
|
ctx->enc = enc ? 1 : 0;
|
||||||
if (key) {
|
if (key) {
|
||||||
ret = wc_AesSetKey(&ctx->cipher.aes, key, ctx->keyLen, iv,
|
ret = wc_AesSetKey(&ctx->cipher.aes, key, ctx->keyLen, iv,
|
||||||
ctx->enc ? AES_ENCRYPTION : AES_DECRYPTION));
|
AES_ENCRYPTION);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user