1 2 3 4 5 6 7 8 9 10 11 12
use LWP::UserAgent; use HTTP::Request; my $json= '{" ..."}'; my $uri = "https://someurl/"; my $req = HTTP::Request->new( 'POST', $uri ); $req->header( 'Content-Type' => 'application/json' ); $req->header( 'Authorization' => 'bla bla' ); $req->content( $json ); my $ua = LWP::UserAgent->new(ssl_opts => { verify_hostname => 0 }); $ua->request($req);
2017-03-20T09:05:43 GwenDragonWenn das Perl mit einem alten OpenSSL kompiliert wurde, kann Perl vielleicht damit kein ECDHE-Chiffren.
Wenn du den Debuglevel auf 2 oder 3 erhöhst, was zeigen dann die Debugmeldungen IO::Socket::SSL?
1
2
3
4
5
$ openssl ciphers -v | awk '{print $2}' | sort | uniq
SSLv3
TLSv1.2
$ openssl version
OpenSSL 1.0.1t 3 May 2016
openssl s_client -connect SERVERNAME:PORT
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
...
No client certificate CA names sent
---
SSL handshake has read 5024 bytes and written 415 bytes
---
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-GCM-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1.2
Cipher : ECDHE-RSA-AES256-GCM-SHA384
Session-ID: xxx
Session-ID-ctx:
Master-Key: xxx
Key-Arg : None
PSK identity: None
PSK identity hint: None
SRP username: None
TLS session ticket lifetime hint: 300 (seconds)
TLS session ticket:
... hexdump
Start Time: 1490045650
Timeout : 300 (sec)
Verify return code: 0 (ok)
---