… | |
… | |
326 | The greeting consists of two text lines that are ended by either an ASCII |
326 | The greeting consists of two text lines that are ended by either an ASCII |
327 | CR LF pair, or a single ASCII LF (recommended). |
327 | CR LF pair, or a single ASCII LF (recommended). |
328 | |
328 | |
329 | =head2 GREETING |
329 | =head2 GREETING |
330 | |
330 | |
|
|
331 | All the lines until after authentication must not exceed 4kb in length, |
|
|
332 | including delimiter. Afterwards there is no limit on the packet size that |
|
|
333 | can be received. |
|
|
334 | |
|
|
335 | =head3 First Greeting Line |
|
|
336 | |
|
|
337 | Example: |
|
|
338 | |
|
|
339 | aemp;0;fec.4a7720fc;127.0.0.1:1235,[::1]:1235;hmac_md6_64_256;json,storable;provider=AE-0.0 |
|
|
340 | |
331 | The first line contains strings separated (not ended) by C<;> |
341 | The first line contains strings separated (not ended) by C<;> |
332 | characters. The first even ixtrings are fixed by the protocol, the |
342 | characters. The first even ixtrings are fixed by the protocol, the |
333 | remaining strings are C<KEY=VALUE> pairs. None of them may contain C<;> |
343 | remaining strings are C<KEY=VALUE> pairs. None of them may contain C<;> |
334 | characters themselves. |
344 | characters themselves. |
335 | |
|
|
336 | All the lines until after authentication must not exceed 4kb in length, |
|
|
337 | including delimiter. Afterwards there is no limit on the packet size that |
|
|
338 | can be received. |
|
|
339 | |
|
|
340 | =head3 First Greeting Line |
|
|
341 | |
345 | |
342 | The fixed strings are: |
346 | The fixed strings are: |
343 | |
347 | |
344 | =over 4 |
348 | =over 4 |
345 | |
349 | |
… | |
… | |
412 | characters. |
416 | characters. |
413 | |
417 | |
414 | I<< The two nonces B<must> be different, and an aemp implementation |
418 | I<< The two nonces B<must> be different, and an aemp implementation |
415 | B<must> check and fail when they are identical >>. |
419 | B<must> check and fail when they are identical >>. |
416 | |
420 | |
417 | Example of the two lines of greeting: |
421 | Example of a nonce line: |
418 | |
422 | |
419 | aemp;0;fec.4a7720fc;127.0.0.1:1235,[::1]:1235;hmac_md6_64_256;json,storable;provider=AE-0.0 |
|
|
420 | p/I122ql7kJR8lumW3lXlXCeBnyDAvz8NQo3x5IFowE4 |
423 | p/I122ql7kJR8lumW3lXlXCeBnyDAvz8NQo3x5IFowE4 |
421 | |
424 | |
422 | =head2 TLS handshake |
425 | =head2 TLS handshake |
423 | |
426 | |
424 | I<< If, after the handshake, both sides indicate interest in TLS, then the |
427 | I<< If, after the handshake, both sides indicate interest in TLS, then the |
… | |
… | |
489 | This must be one of the framing protocols offered by the other side in the |
492 | This must be one of the framing protocols offered by the other side in the |
490 | greeting. Each side must accept the choice of the other side. |
493 | greeting. Each side must accept the choice of the other side. |
491 | |
494 | |
492 | =back |
495 | =back |
493 | |
496 | |
494 | Example: |
497 | Example of an authentication reply: |
495 | |
498 | |
496 | hmac_md6_64_256;363d5175df38bd9eaddd3f6ca18aa1c0c4aa22f0da245ac638d048398c26b8d3;json |
499 | hmac_md6_64_256;363d5175df38bd9eaddd3f6ca18aa1c0c4aa22f0da245ac638d048398c26b8d3;json |
497 | |
500 | |
498 | =head2 DATA PHASE |
501 | =head2 DATA PHASE |
499 | |
502 | |
500 | After this, packets get exchanged using the chosen framing protocol. It is |
503 | After this, packets get exchanged using the chosen framing protocol. It is |
501 | quite possible that both sides use a different framing protocol. |
504 | quite possible that both sides use a different framing protocol. |
502 | |
505 | |
|
|
506 | =head2 FULL EXAMPLE |
|
|
507 | |
|
|
508 | This is an actual protocol dump of an handshake, followed by a single data |
|
|
509 | packet. The greater than/less than lines indicate the direction of the |
|
|
510 | transfer only. |
|
|
511 | |
|
|
512 | > aemp;0;nndKd+gn;10.0.0.1:4040;hmac_md6_64_256,cleartext;json,storable;provider=AE-0.0;peeraddr=127.0.0.1:1235 |
|
|
513 | > sRG8bbc4TDbkpvH8FTP4HBs87OhepH6VuApoZqXXskuG |
|
|
514 | < aemp;0;nmpKd+gh;127.0.0.1:1235,[::1]:1235;hmac_md6_64_256,cleartext;json,storable;provider=AE-0.0;peeraddr=127.0.0.1:58760 |
|
|
515 | < dCEUcL/LJVSTJcx8byEsOzrwhzJYOq+L3YcopA5T6EAo |
|
|
516 | > hmac_md6_64_256;9513d4b258975accfcb2ab7532b83690e9c119a502c612203332a591c7237788;json |
|
|
517 | < hmac_md6_64_256;0298d6ba2240faabb2b2e881cf86b97d70a113ca74a87dc006f9f1e9d3010f90;json |
|
|
518 | > ["","wkp","pinger","10.0.0.1:4040#nndKd+gn.a","resolved"] |
|
|
519 | |
503 | =head1 SEE ALSO |
520 | =head1 SEE ALSO |
504 | |
521 | |
505 | L<AnyEvent>. |
522 | L<AnyEvent>. |
506 | |
523 | |
507 | =head1 AUTHOR |
524 | =head1 AUTHOR |