Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
pyasn1-fasder is a DER decoder for pyasn1 with a focus on checking the correctness of encoding. This decoder is more pedantic than most other decoders in terms of flagging DER encoding errors, and this behavior is unlikely to change.
pip install pyasn1-fasder
pyasn1-fasder exposes a single function: decode_der
. The signature and return type are the same as the pyasn1 decode
function, as it is intended to be a drop-in replacement of pyasn1.codec.der.decoder.decode
.
from pyasn1.type.char import PrintableString
from pyasn1_fasder import decode_der
substrate = b'\x13\x03\x41\x42\x43'
decoded, rest = decode_der(substrate, asn1Spec=PrintableString())
assert rest == b''
assert str(decoded) == 'ABC'
substrate
TLV are not tolerated and will result in an exception being raised. In other words, the rest
component of the tuple return value will always be an empty bytes
object.None
asn1Spec
must be passed to decode_der
.Set
s with namedTypes
are not supported. These are (almost?) never used in cryptography standards, but support can be added if there are valid use cases.openTypes
decoding is currently not supported. This can be added if there is interest.Please create a Github issue.
Contributions for bug fixes and new features are welcome.
FAQs
A DER decoder for pyasn1 built to detect encoding errors
We found that pyasn1-fasder demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.