--- AnyEvent-MP/MP/Transport.pm 2009/08/03 14:58:13 1.8 +++ AnyEvent-MP/MP/Transport.pm 2009/08/03 15:02:42 1.10 @@ -45,7 +45,7 @@ See C, below, for constructor arguments. -Defaults for peerhost, peerport, fh and tls are provided. +Defaults for peerhost, peerport and fh are provided. =cut @@ -60,7 +60,6 @@ fh => $fh, peerhost => $host, peerport => $port, - tls => "accept", @args, ); } @@ -84,7 +83,6 @@ peername => $host, peerhost => $nhost, peerport => $nport, - tls => "accept", @args, ); } @@ -107,7 +105,6 @@ greeting => { key => value }, # tls support - tls => "accept|connect", tls_ctx => AnyEvent::TLS, peername => $peername, # for verification ; @@ -131,9 +128,7 @@ { Scalar::Util::weaken (my $self = $self); - if (exists $arg{connect}) { - $arg{tls_ctx} ||= { sslv2 => 0, sslv3 => 0, tlsv1 => 1, verify => 1 }; - } + #$arg{tls_ctx} ||= { sslv2 => 0, sslv3 => 0, tlsv1 => 1, verify => 1 }; $arg{secret} = AnyEvent::MP::Base::default_secret () unless exists $arg{secret}; @@ -215,7 +210,7 @@ $self->{hdl}->push_read (line => sub { my $rgreeting2 = $_[1]; - if ($self->{tls_ctx} and 1 == int $self->{remote_greeting}{"tls"}) { + if ($self->{tls_ctx} and 1 == int $self->{remote_greeting}{tls}) { $self->{tls} = $lgreeting2 lt $rgreeting2 ? "connect" : "accept"; $self->{hdl}->starttls ($self->{tls}, $self->{tls_ctx}); } @@ -368,7 +363,7 @@ receiving side should choose the first framing format it supports for sending packets (which might be different from the format it has to accept). -=cut +=back The remaining arguments are C pairs. The following key-value pairs are known at this time: @@ -438,6 +433,10 @@ =back +Example (the actual reply matching the previous example): + + hmac_md6_64_256;wIlLedBY956UCGSISG9mBZRDTG8xUi73/sVse2DSQp0;json + =head2 DATA PHASE After this, packets get exchanged using the chosen framing protocol. It is