1 2 3 4 5 6 7 8 9 10 11 12
use LWP::UserAgent; use strict; use warnings; $ENV{HTTPS_DEBUG} = 1; $ENV{HTTPS_CA_FILE} = 'X:/etc/ssl/certs/ca-certificates.crt'; $ENV{HTTPS_CA_PATH} = 'X:/etc/ssl/certs/'; my $ua = LWP::UserAgent->new; my $req = HTTP::Request->new(GET => 'https://www.bsi.bund.de'); my $res = $ua->request($req); print $res->headers_as_string;
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Cache-Control: max-age=60
Connection: close
Date: Mon, 14 Apr 2014 12:27:11 GMT
Server: HTTP/1.1
Vary: Accept-Encoding
Content-Language: de
Content-Length: 26248
Content-Type: text/html;charset=utf-8
Expires: Mon, 14 Apr 2014 12:19:39 GMT
Last-Modified: Mon, 14 Apr 2014 12:18:39 GMT
Client-Date: Mon, 14 Apr 2014 12:27:12 GMT
Client-Peer: 77.87.229.76:443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=DE/O=TC TrustCenter GmbH/OU=TC TrustCenter Class 2 L1 CA/CN=TC TrustCenter Class 2 L1 CA XI
Client-SSL-Cert-Subject: /C=DE/ST=NRW/L=Koeln/O=Bundesverwaltungsamt/OU=BIT B 5/CN=www.bsi.bund.de
Client-SSL-Cipher: DHE-RSA-AES256-SHA
Content-Base: https://www.bsi.bund.de/
Content-Style-Type: text/css
Imagetoolbar: false
Link: <DE/Home/home_node.html#Start>; rel="bookmark"; title="Zum Inhalt"; type="text/html"
Link: <DE/Service/Impressum/impressum_node.html>; rel="copyright"; title="Impressum"; type="text/html"
Link: <DE/Home/home_node.html>; rel="start"; title="Homepage"; type="text/html"
Link: <DE/Service/Sitemap/sitemap_node.html>; rel="contents"; title=""; type="text/html"
Link: <DE/Service/Suche/suche_node.html>; rel="search"; title="Suche"; type="text/html"
Link: <DE/DasBSI/dasbsi_node.html>; rel="chapter"; title="Das BSI"; type="text/html"
Link: <DE/Themen/themen_node.html>; rel="chapter"; title="Themen"; type="text/html"
Link: <DE/Aktuelles/aktuelles_node.html>; rel="chapter"; title="Aktuelles"; type="text/html"
Link: <DE/Presse/presse_node.html>; rel="chapter"; title="Presse"; type="text/html"
Link: <DE/Publikationen/publikationen_node.html>; rel="chapter"; title="Publikationen"; type="text/html"
Link: <DE/Home/hidden_node.html>; rel="chapter"; title="Homepage"; type="text/html"
Link: </SiteGlobals/StyleBundles/Bilder/favicon.ico?__blob=normal&v=2>; rel="shortcut icon"; type="image/ico"
Link: <SiteGlobals/Functions/RSSFeed/RSSNewsfeed/RSSNewsfeed.xml>; rel="alternate"; title="BSI RSS-Newsfeed Presse- und Kurzmitteilungen"; type="application/rss+xml"
Link: <SiteGlobals/StyleBundles/CSS/visual/visual.css?v=2>; media="print, projection, screen"; rel="stylesheet"; type="text/css"
Link: <SiteGlobals/StyleBundles/CSS/screen/screen-a.css?v=3>; media="projection, screen"; rel="stylesheet"; type="text/css"
Link: <SiteGlobals/StyleBundles/CSS/print/print.css?v=2>; media="print"; rel="stylesheet"; type="text/css"
Set-Cookie: server-id=1294; path=/
Title: BSI: Startseite Bundesamt f├╝r Sicherheit in der Informationstechnik
X-Frame-Options: sameorigin
X-Meta-Description: Startseite Bundesamt f├╝r Sicherheit in der Informationstechnik. Hier erhalten Sie aktuelle Informationen zu Themen rund um die IT-Sicherheit.
X-Meta-Generator: Government Site Builder 4.0
X-Meta-GenTime: Mon Apr 14 14:18:39 CEST 2014
X-Meta-Keywords: BSI, Bundesamt, Informationstechnologie, Informationstechnik, CERT-Bund, CERT, Sicherheitsberatung, IT-Sicherheit
X-Meta-MSSmartTagsPreventParsing: true
X-Server-Generated: Mon, 14 Apr 2014 12:18:39 GMT
X-Server-Instance-Name: 2_cid294
X-XSS-Protection: 1; mode=block
SSL_connect:before/connect initialization
SSL_connect:SSLv2/v3 write client hello A
SSL_connect:SSLv3 read server hello A
SSL_connect:SSLv3 read server certificate A
SSL_connect:SSLv3 read server key exchange A
SSL_connect:SSLv3 read server done A
SSL_connect:SSLv3 write client key exchange A
SSL_connect:SSLv3 write change cipher spec A
SSL_connect:SSLv3 write finished A
SSL_connect:SSLv3 flush data
SSL_connect:SSLv3 read finished A
SSL_connect:before/connect initialization
SSL_connect:SSLv2/v3 write client hello A
SSL_connect:SSLv3 read server hello A
SSL_connect:SSLv3 read server certificate A
SSL_connect:SSLv3 read server key exchange A
SSL_connect:SSLv3 read server done A
SSL_connect:SSLv3 write client key exchange A
SSL_connect:SSLv3 write change cipher spec A
SSL_connect:SSLv3 write finished A
SSL_connect:SSLv3 flush data
SSL_connect:SSLv3 read finished A
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Cache-Control: max-age=60
Connection: close
Date: Mon, 14 Apr 2014 12:28:31 GMT
Server: HTTP/1.1
Vary: Accept-Encoding
Content-Language: de
Content-Length: 26248
Content-Type: text/html;charset=utf-8
Expires: Mon, 14 Apr 2014 12:27:36 GMT
Last-Modified: Mon, 14 Apr 2014 12:26:36 GMT
Client-Date: Mon, 14 Apr 2014 12:28:31 GMT
Client-Peer: 77.87.229.76:443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=DE/O=TC TrustCenter GmbH/OU=TC TrustCenter Class 2 L1 CA/CN=TC TrustCenter Class 2 L1 CA XI
Client-SSL-Cert-Subject: /C=DE/ST=NRW/L=Koeln/O=Bundesverwaltungsamt/OU=BIT B 5/CN=www.bsi.bund.de
Client-SSL-Cipher: ECDHE-RSA-AES256-SHA
Client-SSL-Socket-Class: IO::Socket::SSL
Client-SSL-Warning: Peer certificate not verified
Content-Base: https://www.bsi.bund.de/
Content-Style-Type: text/css
Imagetoolbar: false
Link: <DE/Home/home_node.html#Start>; rel="bookmark"; title="Zum Inhalt"; type="text/html"
Link: <DE/Service/Impressum/impressum_node.html>; rel="copyright"; title="Impressum"; type="text/html"
Link: <DE/Home/home_node.html>; rel="start"; title="Homepage"; type="text/html"
Link: <DE/Service/Sitemap/sitemap_node.html>; rel="contents"; title=""; type="text/html"
Link: <DE/Service/Suche/suche_node.html>; rel="search"; title="Suche"; type="text/html"
Link: <DE/DasBSI/dasbsi_node.html>; rel="chapter"; title="Das BSI"; type="text/html"
Link: <DE/Themen/themen_node.html>; rel="chapter"; title="Themen"; type="text/html"
Link: <DE/Aktuelles/aktuelles_node.html>; rel="chapter"; title="Aktuelles"; type="text/html"
Link: <DE/Presse/presse_node.html>; rel="chapter"; title="Presse"; type="text/html"
Link: <DE/Publikationen/publikationen_node.html>; rel="chapter"; title="Publikationen"; type="text/html"
Link: <DE/Home/hidden_node.html>; rel="chapter"; title="Homepage"; type="text/html"
Link: </SiteGlobals/StyleBundles/Bilder/favicon.ico?__blob=normal&v=2>; rel="shortcut icon"; type="image/ico"
Link: <SiteGlobals/Functions/RSSFeed/RSSNewsfeed/RSSNewsfeed.xml>; rel="alternate"; title="BSI RSS-Newsfeed Presse- und Kurzmitteilungen"; type="application/rss+xml"
Link: <SiteGlobals/StyleBundles/CSS/visual/visual.css?v=2>; media="print, projection, screen"; rel="stylesheet"; type="text/css"
Link: <SiteGlobals/StyleBundles/CSS/screen/screen-a.css?v=3>; media="projection, screen"; rel="stylesheet"; type="text/css"
Link: <SiteGlobals/StyleBundles/CSS/print/print.css?v=2>; media="print"; rel="stylesheet"; type="text/css"
Set-Cookie: server-id=1359; path=/
Title: BSI: Startseite Bundesamt f├╝r Sicherheit in der Informationstechnik
X-Frame-Options: sameorigin
X-Meta-Description: Startseite Bundesamt f├╝r Sicherheit in der Informationstechnik. Hier erhalten Sie aktuelle Informationen zu Themen rund um die IT-Sicherheit.
X-Meta-Generator: Government Site Builder 4.0
X-Meta-GenTime: Mon Apr 14 14:26:36 CEST 2014
X-Meta-Keywords: BSI, Bundesamt, Informationstechnologie, Informationstechnik, CERT-Bund, CERT, Sicherheitsberatung, IT-Sicherheit
X-Meta-MSSmartTagsPreventParsing: true
X-Server-Generated: Mon, 14 Apr 2014 12:26:36 GMT
X-Server-Instance-Name: 2_cid359
X-XSS-Protection: 1; mode=block
2014-04-14T12:54:17 biancaGibts nicht, das war bei 5.12 die LWP 5.8.3, bei den anderen 6.05.Benutzt du in beiden Tests die selbe LWP Version?
QuoteLWP::Protocol::https::Socket: SSL connect attempt failed with unknown error error:14090086:SSL routines:SSL3_GET_SERVER_
CERTIFICATE:certificate verify failed at C:\strawberry\perl\site\lib/LWP/Protocol/http.pm line 51.
use IO::Socket::SSL qw(debug3);
Guest Steffen UllrichMan kann es aber trotzdem machen, indem man als ssl_opts SSL_ca_file bzw. SSL_ca_path angibt.
2014-05-25T08:57:34 bianca...Aber man darf das in SSL_ca_file nur angeben, wenn es zwingend nur gegen das angegebene Zertifikat prüfen soll. Das ist also keine Addition nach dem Motto "ich füge dem Pool mal ein Zertifikat hinzu" sondern eine explizite Vorgabe.