Reviewed-by: Matt Caswell <matt@openssl.org>
const EVP_CIPHER *cipher;
struct cipher_data *cdat = t->data;
cipher = EVP_get_cipherbyname(alg);
const EVP_CIPHER *cipher;
struct cipher_data *cdat = t->data;
cipher = EVP_get_cipherbyname(alg);
+ if (!cipher) {
+ /* If alg has an OID assume disabled algorithm */
+ if (OBJ_sn2nid(alg) != NID_undef || OBJ_ln2nid(alg) != NID_undef) {
+ t->skip = 1;
+ return 1;
+ }
cdat = OPENSSL_malloc(sizeof(struct cipher_data));
cdat->cipher = cipher;
cdat->enc = -1;
cdat = OPENSSL_malloc(sizeof(struct cipher_data));
cdat->cipher = cipher;
cdat->enc = -1;