Thread IO::Socket::SSL verweigert sich
(11 answers)
Opened by bianca at 2018-05-28 15:17
Ich habe da schon eine Idee.
Das Problem beginnt damit, dass Du nicht an die OCSP-Response des Servers kommst. IO::Socket::SSL verwendet dazu per Voreinstellung OCSP Stapling, was man also entweder dem Webserver beibiegen oder dem Perl-Program abgewöhnen muss. Denn beim Webserver ist es per Default aus-, bei IO::Socket::SSL per Default eingeschaltet. Links zum Thema: * https://letsencrypt.org/docs/integration-guide/ - Abschnitt "Implement OCSP Stapling" * Wikipedia zu OCSP Stapling * Apache Konfigurationsanweisung (ab 2.4) * Die Zeile zum Abschalten im Programm steht unten im Beispiel. BTW: Mein Test-Programm sieht so aus: Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 use strict; use warnings; use IO::Socket::SSL; $IO::Socket::SSL::DEBUG = 3; my $host = 'letsencrypt.org'; my $client = IO::Socket::SSL->new( # where to connect PeerHost => $host, PeerPort => "https", # -------- test this -------- SSL_ocsp_mode => SSL_OCSP_NO_STAPLE, # certificate verification - VERIFY_PEER is default SSL_verify_mode => SSL_VERIFY_PEER, ) or die "failed connect or ssl handshake: $!,$SSL_ERROR"; # send and receive over SSL connection print $client "GET / HTTP/1.0\r\n"; print $client "Host: $host\r\n\r\n"; print <$client>; |