return 0;
}
- if (ctx->cipher == NULL || ctx->cipher->prov == NULL)
+ if (ctx->cipher == NULL) {
+ EVPerr(EVP_F_EVP_ENCRYPTUPDATE, EVP_R_NO_CIPHER_SET);
+ return 0;
+ }
+
+ if (ctx->cipher->prov == NULL)
goto legacy;
blocksize = EVP_CIPHER_CTX_block_size(ctx);
return 0;
}
- if (ctx->cipher == NULL || ctx->cipher->prov == NULL)
+ if (ctx->cipher == NULL) {
+ EVPerr(EVP_F_EVP_DECRYPTFINAL_EX, EVP_R_NO_CIPHER_SET);
+ return 0;
+ }
+
+ if (ctx->cipher->prov == NULL)
goto legacy;
blocksize = EVP_CIPHER_CTX_block_size(ctx);
legacy:
*outl = 0;
- if (ctx->cipher == NULL) {
- EVPerr(EVP_F_EVP_DECRYPTFINAL_EX, EVP_R_NO_CIPHER_SET);
- return 0;
- }
-
if (ctx->cipher->flags & EVP_CIPH_FLAG_CUSTOM_CIPHER) {
i = ctx->cipher->do_cipher(ctx, out, NULL, 0);
if (i < 0)