]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Check if RSASHA1 is supported by the OS
authorMark Andrews <marka@isc.org>
Wed, 20 Jul 2022 06:18:41 +0000 (16:18 +1000)
committerMichal Nowak <mnowak@isc.org>
Tue, 9 Aug 2022 14:22:19 +0000 (16:22 +0200)
tests/dns/Krsa.+008+29238.key [moved from tests/dns/Krsa.+005+29235.key with 89% similarity]
tests/dns/Makefile.am
tests/dns/rsa_test.c

similarity index 89%
rename from tests/dns/Krsa.+005+29235.key
rename to tests/dns/Krsa.+008+29238.key
index e2d81e79dbd1f415c932aa21ae32cf386a1fe77e..8a0906719731bd9112e6c75e6f8115bfe4c3cf5f 100644 (file)
@@ -2,4 +2,4 @@
 ; Created: 20160819191802 (Fri Aug 19 21:18:02 2016)
 ; Publish: 20160819191802 (Fri Aug 19 21:18:02 2016)
 ; Activate: 20160819191802 (Fri Aug 19 21:18:02 2016)
-rsa. IN DNSKEY 256 3 5 AwEAAdLT1R3qiqCqll3Xzh2qFMvehQ9FODsPftw5U4UjB3QwnJ/3+dph 9kZBBeaJagUBVYzoArk6XNydpp3HhSCFDcIiepL6r8XAifW3SqI1KCne OD38kSCl/Qm9P0+3CFWokGVubsSQ+3dpQZxqx5bzOXthbuzAr6X+gDUE LAyHtCQNmJ+4ktdCoj3DNYW0z/xLvrcB2Lns7H+/qWnGPL4f3hr7Vbak Oeay+4J4KGdY2LFxJUVts6QrgAA8gz4mV9YIJFP+C4B3b/Z7qgqZRxmT 0pic+fJC5+sq0l8KwavPn0n+HqVuJNvppVKMdTbsmmuk69RFGMjbFkP7 tnCiqC9Zi6s=
+rsa. IN DNSKEY 256 3 8 AwEAAdLT1R3qiqCqll3Xzh2qFMvehQ9FODsPftw5U4UjB3QwnJ/3+dph 9kZBBeaJagUBVYzoArk6XNydpp3HhSCFDcIiepL6r8XAifW3SqI1KCne OD38kSCl/Qm9P0+3CFWokGVubsSQ+3dpQZxqx5bzOXthbuzAr6X+gDUE LAyHtCQNmJ+4ktdCoj3DNYW0z/xLvrcB2Lns7H+/qWnGPL4f3hr7Vbak Oeay+4J4KGdY2LFxJUVts6QrgAA8gz4mV9YIJFP+C4B3b/Z7qgqZRxmT 0pic+fJC5+sq0l8KwavPn0n+HqVuJNvppVKMdTbsmmuk69RFGMjbFkP7 tnCiqC9Zi6s=
index a467ef0f97344c495a58492dcfd4ac6eed61853f..25f593b3b309095e5d7e1a212fd9d71ceb895f68 100644 (file)
@@ -116,7 +116,7 @@ testdata/master/master18.data: testdata/master/master18.data.in
 
 EXTRA_DIST =                   \
        Kdh.+002+18602.key      \
-       Krsa.+005+29235.key     \
+       Krsa.+008+29238.key     \
        comparekeys             \
        mkraw.pl                \
        testdata                \
index bebe68139d07ca2806a20ae5d56d05de55c8aa95..40652541f5fb03287b47166ed3ddba88657bfde4 100644 (file)
@@ -150,27 +150,30 @@ ISC_RUN_TEST_IMPL(isc_rsa_verify) {
        ret = dns_name_fromtext(name, &buf, NULL, 0, NULL);
        assert_int_equal(ret, ISC_R_SUCCESS);
 
-       ret = dst_key_fromfile(name, 29235, DST_ALG_RSASHA1, DST_TYPE_PUBLIC,
+       ret = dst_key_fromfile(name, 29238, DST_ALG_RSASHA256, DST_TYPE_PUBLIC,
                               TESTS_DIR, mctx, &key);
        assert_int_equal(ret, ISC_R_SUCCESS);
 
-       /* RSASHA1 */
+       /* RSASHA1 - May not be supported by the OS */
+       if (dst_algorithm_supported(DST_ALG_RSASHA1)) {
+               key->key_alg = DST_ALG_RSASHA1;
 
-       ret = dst_context_create(key, mctx, DNS_LOGCATEGORY_DNSSEC, false, 0,
-                                &ctx);
-       assert_int_equal(ret, ISC_R_SUCCESS);
+               ret = dst_context_create(key, mctx, DNS_LOGCATEGORY_DNSSEC,
+                                        false, 0, &ctx);
+               assert_int_equal(ret, ISC_R_SUCCESS);
 
-       r.base = d;
-       r.length = 10;
-       ret = dst_context_adddata(ctx, &r);
-       assert_int_equal(ret, ISC_R_SUCCESS);
+               r.base = d;
+               r.length = 10;
+               ret = dst_context_adddata(ctx, &r);
+               assert_int_equal(ret, ISC_R_SUCCESS);
 
-       r.base = sigsha1;
-       r.length = 256;
-       ret = dst_context_verify(ctx, &r);
-       assert_int_equal(ret, ISC_R_SUCCESS);
+               r.base = sigsha1;
+               r.length = 256;
+               ret = dst_context_verify(ctx, &r);
+               assert_int_equal(ret, ISC_R_SUCCESS);
 
-       dst_context_destroy(&ctx);
+               dst_context_destroy(&ctx);
+       }
 
        /* RSASHA256 */