Skip to content

how to add an application parametet to signed interests? #46

@GlassyYang

Description

@GlassyYang

I use express_interest sending an signed interest with customed signatureinfo. I want to add an applicatioin parameter to the interest, which is like the following code when using ncn-cxx:

Block parameters = makeNonNegativeIntegerBlock(tlv::nfd::ExpirationPeriod, m_expiration->count());
interest.setApplicationParameters(parameters);

It seems like the app_param parameter of express_interest is a byte string, But I don't know how to generate the string. for instance, what kind of byte string can I use to produce the same interest packet as above c++ code? The document on this aspect is very rare.

Another question is that it seems like user cannot customize their signature info. When I want to add timestamp and nonce to signature, I have to add some codes to make_interest:

if signer is not None:
    interest.interest.signature_info = SignatureInfo()
    # code I added 
    interest.interest.signature_info.signature_time = timestamp()
    interest.interest.signature_info.signature_nonce = gen_nonce()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions