I'm having slight problems reading the used format in an Internet-Draft: TokenBindingProtocol#Section6


enum {
   provided_token_binding(0), referred_token_binding(1), (255)
} TokenBindingType;

im not sure what the 255 stands for. I assume that these enum values are in the range from 0...255 i.e. represented by an 8 bit value?

struct {
    TokenBindingID tokenbindingid;
    opaque signature<0..2^16-1>;
    Extension extensions<0..2^16-1>;
} TokenBinding;

here its absolutely not clear how to interpet the <0..2^16-1> suffix. I think it is some kind of size indicator, i.e. the value of signature can have a maximum length of 2^16-1 but am not sure... Also for the extensions field which references the struct Extension it's unclear. In my eyes it could mean the extensions field references 0 up to 2^16-1 extensions, or the sum of all extension data is up to 2^16-1

Also I could not find any document explaining this format. Is it like well known pseudo-code or are there any resources?

1 Answer 1


It is a vector of specified size. I think everything you needed is documented here.

  • thanks! little weird that this is described in the TLS RFC though
    – jannikb
    Jun 3, 2015 at 17:09
  • It took me a bit to find but I've seen similar with other RFCs so I had a clue. Jun 3, 2015 at 17:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.