Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"SSL error: The certificate authority is not trusted" opening web view with proguard enabled #124

Open
mmartinelliGC opened this issue Aug 6, 2024 · 5 comments

Comments

@mmartinelliGC
Copy link

Getting the error "SSL error: The certificate authority is not trusted" in my react-native android project when opening any url in a webview. It only happens when proguard is enabled. I tried adding the following suggested in #41 to my proguard-rules file, but that didn't change anything.

-keep class com.appmattus.certificatetransparency.internal.verifier.CertificateTransparencyTrustManager { *; }

I'm getting a slightly different error so I'm not sure they are related. Any help would be appreciated. Thanks

@jmarnold
Copy link

I've been investigating this myself as well. I see the following whenever I open a webview:

8-20 09:59:12.962  2002  5214 D OplusDisplayPolicy: xxxxxxx no change cutoutMode: 0
08-20 09:59:13.016 11013 21168 W xxxxxxx: Accessing hidden method Landroid/security/net/config/RootTrustManager;->isSameTrustConfiguration(Ljava/lang/String;Ljava/lang/String;)Z (max-target-o, reflection, denied)
08-20 09:59:13.016 11013 21168 E cr_X509Util: Error creating trust manager (v5.g): java.lang.IllegalArgumentException: Required method checkServerTrusted(X509Certificate[], String, String, String) missing
08-20 09:59:13.017 11013 21168 E cr_X509Util: Could not find suitable trust manager
08-20 09:59:13.018  9708 10337 I Athena  : CommonAction: 24,1262,149,1270,2559,51,1.5406451,22
08-20 09:59:13.021 11013 21168 W xxxxxxx: Accessing hidden method Landroid/security/net/config/RootTrustManager;->isSameTrustConfiguration(Ljava/lang/String;Ljava/lang/String;)Z (max-target-o, reflection, denied)
08-20 09:59:13.021 11013 21168 E cr_X509Util: Error creating trust manager (v5.g): java.lang.IllegalArgumentException: Required method checkServerTrusted(X509Certificate[], String, String, String) missing
08-20 09:59:13.021 11013 21168 E cr_X509Util: Could not find suitable trust manager
08-20 09:59:13.022 11013 21168 W xxxxxxx: Accessing hidden method Landroid/security/net/config/RootTrustManager;->isSameTrustConfiguration(Ljava/lang/String;Ljava/lang/String;)Z (max-target-o, reflection, denied)
08-20 09:59:13.022 11013 21168 E cr_X509Util: Error creating trust manager (v5.g): java.lang.IllegalArgumentException: Required method checkServerTrusted(X509Certificate[], String, String, String) missing

@dsatija
Copy link

dsatija commented Sep 30, 2024

Hi @jmarnold did you find the solution for this issue ?

@dsatija
Copy link

dsatija commented Oct 1, 2024

i am facing the same issue

@Sar777
Copy link

Sar777 commented Oct 9, 2024

Hi, I've faced with the same issue..., tried the latest version of the library

@dsatija
Copy link

dsatija commented Oct 10, 2024

@Sar777 i was able to resolve this by adding below in proguard file:

-keep class com.appmattus.certificatetransparency.internal.verifier.CertificateTransparencyTrustManagerExtended { public ;}
-keepclassmembers class com.appmattus.certificatetransparency.internal.verifier.CertificateTransparencyTrustManagerExtended {
public java.util.List checkServerTrusted(java.security.cert.X509Certificate[], java.lang.String, java.lang.String);
}
-keepclassmembers class com.appmattus.certificatetransparency.internal.verifier.CertificateTransparencyTrustManagerExtended {
;}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants