x509_cert_store 2.0.2
x509_cert_store: ^2.0.2 copied to clipboard
A Flutter plugin for Windows and macOS desktop applications that enables adding X.509 certificates to the local certificate store with trust settings support.
2.0.2 #
Fixed #
- Windows: an empty certificate (empty base64) no longer triggers an out-of-bounds read; it now fails cleanly with
X509ErrorCode.invalidFormat, matching macOS behavior. - Windows: hardened PEM parsing against malformed input where the
ENDmarker precedesBEGIN(previously surfaced asunknown; nowinvalidFormat). - macOS: fixed a
CFErrormemory leak on the certificate-comparison failure path (isNewerCertificate). - macOS: a failed certificate deletion during the "add newer" flow on the login keychain now surfaces as an error instead of being silently ignored, consistent with the system keychain.
- Dart: a non-
truenative result returned without an error is now reported asX509Failure(X509ErrorCode.unknown)instead of a falseX509Success.
Internal #
- Added a GitHub Actions CI pipeline (analyze, Dart unit tests, Windows/macOS native compile) and wired up the Windows native gtest target.
- Deduplicated the macOS login/system keychain implementations behind a shared
KeyChainManagerprotocol extension. - Centralized the method-channel error-category keys into named constants across the C++, Swift, and Dart layers.
2.0.1 #
Fixed #
- Windows: removed non-ASCII em-dash characters from
x509_cert_store_plugin.cppcomments. On hosts whose system codepage cannot represent them (e.g. Korean Windows / CP949), MSVC raisedC4819and Flutter's default/WXescalated it toC2220, breaking the build for any downstream app using this plugin.
2.0.0 #
BREAKING CHANGES #
X509ResValueclass and itshasError()/code/isOk/msgaccessors are removed.addCertificatenow returns a sealedX509Result(eitherX509SuccessorX509Failure); consumers must pattern-match on the result.X509Failurecarries the cross-platform category ascode: X509ErrorCode(a typed enum, no longer aString), amsg, and a nullablenativeCode: int?for unmapped-failure diagnostics.X509ErrorCodeenum expanded from 3 to 5 values:canceled,alreadyExist,accessDenied(new),invalidFormat(new),unknown. ThegetString()/fromString()helpers are removed.- Native plugins now own the
native-errcode → X509ErrorCodemapping. The Dart API no longer exposes raw native codes except via the optionalX509Failure.nativeCodefield for failures bucketed asunknown. - macOS no longer coerces failures into Windows DWORD literals (
"2148081669"etc.); each platform emits its own categorical key.
See MIGRATION.md for before/after examples for every common usage pattern. Design rationale lives in docs/adr/0001-sealed-result-type-with-categorical-error-codes.md and the closed RFC discussion in issue #3.
1.2.2 #
Fixed #
- Windows error codes are now exposed as numeric Win32 values (e.g.
2148081669forCRYPT_E_EXISTS,1223forERROR_CANCELLED) instead of the genericCERT_ADD_FAILEDliteral. This enablesresult.hasError(X509ErrorCode.alreadyExist)andresult.hasError(X509ErrorCode.canceled)to work cross-platform, matching the macOS contract.
1.2.1 #
Fixed #
- Fixed Swift compilation errors in macOS implementation
- Corrected protocol conformance issues in SystemKeyChain class
- Fixed missing bracket in certificate deletion logic
1.2.0 #
Added #
- Certificate trust functionality for macOS platform (using
setTrustedparameter) - Enhanced certificate management with trust settings support on macOS
- Comprehensive certificate existence checking with keychain-specific operations
Fixed #
- Fixed certificate addition issues on macOS that were preventing certificates from being added properly
- Improved certificate duplicate detection and replacement logic
- Enhanced error handling and logging for better debugging
Improved #
- Implemented fallback mechanisms for certificate trust operations when system-level permissions are not available
- Added detailed logging for certificate operations to help with troubleshooting
1.1.3 #
- update license
1.1.2 #
- update license
1.1.1 #
- Raised macOS deployment target to 10.13 for CocoaPods compatibility.
1.1.0 #
- Added macOS platform support
- Implemented certificate management on macOS:
- Support for adding certificates to the macOS Keychain
- Automatic conversion between PEM and DER formats on macOS
- Certificate duplicate detection and management
- Proper error handling with descriptive error codes
- Updated documentation to reflect macOS support
- Code organization improvements for cross-platform support
1.0.0 #
- First stable release
- Major code improvements:
- Consistent error handling across platforms
- Improved code organization with better separation of concerns
- Enhanced memory management in C++ code
- Better type safety in Dart code
- Proper resource cleanup and error handling in Windows implementation
- Complete documentation with usage examples
- Added proper error code handling with helper functions
- Enhanced certificate format detection (PEM/DER)
- Comprehensive test suite
- Added additional safeguards for certificate context management
0.9.5 #
- Added error code checking functionality with
hasError()method - Improved error reporting with specific error codes
- Enhanced return value structure for better error diagnosis
0.9.4 #
- Added support for PEM format certificates
- Automatic detection and conversion between PEM and DER formats
- Improved certificate parsing logic
0.9.3 #
- Improved error catching and reporting
- Better exception handling in native code
- More descriptive error messages
0.9.2 #
- Updated README.md with improved documentation
- Enhanced example code with proper error handling
- Exported necessary packages for easier use
0.9.1 #
- Improved README.md with better installation and usage instructions
- Added code examples and API reference
0.9.0 #
- Initial release
- Basic functionality to add certificates to the Windows certificate store
- Support for ROOT and MY store locations
- Support for different certificate addition modes