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

java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. #55

Open
YassineChe opened this issue Jul 28, 2022 · 2 comments
Assignees

Comments

@YassineChe
Copy link

Hello guys, I'm getting this error
java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
Any suggestion ?

@omar-hadek
Copy link

omar-hadek commented Oct 31, 2022

i think this error related to http with older devices
if you are using http package try override the client trust the certificate
class MyHttpOverrides extends HttpOverrides { @override HttpClient createHttpClient(SecurityContext? context) { return super.createHttpClient(context) ..badCertificateCallback = (X509Certificate cert, String host, int port) => true; } }
call it inside main
void main() async { HttpOverrides.global = new MyHttpOverrides(); ...

@mark-hkz
Copy link

mark-hkz commented Aug 9, 2023

I'm getting the same exception even with HttpOverrides

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