indutny / asn1.js

ASN.1 Decoder/Encoder/DSL
MIT License
181 stars 64 forks source link

Code is currently checking bn.sign but should be bn.negative #109

Open satazor opened 5 years ago

satazor commented 5 years ago

https://github.com/indutny/asn1.js/blob/b99ce086320e0123331e6272f6de75548c6855fa/lib/asn1/encoders/der.js#L201

Shouldn't this be bn.negative instead of bn.sign? It seems that bn.sign was available in bn.js@2.0.0 but was renamed in recent versions.

Can you confirm if this is the case? If so, I can make a quick PR to fix it.