if (t->meth) {
t->ntests++;
if (t->skip) {
+ t->meth = tmeth;
t->nskip++;
return 1;
}
const EVP_MD *digest;
struct digest_data *mdat = t->data;
digest = EVP_get_digestbyname(alg);
- if (!digest)
+ if (!digest) {
+ /* If alg has an OID assume disabled algorithm */
+ if (OBJ_sn2nid(alg) != NID_undef || OBJ_ln2nid(alg) != NID_undef) {
+ t->skip = 1;
+ return 1;
+ }
return 0;
+ }
mdat = OPENSSL_malloc(sizeof(struct digest_data));
mdat->digest = digest;
mdat->input = NULL;
const EVP_CIPHER *cipher;
struct cipher_data *cdat = t->data;
cipher = EVP_get_cipherbyname(alg);
- if (!cipher)
+ 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;
+ }
return 0;
+ }
cdat = OPENSSL_malloc(sizeof(struct cipher_data));
cdat->cipher = cipher;
cdat->enc = -1;