ciao a tutti
ho un problema
mi sono creato due script client e server con una socket SSL (IO:Socket:SSL)
gli ho creati su una macchina UNIX... questi si connettono attraverso dei certificati...
il tutto funziona...
ho portato il client sulla mia macchiina windows, nel momento in cui lo lancio mi da un errore...
>perl client.pl
DEBUG: .../IO/Socket/SSL.pm:1263: IO::Socket::SSL::SSL_Context HASH(0x18ec39c)
DEBUG: .../IO/Socket/SSL.pm:1381: new ctx 29493944
IO::Socket::INET configuration failederror:00000000:lib(0):func(0):reason(0)
at client.pl line 10
DEBUG: .../IO/Socket/SSL.pm:1416: free ctx 29493944 open=29493944
DEBUG: .../IO/Socket/SSL.pm:1419: OK free ctx 29493944
unable to create socket: IO::Socket::INET configuration failederror:00000000:li
(0):func(0):reason(0)
qualcuno può aiutarmi?
riporto il codice del client
#!/usr/local/bin/perl -w
use strict;
use IO::Socket::SSL;
my ($sock, $buf);
$IO::Socket::SSL:EBUG = 4;
if(!($sock = IO::Socket::SSL->new( PeerAddr => 'host',
PeerPort => '9000',
Proto => 'tcp',
SSL_use_cert => 1,
SSL_key_file => '/usr/local/ssl/certs/newkey.pem',
SSL_cert_file => '/usr/local/ssl/certs/newcert.pem',
SSL_ca_file => '/usr/local/ssl/certs/demoCA/cacert.pem',
SSL_verify_mode => 0x01,
))) {
warn "unable to create socket: ", &IO::Socket::SSL::errstr, "\n";
exit(0);
} else {
warn "connect ($sock).\n" if ($IO::Socket::SSL:EBUG);
}
my ($subject_name, $issuer_name, $cipher, $buff);
if( ref($sock) eq "IO::Socket::SSL") {
$subject_name = $sock->peer_certificate("subject");
$issuer_name = $sock->peer_certificate("issuer");
$cipher = $sock->get_cipher();
}
warn "cipher: $cipher.\n", "server cert:\n",
"\t '$subject_name' \n\t '$issuer_name'.\n\n";
while (defined($buf = <$sock>)) {
print "$buf";
}

EBUG = 4;
Rispondi quotando
e anzi volevo chiederti aiuto...ossia..mi è già capitato di programmare utilizzando i socket (in Visual Basic e in C++)...ora mi servirebbe creare un bash script per linux (o anche in qualche altro linguaggio es.phyton )che mediante socket si collegi al mio server di posta gmail...l'unico problema è che questo server utilizza una comunicazione appunto con protocollo SSL..se tu potessi aiutarmi in qualche modo...con qualche esempio o guida ( che finora non ho trovato girovagando x la rete) te ne sarei molto grato...
