AnyEvent-MP
view release on metacpan or search on metacpan
MP/Transport.pm view on Meta::CPAN
my $auth_snd = $config->{auth_offer};
my $auth_rcv = $config->{auth_accept};
$self->{secret} = $config->{secret}
unless exists $self->{secret};
my $secret = $self->{secret};
if (exists $config->{cert}) {
$self->{tls_ctx} = {
sslv2 => 0,
sslv3 => 0,
tlsv1 => 1,
verify => 1,
cert => $config->{cert},
ca_cert => $config->{cert},
verify_require_client_cert => 1,
};
}
$self->{hdl} = new AnyEvent::Handle
+($self->{fh} ? (fh => $self->{fh}) : (connect => $self->{connect})),
my ($cmd) = @_;
my $cv = &run_cmd;
my $status = $cv->recv;
$status
and die "@$cmd: command failed with exit status $status.";
}
sub gen_cert {
my_run_cmd [qw(openssl req
-new -nodes -x509 -days 3650
-newkey rsa:2048 -keyout /dev/fd/3
-batch -subj /CN=AnyEvent::MP
)],
"<", "/dev/null",
">" , \my $cert,
"3>", \my $key,
"2>", "/dev/null";
"$cert$key"
( run in 1.276 second using v1.01-cache-2.11-cpan-acf6aa7dc9e )