sop/asn1
sop/asn1 is a pure-PHP library for encoding and decoding ASN.1 data (BER/DER), with an object-oriented API for building and parsing elements. Useful for X.509 certificates, PKCS, SNMP, LDAP, and other binary protocols.
openssl extension quirks) in constrained hosting environments.Adopt when:
openssl_x509_* covering your use case, or on OpenSSL's full ASN.1 surface).Look elsewhere when:
openssl extension (basic cert parsing/verification) — don't add a dependency for parity.openssl or a dedicated crypto package..asn1 spec files into code) — this is a runtime DER codec, not a full ASN.1 toolchain.To executives: This is a small, MIT-licensed PHP library that unlocks a class of high-value features — certificate and signature handling for compliance, e-signature, and security workflows — without a rewrite or a vendor contract. It's low-cost, low-risk, and removes a technical blocker from the roadmap. Adoption is a one-day integration; the value is in what it enables (auditable PKI features, e-invoicing, mTLS support) rather than what it is.
To engineering: sop/asn1 is a focused DER encoder/decoder — do one thing well, pure PHP, no extension requirements, actively released. It saves us from writing binary parsers (a classic source of security bugs) and gives us structured access to certificate and CMS fields that openssl_x509_parse flattens or hides. Treat it as a low-level primitive: pair it with openssl/sodium for actual crypto operations, pin the version, and add a smoke test around DER round-tripping. Maintainer risk is real (small project), so plan to vendor or fork if it becomes critical-path.
How can I help you explore Laravel packages today?