ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-MP/bin/aemp
(Generate patch)

Comparing AnyEvent-MP/bin/aemp (file contents):
Revision 1.2 by root, Mon Aug 10 02:07:02 2009 UTC vs.
Revision 1.3 by root, Mon Aug 10 19:19:30 2009 UTC

19 19
20 # node configuration: TLS 20 # node configuration: TLS
21 aemp setcert <file> # set a certificate (key.pem + certificate.pem) 21 aemp setcert <file> # set a certificate (key.pem + certificate.pem)
22 aemp clrcert # remove certificate 22 aemp clrcert # remove certificate
23 aemp gencert # generate a random certificate 23 aemp gencert # generate a random certificate
24 aemp forcetls <0|1> # enforce TLS connections?
25 24
26=head1 DESCRIPTION 25=head1 DESCRIPTION
27 26
28With aemp you can configure various aspects of AnyEvent::MP and it's protocol. 27With aemp you can configure various aspects of AnyEvent::MP and it's protocol.
29 28
184 183
185 "$cert$key" 184 "$cert$key"
186} 185}
187 186
188our $cfg = \%AnyEvent::MP::Config::CFG; 187our $cfg = \%AnyEvent::MP::Config::CFG;
189our $nodecfg = $cfg->{node}{"#default"} ||= {}; 188our $nodecfg = $cfg;
190 189
191sub resolve_port { 190sub resolve_port {
192 my ($node, $port) = split /#/, $_[0], 2; 191 my ($node, $port) = split /#/, $_[0], 2;
193 192
194 $node = (resolve_node $node)->recv; 193 $node = (resolve_node $node)->recv;
251 }, 250 },
252 clrcert => sub { 251 clrcert => sub {
253 delete $nodecfg->{cert}; 252 delete $nodecfg->{cert};
254 ++$cfg->{dirty}; 253 ++$cfg->{dirty};
255 }, 254 },
256 forcetls => sub {
257 @ARGV == 1
258 or die "enable value missing\n";
259
260 $nodecfg->{forcetls} = !!shift @ARGV;
261 ++$cfg->{dirty};
262 },
263); 255);
264 256
265sub docmd { 257sub docmd {
266 my $cmd = shift @ARGV; 258 my $cmd = shift @ARGV;
267 259

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines