openssl_bindings 0.3.0
openssl_bindings: ^0.3.0 copied to clipboard
FFI bindings to OpenSSL cryptographic library for Dart, providing native access to encryption, hashing, and SSL/TLS functionality.
0.1.0 #
- Initial release of OpenSSL bindings for Dart.
- Supports loading OpenSSL symbols dynamically (dlopen).
- Core features implemented:
- Crypto: EVP keys management (RSA key generation, loading PEM/DER).
- X.509: Certificate parsing (Subject, Issuer, Serial, Validity, Version), creating self-signed certificates, signing CSRs.
- CMS/PKCS#7: Detached signing (PAdES compatible) using
signDetachedandsignDetachedDigest. - TLS/DTLS:
SecureSocketOpenSSLAsync: Async TLS client/server socket (dart:io compatible interface).SecureSocketOpenSSLSync: Synchronous TLS client/server socket.DtlsClient/DtlsServer: DTLS 1.2+ support over UDP.
- Infrastructure:
- Memory safe architecture using explicit allocators and finalizers.
- Flexible library loading: supports custom paths for
libcryptoandlibsslvia constructor injection or environment variables (OPENSSL_LIBCRYPTO_PATH,OPENSSL_LIBSSL_PATH). - Unit tests covering key generation, certificate building, CMS signing, and SSL/TLS communication.
0.2.0 #
- HTTP/HTTPS Support:
- Introduced
OpenSslHttpClientandOpenSslHttpServerbuilt on OpenSSL BIOs. - Added multi-threaded web server example with isolate support (
example/openssl_web_server.dart).
- Introduced
- Cryptographic Enhancements:
- Ciphers: Added AES (CBC, GCM) and generic cipher support (
CipherMixin). - Hashing & MAC: implemented Digest, HMAC, and PBKDF2.
- Elliptic Curves: Added EC key generation and ECDSA signing/verification.
- PKCS#12: Added support for loading and parsing PKCS#12 bundles.
- Ciphers: Added AES (CBC, GCM) and generic cipher support (
- X.509 & CMS:
- Extensions: Added builder support for Subject Alternative Names (SAN), Key Usage, Extended Key Usage, and Basic Constraints.
- CMS: Added signature verification capabilities (
verifyDetached). - ICP-Brasil: Added helper for ICP-Brasil specific OIDs and extensions.
- TLS/SSL:
- Improved
SecureSocketOpenSslAsyncreliability (fixed hangs, addedrecvExact). - Validated parallel SSL session support.
- Improved
- Internal:
- Refactored native buffer utilities.
- Updated FFI bindings.
0.3.0 #
- Breaking change: Renamed the generated FFI bindings class from
OpenSsltoOpenSslFfifor clarity. - Critical fix: Resolved heap corruption on Linux caused by the
struct tmsize mismatch between Windows and Linux when callingASN1_TIME_to_tm.- Windows
struct tmis 36 bytes; Linux/glibc is larger due totm_gmtoffandtm_zone. - Added platform-specific
tmsizing and safe allocation to prevent buffer overflows.
- Windows
- Memory safety:
- Re-enabled and audited
NativeFinalizerusage across key wrappers. - Fixed missing finalizer attachment in the base
SslObjecthelper.
- Re-enabled and audited
- CI/Testing:
- Added memory-safety regression test for repeated
ASN1_TIME_to_tmparsing. - Linux CI now uses
MALLOC_CHECK_andMALLOC_PERTURB_for earlier detection of heap corruption.
- Added memory-safety regression test for repeated