diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2015-02-26 19:58:20 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2015-02-27 00:18:10 +0000 |
commit | 578ce42d354b1b0411e9069883c23c7770a567be (patch) | |
tree | a88226a3558e477bb8815d56afb7d90c6ca8cf73 /crypto | |
parent | 7406e3239663850d25005b3aee912a3cf8aa330e (diff) |
Skip unsupported digests in evp_test
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/evp/evp_test.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crypto/evp/evp_test.c b/crypto/evp/evp_test.c index 9726993163..44375bfa6a 100644 --- a/crypto/evp/evp_test.c +++ b/crypto/evp/evp_test.c @@ -290,6 +290,7 @@ static int setup_test(struct evp_test *t, const struct evp_test_method *tmeth) if (t->meth) { t->ntests++; if (t->skip) { + t->meth = tmeth; t->nskip++; return 1; } @@ -543,8 +544,14 @@ static int digest_test_init(struct evp_test *t, const char *alg) 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; |