diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..e7618f1 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "[dart]": { + "editor.formatOnSave": true + }, + "editor.codeActionsOnSave": { + "source.organizeImports": true + }, + } + \ No newline at end of file diff --git a/example/.vscode/launch.json b/example/.vscode/launch.json new file mode 100644 index 0000000..7ed481f --- /dev/null +++ b/example/.vscode/launch.json @@ -0,0 +1,12 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Debug", + "request": "launch", + "type": "dart", + "program": "lib/main.dart", + "flutterMode": "debug", + }, + ] +} \ No newline at end of file diff --git a/example/.vscode/settings.json b/example/.vscode/settings.json new file mode 100644 index 0000000..e7618f1 --- /dev/null +++ b/example/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "[dart]": { + "editor.formatOnSave": true + }, + "editor.codeActionsOnSave": { + "source.organizeImports": true + }, + } + \ No newline at end of file diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index a6f13fc..d69260b 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -3,7 +3,7 @@ PODS: - CryptoSwift (1.7.1) - Flutter (1.0.0) - http_certificate_pinning (1.0.3): - - Alamofire (~> 4.7) + - Alamofire (~> 4.9.1) - CryptoSwift - Flutter @@ -26,8 +26,8 @@ SPEC CHECKSUMS: Alamofire: 85e8a02c69d6020a0d734f6054870d7ecb75cf18 CryptoSwift: d3d18dc357932f7e6d580689e065cf1f176007c1 Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 - http_certificate_pinning: 23157eae20c5887e49372b3cbe7a1d5863eb9bad + http_certificate_pinning: 2a9097b304c7ea3b51804af46d381aba8108fa29 PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3 -COCOAPODS: 1.11.3 +COCOAPODS: 1.12.1 diff --git a/ios/http_certificate_pinning.podspec b/ios/http_certificate_pinning.podspec index c386dfa..bded0e8 100644 --- a/ios/http_certificate_pinning.podspec +++ b/ios/http_certificate_pinning.podspec @@ -16,7 +16,7 @@ Https Certificate pinning for Flutter s.source_files = 'Classes/**/*' s.dependency 'Flutter' s.dependency 'CryptoSwift' - s.dependency 'Alamofire', '~> 4.7' + s.dependency 'Alamofire', '~> 4.9.1' s.platform = :ios, '8.0' # Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported. diff --git a/lib/src/dio/certificate_pinning_interceptor.dart b/lib/src/dio/certificate_pinning_interceptor.dart index 9e67cef..35229d9 100644 --- a/lib/src/dio/certificate_pinning_interceptor.dart +++ b/lib/src/dio/certificate_pinning_interceptor.dart @@ -20,6 +20,7 @@ class CertificatePinningInterceptor extends Interceptor { : [], _timeout = timeout; + @override Future onRequest( RequestOptions options, @@ -56,6 +57,7 @@ class CertificatePinningInterceptor extends Interceptor { requestOptions: options, error: CertificateNotVerifiedException(), ), + callFollowingErrorInterceptor, ); } } on Exception catch (e) {