named-data/python-ndn

how to create cert with a bigger validity using pyndnsec

Closed this issue · 3 comments

Hi,
I would like to ask while I was using pyndnsec New-Item /pcnl/ndn/video/sz02/live, the 'NotAfter' filed seems only have +1 day of validity, and I don't see an option for pyndnsec to prolong it.

  • /pcnl/ndn/video/sz02/live
    +->* /pcnl/ndn/video/sz02/live/KEY/-F%96%1F%40%04%2F%05
    +->* /pcnl/ndn/video/sz02/live/KEY/-F%96%1F%40%04%2F%05/self/v=1649990055921
    Certificate name:
    /pcnl/ndn/video/sz02/live/KEY/-F%96%1F%40%04%2F%05/self/v=1649990055921
    Validity:
    NotBefore: 19700101T000000
    NotAfter: 20220415T023415 <------------------- out of date
    Public key bits:
    MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1h+7WRmW8/n7lJ6cfyMaDiGdYqQH
    9EFjUc5Df1e9RbmtjIXbPLRiCxTC5Dbyh/TY59YvOV8IEQRQQU30t4Y/Dw==
    Signature Information:
    Signature Type: SignatureSha256WithEcdsa
    Key Locator: /pcnl/ndn/video/sz02/live/KEY/-F%96%1F%40%04%2F%05

Thank you for reporting this. This is a bug and I have fixed it.

so, how do I prolong the validity? or should I use python-ndn v3.1?

You need to delete the certificate and create a new one.
You can use the latest pyndnsec (not published so you need to install from GitHub) or ndnsec.