secure_pinning 0.0.2
secure_pinning: ^0.0.2 copied to clipboard
Certificate pinning for Flutter with SPKI pinning by default, a pure-Dart validation engine, and typed exceptions across every platform.
0.0.2 #
- Drop the
secure_pinning_windows,secure_pinning_linux, andsecure_pinning_webdependencies.package:http/Dio/raw-HttpClientpinning is unaffected on Windows and Linux (it's pure-Dart, never gated by a platform package) — only the nativeSecurePinning.check()probe, which was stubbed on those two anyway, no longer has even a stub registered there. Web was already permanently unsupported for everything and remains so.
0.0.1 #
- Initial release.
- Three pinning modes:
PinningMode.spki(public-key hash, the default),PinningMode.legacyLeafHash(whole-certificate hash, for compatibility with plugins that pin the full leaf certificate instead of just its public key), andPinningMode.legacyCaHash(CA/root pinning, gated behind a requiredacknowledgedRiskjustification). - A pure-Dart validation engine that hooks
dart:io'sHttpClient.badCertificateCallbackdirectly — validates the real connection your request uses, with no separate preflight round trip. - SHA-256 and SHA-1 hash algorithm support.
- Backup-pin support and configurable connect/read timeouts.
- A typed exception hierarchy (
SecurePinningValidationException,SecurePinningTimeoutException,SecurePinningConfigurationException,SecurePinningUnsupportedPlatformException,SecurePinningNetworkException) consistent across every platform and integration surface. - A native probe API (
SecurePinning.check()andSecurePinning.isPlatformSupported()) for one-off checks and for validatingPinningMode.legacyCaHash, which requires walking the full certificate chain. - Zero third-party dependencies beyond
crypto.