|
|
cf16a9 |
From 1241f2005d08673c28a595c5a6cd61350b95a929 Mon Sep 17 00:00:00 2001
|
|
|
cf16a9 |
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
|
|
|
cf16a9 |
Date: Tue, 2 Jan 2018 18:13:07 +0100
|
|
|
cf16a9 |
Subject: [PATCH] Fix pkcs11 variants atf tests
|
|
|
cf16a9 |
|
|
|
cf16a9 |
Add dns-pkcs11 tests Makefile to configure
|
|
|
cf16a9 |
|
|
|
cf16a9 |
Add pkcs11 Kyuafile, fix dh_test to pass in pkcs11 mode
|
|
|
cf16a9 |
---
|
|
|
cf16a9 |
configure.ac | 1 +
|
|
|
cf16a9 |
lib/Kyuafile | 2 ++
|
|
|
cf16a9 |
lib/dns-pkcs11/tests/dh_test.c | 3 ++-
|
|
|
cf16a9 |
3 files changed, 5 insertions(+), 1 deletion(-)
|
|
|
cf16a9 |
|
|
|
cf16a9 |
diff --git a/configure.ac b/configure.ac
|
|
|
cf16a9 |
index d80ae31..0fb9328 100644
|
|
|
cf16a9 |
--- a/configure.ac
|
|
|
cf16a9 |
+++ b/configure.ac
|
|
|
cf16a9 |
@@ -3090,6 +3090,7 @@ AC_CONFIG_FILES([
|
|
|
cf16a9 |
lib/dns-pkcs11/include/Makefile
|
|
|
cf16a9 |
lib/dns-pkcs11/include/dns/Makefile
|
|
|
cf16a9 |
lib/dns-pkcs11/include/dst/Makefile
|
|
|
cf16a9 |
+ lib/dns-pkcs11/tests/Makefile
|
|
|
cf16a9 |
lib/irs/Makefile
|
|
|
cf16a9 |
lib/irs/include/Makefile
|
|
|
cf16a9 |
lib/irs/include/irs/Makefile
|
|
|
cf16a9 |
diff --git a/lib/Kyuafile b/lib/Kyuafile
|
|
|
cf16a9 |
index 39ce986..037e5ef 100644
|
|
|
cf16a9 |
--- a/lib/Kyuafile
|
|
|
cf16a9 |
+++ b/lib/Kyuafile
|
|
|
cf16a9 |
@@ -2,8 +2,10 @@ syntax(2)
|
|
|
cf16a9 |
test_suite('bind9')
|
|
|
cf16a9 |
|
|
|
cf16a9 |
include('dns/Kyuafile')
|
|
|
cf16a9 |
+include('dns-pkcs11/Kyuafile')
|
|
|
cf16a9 |
include('irs/Kyuafile')
|
|
|
cf16a9 |
include('isc/Kyuafile')
|
|
|
cf16a9 |
include('isccc/Kyuafile')
|
|
|
cf16a9 |
include('isccfg/Kyuafile')
|
|
|
cf16a9 |
include('ns/Kyuafile')
|
|
|
cf16a9 |
+include('ns-pkcs11/Kyuafile')
|
|
|
cf16a9 |
diff --git a/lib/dns-pkcs11/tests/dh_test.c b/lib/dns-pkcs11/tests/dh_test.c
|
|
|
cf16a9 |
index 934e8fd..658d1af 100644
|
|
|
cf16a9 |
--- a/lib/dns-pkcs11/tests/dh_test.c
|
|
|
cf16a9 |
+++ b/lib/dns-pkcs11/tests/dh_test.c
|
|
|
cf16a9 |
@@ -87,7 +87,8 @@ dh_computesecret(void **state) {
|
|
|
cf16a9 |
result = dst_key_computesecret(key, key, &buf;;
|
|
|
cf16a9 |
assert_int_equal(result, DST_R_NOTPRIVATEKEY);
|
|
|
cf16a9 |
result = key->func->computesecret(key, key, &buf;;
|
|
|
cf16a9 |
- assert_int_equal(result, DST_R_COMPUTESECRETFAILURE);
|
|
|
cf16a9 |
+ /* PKCS11 variant gives different result, accept both */
|
|
|
cf16a9 |
+ assert_true(result == DST_R_COMPUTESECRETFAILURE || result == DST_R_INVALIDPRIVATEKEY);
|
|
|
cf16a9 |
|
|
|
cf16a9 |
dst_key_free(&key);
|
|
|
cf16a9 |
}
|
|
|
cf16a9 |
--
|
|
|
cf16a9 |
2.20.1
|
|
|
cf16a9 |
|