Bei mir ist es so:
declare -f zertifikatguck
zertifikatguck ()
{
echo | openssl s_client -connect "$@":443
}
zertifikatguck Befehl auf noscript.net:
zertifikatguck noscript.net
CONNECTED(00000003)
depth=2 C = US, O = Internet Security Research Group, CN = ISRG Root X1
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = R3
verify return:1
depth=0 CN = noscript.net
verify return:1
---
Certificate chain
0 s:CN = noscript.net
i:C = US, O = Let's Encrypt, CN = R3
a:PKEY: rsaEncryption, 2048 (bit); sigalg: RSA-SHA256
v:NotBefore: Jun 13 06:24:14 2022 GMT; NotAfter: Sep 11 06:24:13 2022 GMT
1 s:C = US, O = Let's Encrypt, CN = R3
i:C = US, O = Internet Security Research Group, CN = ISRG Root X1
a:PKEY: rsaEncryption, 2048 (bit); sigalg: RSA-SHA256
v:NotBefore: Sep 4 00:00:00 2020 GMT; NotAfter: Sep 15 16:00:00 2025 GMT
2 s:C = US, O = Internet Security Research Group, CN = ISRG Root X1
i:O = Digital Signature Trust Co., CN = DST Root CA X3
a:PKEY: rsaEncryption, 4096 (bit); sigalg: RSA-SHA256
v:NotBefore: Jan 20 19:14:03 2021 GMT; NotAfter: Sep 30 18:14:03 2024 GMT
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIFcjCCBFqgAwIBAgISAxwKzaDew0XcaAlap6qCigMGMA0GCSqGSIb3DQEBCwUA
MDIxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQswCQYDVQQD
EwJSMzAeFw0yMjA2MTMwNjI0MTRaFw0yMjA5MTEwNjI0MTNaMBcxFTATBgNVBAMT
DG5vc2NyaXB0Lm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL9w
J0HCQ3azgq9ovJwWqAMikNqwwHFz08VSZKtlkPXo3QKR7hfud7J9xkelHtsbfgAm
iTfgg66W+4DvhjaaFZT70Cv3sJW3SyLKuDxYJdmyG/LisItVE32oDZNxwf0FM/gG
b2cwwBSo3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Yrn9WgTMCAIhALm8hHk/zLDvkEHqGLqj
7BH6rzRqAoB+ZhbBnTShsxp/MA0GCSqGSIb3DQEBCwUAA4IBAQCUsNaPQj20hyRp
V4a1WBkm3rZeLPr4Evhb8Ki+Wqn4kbKrFAzgLLQEaD3YyBRVxCDcI67e8OKhCHG+
Z/J+7Z6aO8bzS9RE4iN9vwPWUgV+hQMQpsWS5sq8KeC0nWJsPYQwld5UrcixOa7p
IEHYaGrKVbWctG6KTghWOs+ymNA9I2RI177h+CZlgdvifWnhu/lY0zYJxf+rz8eh
+J8P5GiwVInQtn9b9BXlo9FEXchHVO530IHaHlP75bsbityksAwkvFyIsUOjf7t4
hnKVBU74DF79Qr63MWuGw519z1/z8EzM4OCv31uWfoMHyIPAeNQhSrOvwSQwIG0I
qAUqE9C3
-----END CERTIFICATE-----
subject=CN = noscript.net
issuer=C = US, O = Let's Encrypt, CN = R3
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: RSA
Server Temp Key: ECDH, prime256v1, 256 bits
---
SSL handshake has read 4796 bytes and written 440 bytes
Verification: OK
---
New, TLSv1.2, Cipher is ECDHE-RSA-AES128-GCM-SHA256
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : ECDHE-RSA-AES128-GCM-SHA256
Session-ID: 05F3B6F3DF691CA10B4BD48BF34C92E1421F1BB6B95E85AA39DD68417E3B7D07
Session-ID-ctx:
Master-Key: 189FC7F0D873E1F2F6F9C74E1F3E92EDED0D8401941BF6A01A07DAE765C55D90A780B7B621F3C1B522D4680D2851A1D1
PSK identity: None
PSK identity hint: None
SRP username: None
TLS session ticket lifetime hint: 300 (seconds)
TLS session ticket:
0000 - 68 86 17 b6 80 3a ba bf-48 af f7 a0 da 30 05 3f h....:..H....0.?
0010 - 1d 99 f1 5b b0 d4 96 c2-db 24 bc b8 94 85 e3 62 ...[.....$.....b
0020 - c2 47 af fe 29 39 f3 cb-fc 0d da a9 2f ea b5 dc .G..)9....../...
0030 - 80 cf 05 e3 a4 ee 83 fa-d6 15 09 bc f7 6b 26 f1 .............k&.
0040 - 1a 88 47 28 d0 a2 f3 29-9e a9 22 a0 fd 28 2d 92 ..G(...).."..(-.
0050 - 0c 73 f4 72 34 43 71 b3-1b 0c 8d ba 0e 3b 5a ef .s.r4Cq......;Z.
0060 - c5 16 8a d0 2a c7 f9 24-0c 61 4a 01 6e 7e 09 a5 ....*..$.aJ.n~..
0070 - 6f 4b d7 68 29 6e 31 b7-0c a2 73 c2 d2 06 e4 8f oK.h)n1...s.....
0080 - 04 88 a0 1d 05 1b 6b bc-7a 26 21 df 40 bb 5a e4 ......k.z&!.@.Z.
0090 - 6c a0 2c 9e af 1c 04 9d-1a 27 62 c8 65 db e3 de l.,......'b.e...
00a0 - 3c 05 a5 b2 52 f8 1c 94-bc c3 e6 8a 11 4a 8d f5 <...R........J..
00b0 - 96 5d 88 9f e8 7d 8e ce-e5 05 81 47 70 99 11 12 .]...}.....Gp...
00c0 - 7f d7 68 43 8d 9a cf ac-c3 bc d1 65 3a bf 52 21 ..hC.......e:.R!
Start Time: 1655131201
Timeout : 7200 (sec)
Verify return code: 0 (ok)
Extended master secret: no
---
DONE
Bash:
bash --version
GNU bash, Version 5.1.16(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2020 Free Software Foundation, Inc.
Lizenz GPLv3+: GNU GPL Version 3 oder jünger <http://gnu.org/licenses/gpl.html>
Dies ist freie Software. Sie darf verändert und verteilt werden.
Es wird keine Garantie gewährt, soweit das Gesetz es zulässt.
Und nun wohl der entscheidende Unterschied, eine OpenSSL Version 3x:
openssl version
OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)