IETF-SSH archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

define string



Section 5.1 of draft-ietf-secsh-transport-15.txt describes the format of
the payload of binary packet used to negotiate the algorithms, namely

     byte      SSH_MSG_KEXINIT
     byte[16]  cookie (random bytes)
     string    kex_algorithms
     string    server_host_key_algorithms
     string    encryption_algorithms_client_to_server
     string    encryption_algorithms_server_to_client
     string    mac_algorithms_client_to_server
     string    mac_algorithms_server_to_client
     string    compression_algorithms_client_to_server
     string    compression_algorithms_server_to_client
     string    languages_client_to_server
     string    languages_server_to_client

I havent read this RFC before, nor have a played with the code of any
ssh software, when looking at these fields i just assumed string was a
sequence of printable characters terminated by a '\0'.


By trying to talk to openssh and lsh servers i worked out a string is

char string_length
char *string
char extra_terminators[3]

I understand why string_length is there, its can make it easier to
handle the string, but why are there three extra '\0' terminators ?

Irrespective of the reasoning i think the format of the string should be
documented somewhere, im sure im not the only person who has been caught
by this.

I thought maybe there was a RFC that defined standard types for all
RFC's, such as there is for standard terms (RECOMMENDS, SHOULD etc), i
searched but didnt find anything.


Thanks

Glenn 

Attachment: pgpU7LFB_pH_j.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index