trustpin_sdk 6.3.0
trustpin_sdk: ^6.3.0 copied to clipboard
A Flutter plugin for TrustPin SSL certificate pinning SDK that provides enhanced security for network connections by validating SSL certificates against configured pins.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
6.3.0 - 2026-08-26 #
Added #
TrustPinConfiguration.embeddedConfigurationFile: name of a signed configuration bundled with the app (an iOS/macOS bundle resource, an Android asset), used only when no online source and no previously fetched configuration is available, typically the app's very first start during an outage. It is verified againstpublicKeyduring setup. Intended only for apps whose bundled resources are protected by RASP; see "Embedded configuration" in the README.- The same file can be declared in the platform configuration files read by
setupWithNativeBundle:EmbeddedConfigurationFileinTrustPin-Info.plist,embedded_configuration_assetintrustpin.json.
Changed #
- Updated iOS/macOS native SDK to 6.3.0 and Android native SDK to 6.3.0.
- A configuration the SDK has fetched and validated is now retained on the device and remains usable after a process restart when every configuration source is unreachable.
6.2.0 - 2026-07-20 #
Changed #
- Updated iOS/macOS native SDK to 6.2.0 and Android native SDK to 6.2.0.
Native dependencies now accept patch updates within 6.2.x instead of an
exact pin (SwiftPM
upToNextMinor, CocoaPods~>, Gradlestrictly("[6.2.0, 6.3.0)")).
6.1.0 - 2026-07-09 #
Added #
TrustPin.validationEvents— static broadcast stream ofTrustPinValidationEvent, surfacing the native SDKs' new validation telemetry hook. Events fire for definitive pin verdicts only (PINS_MISMATCH,ALL_PINS_EXPIRED,DOMAIN_NOT_REGISTEREDin strict mode, plus successes on registered domains) and are observe-only: the verdict is decided before the event is emitted. Failure events carry the presented leaf certificate as PEM. One stream covers all instances; the native listener is installed on first listen and removed on last cancel.TrustPin.logs— static broadcast stream ofTrustPinLogEvent, surfacing the native SDKs' new global log sink. Routes SDK log output (level, instanceId, message) into the host app's logging pipeline; while no one listens the SDK keeps logging to its platform default. Per-instance verbosity remains controlled bysetLogLevel. The native sink is installed on first listen and removed on last cancel.- New Android-only error codes surfaced through
TrustPinException:SETUP_IN_PROGRESS(isSetupInProgress),LOCK_TIMEOUT(isLockTimeout),SSL_CONTEXT_SETUP_FAILED(isSslContextSetupFailed), andUNSUPPORTED_DEVICE(isUnsupportedDevice). These cases previously collapsed intoINVALID_PROJECT_CONFIG. An operation attempted beforesetupstill maps toINVALID_PROJECT_CONFIGon every platform.
Changed #
- Updated iOS/macOS native SDK to 6.1.0 and Android native SDK to 6.1.2.
No deployment-target or
minSdkchanges. - Timeouts for
fetchCertificateandvalidateConnectionare now enforced by the native SDKs (timeout:overloads on iOS/macOS, thetimeoutparameter on Android) instead of a plugin-level race. ForvalidateConnectionthe caller's timeout still bounds the composed operation: the verify phase receives whatever the fetch phase left of the budget. Timeouts keep surfacing asFETCH_CERTIFICATE_TIMEOUT.
6.0.0 - 2026-06-18 #
Added #
TrustPin.awaitConfiguration({timeout})— explicit fail-closed gate that waits until the pinning configuration has been fetched, signature-verified, and accepted by the SDK's integrity check. Pairs with the now non-blockingsetup.TrustPin.isConfigurationLoaded— synchronous, non-fetching state read reporting whether a validated pinning payload is currently cached.- New error codes surfaced through
TrustPinException:ALREADY_INITIALIZED(withisAlreadyInitialized) andCONFIG_INTEGRITY_FAILED(withisConfigIntegrityFailed).
Changed #
- Updated iOS/macOS native SDK to 6.0.0 and Android native SDK to 6.0.0.
- Raised minimum deployment targets to match TrustPinKit 6.0.0: iOS 15,
macOS 13, watchOS 8, tvOS 15, visionOS 2. Apps consuming this plugin must
raise their iOS deployment target to 15.0 (the sample app was updated to
match). Android
minSdkis unchanged at 25. setupis now non-blocking and one-shot. It performs local credential validation and starts a background preload of the pinning configuration; it no longer waits on the network. Fetch and validation errors now surface fail-closed fromvalidateConnection/verify, or eagerly fromawaitConfiguration, rather than fromsetup. Callingsetupa second time on the same instance throwsALREADY_INITIALIZED— create a separate named instance viaTrustPin.instance(id)for a different pinning context.- Certificate verification is fail-closed in both strict and permissive
modes: when no validated configuration is available, verification fails with
ERROR_FETCHING_PINNING_INFOregardless of mode. - Internal: the iOS and macOS native sources are now a single shared
darwin/source set (sharedDarwinSource) instead of two near-identical copies, with#if-guarded platform differences. No effect on consumers — both CocoaPods and Swift Package Manager integration paths are unchanged.
5.0.0 - 2026-05-22 #
4.3.0 - 2026-05-14 #
Added #
TrustPin.validateConnection(host, {port, timeout})— atomic "is this connection allowed?" entry point. The platform composes the certificate fetch and pin verification inside a single channel call, so the certificate never enters the Dart isolate. Thetimeoutargument bounds the entire operation, closing the gap whereverifypreviously could not be time-limited.TrustPinConfiguration.fromAssetsfor loading the SDK configuration from a bundledtrustpin.jsonasset (shares the JSON schema with the Android SDK)
Changed #
TrustPinHttpClientandTrustPinDioInterceptornow route HTTPS requests throughvalidateConnection. No source changes required for callers; every HTTPS request now takes one channel hop instead of two. The interceptors no longer hold any pinning-related Dart state (no caches, no in-flight tracking).- Updated iOS/macOS native SDK to 4.3.1
- Updated Android native SDK to 4.3.2
- Aligned iOS/macOS Swift Package Manager manifests with the Swift 6.1 toolchain requirement used by CocoaPods and documented in the README.
- iOS/macOS now reject malformed
configurationURLvalues withINVALID_PROJECT_CONFIG, matching Android behavior. - Android minSdk bumped from 21 to 25 to match the requirement of the
underlying
cloud.trustpin:kotlin-sdk:4.3.2. Apps consuming this plugin must declareminSdk >= 25in theirandroid/app/build.gradle.
Deprecated #
TrustPin.verify(domain, certificate)andTrustPin.fetchCertificate(host, {port, timeout})are deprecated in favor ofTrustPin.validateConnection. The deprecated methods still work and remain useful for diagnostic flows (for example, computing a SHA-256 fingerprint from the raw PEM), but will be removed in a future major release. The same deprecations apply to the correspondingTrustPinSDKPlatformmethods.
3.0.1 - 2026-02-23 #
Changed #
- Added Swift Package Manager support for iOS and macOS
- Updated documentation
3.0.0 - 2026-02-19 #
Added #
fetchCertificate()for OS-level TLS leaf certificate extractionTrustPinConfigurationclass for SDK initializationconfigurationURLparameter for self-hosted configurationsTrustPinDioInterceptorfor Dio integrationTrustPinHttpClientfor http package integrationTrustPin.sharedandTrustPin.instance('id')for named instances
Changed #
- Renamed
TrustPinSDKclass toTrustPinwith instance-based API - Updated native SDKs