When I run:
$sock = new IO::Socket::SSL (
Listen => 5,
LocalAddr => 'localhost',
LocalPort => 9000,
Proto => 'tcp',
SSL_verify_mode => 0x01
) or die "unable to create socket: $!\n";
I get the error message 'No such file or directory'. I assume that it means it can't find the certificate or the key.
(I got this code from Jukka Juslins paper on his work at CERN (http://elan.cs.hut.fi:9090/erikoistyo.html).)
I have created the certificate and the key with openssl and put them both in certs/ and in @INC's path to IO::Socket::SSL but there's no difference.
I've also put in an 'init_context' before the above command:
IO::Socket::SSL::context_init (
SSL_use_cert => 1,
SSL_key_file => 'certs/server-key.pem',
SSL_cert_file => 'certs/server-cert.pem'
);
But then I get the error message:
Can't use string ("SSL_use_cert") as a HASH ref while "strict refs" in use at /usr/local/lib/perl5/site_perl/5.6.1/IO/Socket/SSL.pm line 684.
If soneone has successfully used IO::Socket:SSL (without LWP), I would appreciate a few pointers to get me going.
Thanks
kebex
In reply to IO::Socket:SSL 'No such file or directory' by kebex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |