Skip to content

draft-ietf-sshm-cert: section 2.2 error? #20

Description

@norrisjeremy

Hi,

I believe there may be an error in the last example presented in section 2.2:

Finally, the following is an example of a critical options section that contains a flag option "foo@example.com" and a string-valued option "force-command" with a the value "sftp".

  00000038                           # Criticial options len=56
    0000000f                         # 1st key string len=15
      666f6f406578616d706c652e636f6d #   "foo@example.com"
    00000000                         # 1st value string len=0
    0000000d                         # 2nd key string len=13
      666f7263652d636f6d6d616e64     #   "force-command"
    00000008                         # 2nd value string len=8
      00000004                       #   value body string len=4
        73667470                     #     "sftp"

I believe the above example should actually be encoded with a total length of 52 bytes (00000034), not 56 bytes (00000038):

0000000f == 4 bytes
666f6f406578616d706c652e636f6d == 15 bytes
00000000 == 4 bytes
0000000d == 4 bytes
666f7263652d636f6d6d616e64 == 13 bytes
00000008 == 4 bytes
00000004 == 4 bytes
73667470 == 4 bytes

4 + 15 + 4 + 4 + 13 + 4 + 4 + 4 = 52

I believe the example should therefore be:

  00000034                           # Critical options len=52
    0000000f                         # 1st key string len=15
      666f6f406578616d706c652e636f6d #   "foo@example.com"
    00000000                         # 1st value string len=0
    0000000d                         # 2nd key string len=13
      666f7263652d636f6d6d616e64     #   "force-command"
    00000008                         # 2nd value string len=8
      00000004                       #   value body string len=4
        73667470                     #     "sftp"

I also noticed and corrected a slight spelling error above as well ("Criticial" instead of "Critical").

Thanks!
Jeremy

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions