diff --git a/android/android-certificate-unpinning.js b/android/android-certificate-unpinning.js index 4df1c91..c1310ab 100644 --- a/android/android-certificate-unpinning.js +++ b/android/android-certificate-unpinning.js @@ -130,6 +130,22 @@ const PINNING_FIXES = { } ], + // --- Native Conscrypt TrustManagerImpl + 'com.android.org.conscrypt.TrustManagerImpl': [ + { + methodName: 'verifyChain', + replacement: () => function(untrustedChain, trustAnchorChain, host, clientAuth, ocspData, tlsSctData) { + return untrustedChain; + } + }, + { + methodName: 'checkTrustedRecursive', + replacement: () => function(certs, host, clientAuth, untrustedChain, trustAnchorChain, used) { + return Java.use("java.util.ArrayList").$new(); + } + } + ], + // --- Native pinning configuration loading (used for configuration by many libraries) 'android.security.net.config.NetworkSecurityConfig': [ @@ -536,4 +552,4 @@ Java.perform(function () { }); console.log('== Certificate unpinning completed =='); -}); \ No newline at end of file +});