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