summaryrefslogtreecommitdiffstats
path: root/src/crypto/digest/digest_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/digest/digest_test.cc')
-rw-r--r--src/crypto/digest/digest_test.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/crypto/digest/digest_test.cc b/src/crypto/digest/digest_test.cc
index dcb569c..6a6113d 100644
--- a/src/crypto/digest/digest_test.cc
+++ b/src/crypto/digest/digest_test.cc
@@ -233,6 +233,16 @@ static int TestDigest(const TestVector *test) {
return true;
}
+static int TestGetters() {
+ if (EVP_get_digestbyname("RSA-SHA512") == NULL ||
+ EVP_get_digestbyname("sha512WithRSAEncryption") == NULL ||
+ EVP_get_digestbyname("nonsense") != NULL) {
+ return false;
+ }
+
+ return true;
+}
+
int main(void) {
CRYPTO_library_init();
ERR_load_crypto_strings();
@@ -244,6 +254,10 @@ int main(void) {
}
}
+ if (!TestGetters()) {
+ return 1;
+ }
+
printf("PASS\n");
return 0;
}