32 lines
1.0 KiB
Diff
32 lines
1.0 KiB
Diff
|
From 34965d85fecd73bbd750e63a29d6db743759d240 Mon Sep 17 00:00:00 2001
|
||
|
From: Juergen Christ <jchrist@linux.ibm.com>
|
||
|
Date: Mon, 31 May 2021 18:00:07 +0200
|
||
|
Subject: [PATCH] Skip eckey test if needed.
|
||
|
|
||
|
Without crypto cards on a machine < z15, ibmca might not register with the
|
||
|
EC_KEY subsystem of OpenSSL. In these cases, the eckey test should be skipped
|
||
|
since it is doomed to fail.
|
||
|
|
||
|
Fixes #69.
|
||
|
|
||
|
Signed-off-by: Juergen Christ <jchrist@linux.ibm.com>
|
||
|
---
|
||
|
test/eckey.c | 4 ++++
|
||
|
1 file changed, 4 insertions(+)
|
||
|
|
||
|
diff --git a/test/eckey.c b/test/eckey.c
|
||
|
index 35b3df2..6d0870b 100644
|
||
|
--- a/test/eckey.c
|
||
|
+++ b/test/eckey.c
|
||
|
@@ -44,6 +44,10 @@ int check_eckey(int nid, const char *name)
|
||
|
fprintf(stderr, "ibmca engine not loaded\n");
|
||
|
goto out;
|
||
|
}
|
||
|
+ if (ENGINE_get_EC(engine) == NULL) {
|
||
|
+ fprintf(stderr, "ibmca does not support EC_KEY. Skipping...\n");
|
||
|
+ exit(77);
|
||
|
+ }
|
||
|
eckey = EC_KEY_new_by_curve_name(nid);
|
||
|
if (eckey == NULL) {
|
||
|
/* curve not supported => test passed */
|