0 Pluspunkte 0 Minuspunkte

Wenn ich OpenSSL verwende um ein Serverzertifikat zu überprüfen bekomme ich zwar ein Zertifikat aber keinen Fingerabdruck (Thumbprint).

c:\>openssl s_client -connect testserver:443
CONNECTED(00000220)
Can't use SSL_get_servername
depth=0 CN = testserver
verify error:num=18:self signed certificate
verify return:1
depth=0 CN = testserver
verify return:1
---
Certificate chain
 0 s:CN = testserver
   i:CN = testserver
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIC6zCCAdOgAwIBAgIGAZId1q4hMA0GCSqGSIb3DQEBCwUAMBgxFjAUBgNVBAMM
DXZpZS1zcnYtYmNrMDEwHhcNMjQwOTIzMDc0NDIxWhcNMjYxMjI2MDc0NDIxWjAY
MRYwFAYDVQQDDA12aWUtc3J2LWJjazAxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
MIIBCgKCAQEAkZqs2AFdaGOoXin07hPCVGn5yA4hdkaBDzwGfWCqZYDXlNKIzO7w
dwI6CtzlUCn8GvX7o7hPyQtrZgZW+Dkl3EABWrg/B1uwwr8F2650M9E0M76roXMD
CYPUZN6WXt9Og+YXhJdkep9rEamp004XVBCmCTQKl0WP4IRX9xUE2JFviviMLuEy
lgmjSZsedE7Nri4f6OC00KhPdNooQNWlbbpwoS68Chd4ROhGhS+sIa5PfgC5kk1A
5nGFlstGFJC4SvtmYk0ZLdFHS0OqLR42FjN0TPQV7EgOaYGRI3N5ArLErFfmwx2w
qSsdB7kqKzFWbu5NcrNEQcFmyYvA5kRMDQIDAQABozswOTAYBgNVHREEETAPgg12
aWUtc3J2LWJjazAxMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjANBgkq
hkiG9w0BAQsFAAOCAQEAgARjXqfJaPYZmY8duTLHJ6rg3R9lXhPnVoTgCNpKxtVh
sFjcaLvQKn63DeM/LwSNjG2EzTvKvvtTwhnDzUNOLsZnhtDxjSfb9pjMzj3XSvjc
BppWlQ2X3vO6qeRYLI0XQSsk6zmc25mnazCQ3ePzlGEHd5bA8OqY61igKLd1tUgN
gYn8sBNkvym+D5E/vQOuZf46OHGhnyDFCDKAn+Zg3GB/itZXlgxb7rLr9CfGkcc1
aYXIjkxRQUbK3m9t8Ne9oFA8el4Qw97dsgCxgYax4YoyY5e6oztuF7/fL2YQoCv3
r3AQbhSHP8ABxdiB8AVcuhb02Yx9EpVaAaCMFbwz3Q==
-----END CERTIFICATE-----
subject=CN = testserver

issuer=CN = testserver

---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: RSA-PSS
Server Temp Key: X25519, 253 bits
---
SSL handshake has read 1283 bytes and written 373 bytes
Verification error: self signed certificate
---
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Server public key is 2048 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 18 (self signed certificate)
---
---
Post-Handshake New Session Ticket arrived:
SSL-Session:
    Protocol  : TLSv1.3
    Cipher    : TLS_AES_256_GCM_SHA384
    Session-ID: CC80CA6E8D3C9B4F311CCEF16B06F2BC0619D600DBF02522C565AEF708848A01
    Session-ID-ctx:
    Resumption PSK: 526C2A773A89988C2142F1CAF0F434BB56DA68F73B8F95E398B300A2A3140E7B148FE8D1F4469F3281AE2B56A3A89F68
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    TLS session ticket lifetime hint: 86400 (seconds)
    TLS session ticket:
    0000 - 4a b2 eb a8 4b 9e c9 86-d3 06 e1 1b 5d f3 a4 60   J...K.......]..
    0010 - 16 a1 b6 27 ba 47 ec 97-fd af 99 4b c4 6d 35 72   ...'.G.....K.m5r
    0020 - 2d 10 51 17 28 58 8a 5e-8c 63 98 2b 89 04 12 1d   -.Q.(X.^.c.+....
    0030 - 89 dc 88 9c 36 60 c4 7e-4d 8d c4 4f b9 2f 7f 40   ....6.~M..O./.@
    0040 - 21 ad e9 61 54 ae 2f 24-cd ab 1d 3c 02 70 0a f1   !..aT./$...<.p..
    0050 - 3d d0 36 3f c2 84 93 95-45 ef fb 5f b3 55 de 0b   =.6?....E.._.U..
    0060 - 1c 3b 9c c1 17 b5 d9 35-bc c8 28 b2 e3 a0 34 a9   .;.....5..(...4.
    0070 - 2a 87 fa cb 3e 4b 3d 63-57 1c bc a5 93 f5 75 38   *...>K=cW.....u8
    0080 - 86 94 2d a1 3e e0 67 b4-c5 62 a6 71 60 c3 d5 5a   ..-.>.g..b.q..Z
    0090 - e5 c2 94 83 fb 99 d3 ac-94 a5 ef 9f 2f ce 35 8d   ............/.5.
    00a0 - cf 86 e2 b5 01 16 1b 77-c3 f9 2a f2 fa 64 02 53   .......w..*..d.S
    00b0 - ea 53 ce fa 7f 7f d3 69-3a 46 37 c2 72 74 e7 23   .S.....i:F7.rt.#
    00c0 - a5 a3 3b a1 3c 11 fb a5-d6 95 32 4d 04 0d 55 be   ..;.<.....2M..U.
    00d0 - d6 d2 58 54 58 f5 7f fe-f9 28 d0 aa 5f 27 1e 13   ..XTX....(.._'..
    00e0 - d3 93 c2 97 45 b6 8f de-4c 8a 80 76 de 60 48 e8   ....E...L..v.H.
    00f0 - d7 25 a8 05 2f 54 45 37-85 e0 70 7e 37 e8 7d f9   .%../TE7..p~7.}.
    0100 - 8a 21 54 fe c1 b0 1f 23-bc 7d 10 8e 82 93 56 b6   .!T....#.}....V.
    0110 - 5f 2e 15 bc dc 1f e9 89-7f 63 b6 74 22 4c 45 41   _........c.t"LEA
    0120 - 01 be 4d 57 53 d7 93 7b-fe e9 4e 6c 86 e7 65 f9   ..MWS..{..Nl..e.
    0130 - 10 b1 0b ce 3e 36 78 c2-dc 28 a9 23 17 9f 0a d9   ....>6x..(.#....
    0140 - 3b 3c 43 40 b0 98 d3 91-a8 82 de 95 1f 44 13 a4   ;<C@.........D..
    0150 - c3 2c 42 6c 0c f7 9d 52-79 53 fd f9 02 2e 02 f4   .,Bl...RyS......
    0160 - d2 cc 52 18 5d cc 80 01-13 ae 65 2d 6b 88 e0 cc   ..R.].....e-k...
    0170 - 2f ca a3 76 c1 57 27 f0-6d c7 8b 26 d6 1d 5b d6   /..v.W'.m..&..[.
    0180 - c0 86 4b 0d c2 5a 55 25-c2 bf 69 b9 ca d0 64 2d   ..K..ZU%..i...d-
    0190 - 09 9a 82 09 71 09 f2 a1-cd 37 59 3f a1 2e c5 1e   ....q....7Y?....
    01a0 - a8 35 3f 3d 0d cc 6d d3-c8 51 f2 41 93 5d 58 83   .5?=..m..Q.A.]X.
    01b0 - d3 6c 6d 94 c4 7e 4a e5-c8 c3 77 6d 6a d2 33 27   .lm..~J...wmj.3'
    01c0 - c2 ec dd d6 6e 7c 90 a6-76 05 c9 a2 72 57 55 99   ....n|..v...rWU.
    01d0 - d4 d1 99 ae 5c 6f 89 ac-63 7a 9a 26 c1 53 4a 8c   ....\o..cz.&.SJ.
    01e0 - 92 db 35 a0 9b 5d ad 75-8a 93 96 2d 75 c6 ad a4   ..5..].u...-u...
    01f0 - c3 ec 25 f7 3c a1 2e 14-fb 3d 2b 3c 29 54 53 d4   ..%.<....=+<)TS.
    0200 - aa 1c 81 7b f7 27 29 97-12 b6 07 c6 26 02 6f 55   ...{.').....&.oU
    0210 - 12 e4 87 b7 75 df 99 fa-7f 4b d8 2b 62 cc 54 a0   ....u....K.+b.T.
    0220 - 51 74 54 47 5d f7 65 ca-90 8a 9b 04 20 21 01 1a   QtTG].e..... !..
    0230 - e7 37 a9 94 25 7b ce c3-4b bb 30 7f 9f a4 59 72   .7..%{..K.0...Yr
    0240 - 3e 72 39 a9 a1 1d f6 88-09 7e 62 8d 94 2c 2e 38   >r9......~b..,.8
    0250 - dc fc 9b 91 38 bd 87 e7-6e 96 33 42 b5 4f 7e 86   ....8...n.3B.O~.
    0260 - 04 32 29 bf 81 14 ea b2-b7 89 76 56 b9 3f 29 11   .2).......vV.?).
    0270 - 73 9b 49 67 77 b3 e3 2f-aa 89 3f 84 80 2e d1 65   s.Igw../..?....e
    0280 - 86 a1 0c b2 0f 9a 6e 73-2c 31 59 9b 1a 29 1c ed   ......ns,1Y..)..
    0290 - 0e 46 5f e3 27 d2 3d 49-84 2b b9 47 0f 71 81 4c   .F_.'.=I.+.G.q.L
    02a0 - 8e b3 d9 a7 b5 ae 31 73-eb 8d 2b 1c f2 99 5c 44   ......1s..+...\D
    02b0 - d0 b8 32 28 26 48 aa 79-4d d8 a1 4e 95 1c d9 6e   ..2(&H.yM..N...n
    02c0 - b7 ac 8f 3b 6b e5 17 ea-02 4f 92 7e 99 6a d3 26   ...;k....O.~.j.&
    02d0 - f1 76 29 3f ab bb 70 90-a4 5d c2 c4 3f 82 42 ce   .v)?..p..]..?.B.
    02e0 - 58 7f d5 44 24 c6 e7 e2-c3 56 2e 70 ea 90 f9 fb   X..D$....V.p....
    02f0 - 3f 0c 9d d3 92 0c dd cb-f1 12 02 2c a0 ec d5 68   ?..........,...h
    0300 - d8 08 fa 40 8a 3e 30 a4-d9 bf ae e9 aa 6f ff e6   ...@.>0......o..
    0310 - ae d6 38 61 8b 0e 04 54-4e 28 b5 ff f7 e6 20 1e   ..8a...TN(.... .
    0320 - b7 88 21 3e 3a 7f d7 47-02 70 4b 48 dc b3 0c ce   ..!>:..G.pKH....
    0330 - 68 a9 aa 55 19 08 51 02-ad 8d 44 53 2d 72 36 bc   h..U..Q...DS-r6.
    0340 - c4 a4 c6 18 37 86 7e 02-c2 7f 38 9a 29 4d c5 c4   ....7.~...8.)M..
    0350 - 4d 33 22 d8 b8 c3 47 cf-0c 76 4b d3 cb ec 39 e4   M3"...G..vK...9.
    0360 - c1 80 90 fc 68 ae 7b 76-4e 61 79 ae 29 52 9c 56   ....h.{vNay.)R.V
    0370 - 40 26 24 90 bb 69 0e 53-f9 97 49 82 90 82 44 c9   @&$..i.S..I...D.
    0380 - 1f c9 90 43 d2 8c 1e 26-17 0d ca 29 4b e6 48 80   ...C...&...)K.H.
    0390 - a2 29 24 3c 47 a7 1f 91-ed e5 d6 09 fc 00 e7 42   .)$<G..........B
    03a0 - 9a ad ca ef 99 3a 31 5f-5a c5 55 d7 33 93 b3 a7   .....:1_Z.U.3...
    03b0 - a9 57 0a a0 36 03 c4 f6-b9 d9 37 59 12 1a 20 2d   .W..6.....7Y.. -
    03c0 - 5d 7a 86 91 ae 95 04 63-87 7f 92 5d de 45 4c 4f   ]z.....c...].ELO
    03d0 - 13 80 82 52 12 5f 4f 65-77 8d 16 a7 f3 1a c6 ec   ...R._Oew.......
    03e0 - e7 c0 24                                          ..$

    Start Time: 1728851311
    Timeout   : 7200 (sec)
    Verify return code: 18 (self signed certificate)
    Extended master secret: no
    Max Early Data: 0
---
read R BLOCK

Wie kann ich den Fingerabdruck anzeigen lassen?

von  

1 Antwort

0 Pluspunkte 0 Minuspunkte

Zuerst exportierst du das Zertifikat in eine Datei.

openssl s_client -connect testserver:443 > cert.txt

Danach musst du mit Hilfe von OpenSSL den Fingerprint berechnen.

openssl x509 -in cert.txt -noout -fingerprint -sha256
von (776 Punkte)