ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-MP/MP/Transport.pm
(Generate patch)

Comparing AnyEvent-MP/MP/Transport.pm (file contents):
Revision 1.13 by root, Mon Aug 3 22:05:55 2009 UTC vs.
Revision 1.15 by root, Tue Aug 4 07:47:29 2009 UTC

331The first line contains strings separated (not ended) by C<;> 331The first line contains strings separated (not ended) by C<;>
332characters. The first even ixtrings are fixed by the protocol, the 332characters. The first even ixtrings are fixed by the protocol, the
333remaining strings are C<KEY=VALUE> pairs. None of them may contain C<;> 333remaining strings are C<KEY=VALUE> pairs. None of them may contain C<;>
334characters themselves. 334characters themselves.
335 335
336All the lines until after authentication must not exceed 4kb in length, including delimiter. 336All the lines until after authentication must not exceed 4kb in length,
337including delimiter. Afterwards there is no limit on the packet size that
338can be received.
339
340=head3 First Greeting Line
337 341
338The fixed strings are: 342The fixed strings are:
339 343
340=over 4 344=over 4
341 345
396 400
397Indicates that the other side supports TLS (version should be 1.0) and 401Indicates that the other side supports TLS (version should be 1.0) and
398wishes to do a TLS handshake. 402wishes to do a TLS handshake.
399 403
400=back 404=back
405
406=head3 Second Greeting Line
401 407
402After this greeting line there will be a second line containing a 408After this greeting line there will be a second line containing a
403cryptographic nonce, i.e. random data of high quality. To keep the 409cryptographic nonce, i.e. random data of high quality. To keep the
404protocol text-only, these are usually 32 base64-encoded octets, but 410protocol text-only, these are usually 32 base64-encoded octets, but
405it could be anything that doesn't contain any ASCII CR or ASCII LF 411it could be anything that doesn't contain any ASCII CR or ASCII LF
406characters. 412characters.
407 413
414I<< The two nonces B<must> be different, and an aemp implementation
415B<must> check and fail when they are identical >>.
416
408Example of the two lines of greeting: 417Example of the two lines of greeting:
409 418
410 aemp;0;fec.4a7720fc;127.0.0.1:1235,[::1]:1235;hmac_md6_64_256;json,storable;provider=AE-0.0 419 aemp;0;fec.4a7720fc;127.0.0.1:1235,[::1]:1235;hmac_md6_64_256;json,storable;provider=AE-0.0
411 p/I122ql7kJR8lumW3lXlXCeBnyDAvz8NQo3x5IFowE4 420 p/I122ql7kJR8lumW3lXlXCeBnyDAvz8NQo3x5IFowE4
412 421
413=head2 TLS handshake 422=head2 TLS handshake
414 423
415If, after the handshake, both sides indicate interest in TLS, then the 424I<< If, after the handshake, both sides indicate interest in TLS, then the
416connection I<must> use TLS, or fail. 425connection B<must> use TLS, or fail.>>
417 426
418Both sides compare their nonces, and the side who sent the lower nonce 427Both sides compare their nonces, and the side who sent the lower nonce
419value ("string" comparison on the raw octet values) becomes the client, 428value ("string" comparison on the raw octet values) becomes the client,
420and the one with the higher nonce the server. 429and the one with the higher nonce the server.
421 430

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines