Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what is the " CONTENT-TYPE" value if the mataInfo is 1 or 2? #6

Open
Pabears opened this issue Aug 15, 2023 · 1 comment
Open

what is the " CONTENT-TYPE" value if the mataInfo is 1 or 2? #6

Pabears opened this issue Aug 15, 2023 · 1 comment

Comments

@Pabears
Copy link

Pabears commented Aug 15, 2023

CertificateContent = CONTENT-TYPE TLV-LENGTH SubjectPublicKeyInfo

  1. I don't know what the value of content-type should be if the contentType in metainfo is 1 or 2.
  2. If we use a TLV, why do we need the ContentType in the Metainfo? we can just let the content in Data is a TLV too, and the T is 0,1,2 or others.
    thanks!
@Pabears
Copy link
Author

Pabears commented Aug 15, 2023

  1. I think we could define a tow layers protocol,
    first, the TLV-codec layer encodes TLV to binary or decodes TLV from binary
    second, a TLV-explainer layer, explains a TLV with a TLV schema so that we can explain and validate a TLV tree.
    for example:
    we have a TLV-encoded binary: 0x06 0x08 0x08 0x00 0x08 0x04 0x08 0x02 0x08 0x08
    we don't know how to explain the TLV, we could decode the binary to :
    1. TLV{type=6, value=0x08 0x00 0x08 0x04 0x08 0x02 0x08 0x08 }
    2. TLV{type=6, value=TLV{type=8, value=}TLV{type=8, value=0x08 0x02 0x08 0x08 }}
    3. TLV{type=6, value=TLV{type=8, value=}TLV{type=8, value=TLV{type=8, value=0x08 0x08 }}}
      so if we only have the TLV codec, we don't know what the mean binary is, we can define a TLV schema like:
      (6(8*)),
      so we can confirm the right decode is 2. We can share the schema with others, so everyone can explain the TLV.
      If we are a NFD, we can just try to explain the first level of the TLV tree, so we can have good performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant