mirror of https://github.com/openssl/openssl.git
Enabled vpsm4_(ex)_cbc back on decryption.
This commit is contained in:
parent
76a4235e2c
commit
cc0c6261fd
|
|
@ -85,19 +85,23 @@ static int cipher_hw_sm4_initkey(PROV_CIPHER_CTX *ctx,
|
|||
} else
|
||||
#endif
|
||||
#ifdef VPSM4_EX_CAPABLE
|
||||
if (VPSM4_EX_CAPABLE && (ctx->mode != EVP_CIPH_CBC_MODE)) {
|
||||
if (VPSM4_EX_CAPABLE) {
|
||||
vpsm4_ex_set_decrypt_key(key, ks);
|
||||
ctx->block = (block128_f)vpsm4_ex_decrypt;
|
||||
ctx->stream.cbc = NULL;
|
||||
if (ctx->mode == EVP_CIPH_CBC_MODE)
|
||||
ctx->stream.cbc = (cbc128_f)vpsm4_ex_cbc_encrypt;
|
||||
if (ctx->mode == EVP_CIPH_ECB_MODE)
|
||||
ctx->stream.ecb = (ecb128_f)vpsm4_ex_ecb_encrypt;
|
||||
} else
|
||||
#endif
|
||||
#ifdef VPSM4_CAPABLE
|
||||
if (VPSM4_CAPABLE && (ctx->mode != EVP_CIPH_CBC_MODE)) {
|
||||
if (VPSM4_CAPABLE) {
|
||||
vpsm4_set_decrypt_key(key, ks);
|
||||
ctx->block = (block128_f)vpsm4_decrypt;
|
||||
ctx->stream.cbc = NULL;
|
||||
if (ctx->mode == EVP_CIPH_CBC_MODE)
|
||||
ctx->stream.cbc = (cbc128_f)vpsm4_cbc_encrypt;
|
||||
if (ctx->mode == EVP_CIPH_ECB_MODE)
|
||||
ctx->stream.ecb = (ecb128_f)vpsm4_ecb_encrypt;
|
||||
} else
|
||||
|
|
|
|||
Loading…
Reference in New Issue