Dne Po 03.srp.2020 08:02:48, ppisar napsal(a):
Show quoted text> That's because t/data/*.pem certificates used for tests are 1024-bit
> long and that's too weak for Fedora 33 security standards. A remedy
> will be generate stronger keys and certificates.
An attached patch implements it.
From 100ba52095da9ae033c889bf0eb99e204e21ace8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Mon, 3 Aug 2020 14:44:53 +0200
Subject: [PATCH] Use 2048-bit RSA keys in the tests
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
t/01-call_credentials.t used 1024-bit RSA keys and hang on systems
that rejects those keys:
$ perl -Iblib/{arch,lib} t/01-call_credentials.t
1..28
ok 1 - use Grpc::XS::CallCredentials;
ok 2 - use Grpc::XS::Server;
ok 3 - use Grpc::XS::ChannelCredentials;
ok 4 - use Grpc::XS::ServerCredentials;
ok 5 - use Grpc::Constants;
E0803 14:46:58.627369566 40057 ssl_transport_security.cc:683] Invalid cert chain file.
E0803 14:46:58.627458075 40057 ssl_security_connector.cc:275] Handshaker factory creation failed with TSI_INVALID_ARGUMENT.
E0803 14:46:58.627478034 40057 server_secure_chttp2.cc:81] {"created":"@1596458818.627471612","description":"Unable to create secure server with credentials of type Ssl.","file":"src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc","file_line":63}
ok 6 - startBatch failed return send_metadata
ok 7 - startBatch failed return send_close
^C
This patch fixes it by using a stronger key.
CPAN RT#133111
Signed-off-by: Petr PÃsaÅ <ppisar@redhat.com>
---
t/data/ca.pem | 32 +++++++++++++++++++-------------
t/data/server1.key | 43 +++++++++++++++++++++++++++----------------
t/data/server1.pem | 36 ++++++++++++++++++++++--------------
3 files changed, 68 insertions(+), 43 deletions(-)
diff --git a/t/data/ca.pem b/t/data/ca.pem
index 6c8511a..7360080 100644
--- a/t/data/ca.pem
+++ b/t/data/ca.pem
@@ -1,15 +1,21 @@
-----BEGIN CERTIFICATE-----
-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8s4wV
+hPhbar7V44q3j1niqUES5Mu3KvcSC7wfgQpW7Z2vJTvJ09miEmFGKT+zeQX4xSKZ
+BSEpHIG+4PsosBb0eh+AWQKBgG/DcxQnPJWKDMrNJgQReY73qDmwXmX1bhcO8iQk
+6Fder7PMptkrmJeZdX3z9zqeWCdFzBo50JpJbJcMVFPkV5HR69A4dk0MQQCufFhz
+RnVy+SkJ+CLewCgidVVQxs/ynw0+DLwx9IxUvVjh5rY1UqsMG1bIn6Vmxx6Nw96i
+c1gxAoGAKOO8auj41tcBeJtdZybANCMZhps5ZnfQz2uVZE13oPoHaxBTn0l6MzLG
+83nCtmmTunl+d+RUgdJyLO9w1EkHcffh1lwN9yDw3t46cLOUePK8+tQnCgXf7WWE
+Qj3zm3Tl9PiqIzYeB7FA9Yu6tg5eBFTw4G5PolHMIbNU7uj5ol4=
+-----END RSA PRIVATE KEY-----
diff --git a/t/data/server1.pem b/t/data/server1.pem
index f3d43fc..4cd739b 100644
--- a/t/data/server1.pem
+++ b/t/data/server1.pem
@@ -1,16 +1,24 @@
-----BEGIN CERTIFICATE-----
-MIICnDCCAgWgAwIBAgIBBzANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJBVTET
-MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ
-dHkgTHRkMQ8wDQYDVQQDEwZ0ZXN0Y2EwHhcNMTUxMTA0MDIyMDI0WhcNMjUxMTAx
-MDIyMDI0WjBlMQswCQYDVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNV
-BAcTB0NoaWNhZ28xFTATBgNVBAoTDEV4YW1wbGUsIENvLjEaMBgGA1UEAxQRKi50
-ZXN0Lmdvb2dsZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOHDFSco
-LCVJpYDDM4HYtIdV6Ake/sMNaaKdODjDMsux/4tDydlumN+fm+AjPEK5GHhGn1Bg
-zkWF+slf3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