Skip to content

Commit

Permalink
Problem: it's not clear that the flags octet is always clear
Browse files Browse the repository at this point in the history
Solution: clarified in the text.
  • Loading branch information
hintjens committed Jan 28, 2016
1 parent 8129faf commit 1de9ff1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec_37.txt
Expand Up @@ -169,9 +169,9 @@ A peer announces precisely one security mechanism, unlike SASL, which lets serve

Each security mechanism defines a protocol consisting of zero or more commands sent by either peer to the other until the handshaking is complete or either of the peers refuses to continue, and closes the connection.

Commands are single frames consisting of a size field, and a body. If the body is 0-255 octets, the command SHOULD use a short size field (%x04 followed by 1 octet). If the body is 256 or more octets, the command SHOULD use a long size field (%x06 followed by 8 octets).
Commands are single frames consisting of a flags octet, a size field, and a body. If the body is 0-255 octets, the command SHOULD use a short size field (%x04 followed by 1 octet). If the body is 256 or more octets, the command SHOULD use a long size field (%x06 followed by 8 octets).

The size field is always in clear text. The body may be partially or fully encrypted. ZMTP does not define the syntax nor semantics of commands. These are fully defined by the security mechanism protocol.
The flags octet and the size field is always in clear text. The body may be partially or fully encrypted. ZMTP does not define the syntax nor semantics of commands. These are fully defined by the security mechanism protocol.

The supported mechanism is not considered sensitive information. A peer that reads a full greeting, including mechanism, MUST also send a full greeting including mechanism. This avoids deadlocks in which two peers each wait for the other to divulge the remainder of their greeting.

Expand All @@ -187,7 +187,7 @@ To avoid connection storms, peers should reconnect after a short and possibly ra

+++ Framing

Following the greeting, which has a fixed size of 64 octets, all further data is sent as //frames//, which carry commands or messages. Frames consist of a size field, a flags fields, and a body. The frame design is meant to be efficient for small frames but capable of handling extremely large data as well.
Following the greeting, which has a fixed size of 64 octets, all further data is sent as //frames//, which carry commands or messages. The frame design is meant to be efficient for small frames but capable of handling extremely large data as well.

A frame consists of a flags field (1 octet), followed by a size field (one octet or eight octets) and a frame body of size octets. The size does not include the flags field, nor itself, so an empty frame has a size of zero.

Expand Down

0 comments on commit 1de9ff1

Please sign in to comment.