diff options
author | Stuart Stock <stuart@int08h.com> | 2017-06-22 16:34:53 -0500 |
---|---|---|
committer | Stuart Stock <stuart@int08h.com> | 2017-06-22 16:34:53 -0500 |
commit | 830e0b9782ba0181a94c436761585ba47b25b0d7 (patch) | |
tree | af9a229b1a8ff62d83342b4a6418bb365d38b03b /src/tag.rs | |
parent | dc17df4885cef546ed44d14a291ba782b82d93ed (diff) | |
download | roughenough-830e0b9782ba0181a94c436761585ba47b25b0d7.zip |
simplistic semi-working server
Diffstat (limited to 'src/tag.rs')
-rw-r--r-- | src/tag.rs | 23 |
1 files changed, 5 insertions, 18 deletions
@@ -4,26 +4,13 @@ pub enum Tag { // Enforcement of the "tags in strictly increasing order" rule is done using the // little-endian encoding of the ASCII tag value; e.g. 'SIG\x00' is 0x00474953 and - // 'NONC' is 0x434e4f4e. The tags are listed here is reverse lexical order which - // matches the little-endian comparison order. - SREP, - SIG, - ROOT, - RADI, - PUBK, - PATH, - PAD, - NONC, - MINT, - MIDP, - MAXT, - INDX, - DELE, - CERT, + // 'NONC' is 0x434e4f4e. + + SIG, NONC, DELE, PATH, RADI, PUBK, MIDP, SREP, MINT, ROOT, CERT, MAXT, INDX, PAD } -static PAD_VALUE: [u8; 4] = [b'P', b'A', b'D', 0x00]; -static SIG_VALUE: [u8; 4] = [b'S', b'I', b'G', 0xff]; +static PAD_VALUE: [u8; 4] = [b'P', b'A', b'D', 0xff]; +static SIG_VALUE: [u8; 4] = [b'S', b'I', b'G', 0x00]; impl Tag { /// Translates a tag into its on-the-wire representation |