http://www.perlmonks.org?node_id=1223706

parpande has asked for the wisdom of the Perl Monks concerning the following question:

I am new to Perl , I have an rpm package that is when installed establishes and checks for SSL connections with different algorithm .

ECDH+AES128:ECDH+AESGCM:ECDH+AES256:DH+AES:DH+AESGCM:DH+AES256:RSA+AES:RSA+AESGCM:!aNULL:!RC4:!MD5:!DSS:!3DES:!SSLv3

I want to use add the above list to the arguments passed to the instantiation of the IO:Socket:SSL object by the rpm . How do I use SSL object in the bin file for the rpm so that while installation of the rpm it checks for the list above of SSL cipherlist. If I would keep the above list in a config file of the rpm then how do I mention that list to refer for SSL in bin files of SSL object :

use IO::Socket::SSL qw(debug3); my $socket = IO::Socket::SSL->new ( PeerAddr => 'some.server.com', PeerPort => 443, Proto => 'tcp', SSL_use_cert => 1, SSL_verify_mode => SSL_VERIFY_NONE, SSL_cert_file => 'server.pem' ) or die "failed connect or ssl handshake: $!,",&IO::Socket::SSL::errs +tr,"\n";

  • Comment on How to use Perl SSL object in RPM Linux

Replies are listed 'Best First'.
Re: How to use Perl SSL object in RPM Linux
by hippo (Bishop) on Oct 09, 2018 at 08:08 UTC

    As specified in the documentation for IO::Socket::SSL:

    my $socket = IO::Socket::SSL->new ( PeerAddr => 'some.server.com', PeerPort => 443, SSL_cipher_list => 'ECDH+AES128:ECDH+AESGCM:ECDH+AES256:DH+AES:DH+AE +SGCM:DH+AES256:RSA+AES:RSA+AESGCM:!aNULL:!RC4:!MD5:!DSS:!3DES:!SSLv3' +, # ... more options here );