Skip to content

Instantly share code, notes, and snippets.

@makoto
Created May 9, 2018 11:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makoto/904b3173d49ec811882a2a812f2529c5 to your computer and use it in GitHub Desktop.
Save makoto/904b3173d49ec811882a2a812f2529c5 to your computer and use it in GitHub Desktop.
> sig.data.toString('hex')
'00100803000151807601bbea59e36fdaa7f7066574686c61620378797a0016105923b2daacf1ce5ffd5c8e25a95f42058ac5808086a8e1510f7aa828609564a85ea5bfb2a5699700a769fd0041e4d729df7ebc6855b8a37425280e7eaaf0'
> sigdata = foo.rrsig.decode(sig.data);
{ typeCovered: 'UNKNOWN_2051',
algorithm: 0,
labels: 1,
originalTTL: 1367373313,
expiration: 3152697827,
... }
> JSON.stringify(sigdata)
'{"typeCovered":"UNKNOWN_2051","algorithm":0,"labels":1,"originalTTL":1367373313,"expiration":3152697827,"inception":1876600823,"keyTag":1637,"signersName":"hlab\\u0003xyz\\u0000\\u0016\\u0010Y#�ڬ��_�\\\\�%�_B\\u0005�ŀ����Q\\u000fz�(`�d�^����i�\\u0000�i�\\u0000A��)�~�hU��t%(\\u000e~��","signature":{"type":"Buffer","data":[]}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment