axel3rd / mpg-coach-bot

MPG (Mon Petit Gazon) coach bot, to automate and optimize weekly actions
https://axel3rd.github.io/mpg-coach-bot/
MIT License
23 stars 8 forks source link

Authorize untrusted/expired SSL certificates #149

Closed axel3rd closed 4 years ago

axel3rd commented 4 years ago

Some websites endpoint can have expired/untrusted certificate ; like https://www.equipeactu.fr/ which have expired certificate since January 1.

In this case this exception occurs:

javax.ws.rs.ProcessingException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        ...
    at org.blondin.mpg.AbstractClient.call(AbstractClient.java:114)
        ...
    at org.blondin.mpg.out.InjuredSuspendedEquipeActuClient.getHtmlContent(InjuredSuspendedEquipeActuClient.java:172)
    at org.blondin.mpg.out.InjuredSuspendedEquipeActuClient.getPlayers(InjuredSuspendedEquipeActuClient.java:177)
    at org.blondin.mpg.out.InjuredSuspendedEquipeActuClient.getPlayer(InjuredSuspendedEquipeActuClient.java:156)
    at org.blondin.mpg.out.InjuredSuspendedWrapperClient.getPlayer(InjuredSuspendedWrapperClient.java:47)
    at org.blondin.mpg.Main.removeOutPlayers(Main.java:328)
    at org.blondin.mpg.Main.processGames(Main.java:174)
    at org.blondin.mpg.Main.processLeague(Main.java:111)
    at org.blondin.mpg.Main.process(Main.java:82)
    at org.blondin.mpg.Main.main(Main.java:67)
        ...
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        ...
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        ...
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        ...

An option to authorize untrusted/expired SSL certificates can be great in this case.

axel3rd commented 4 years ago

like https://www.equipeactu.fr/ which have expired certificate since January 1.

Has been updated, but currently only linked to holdnyt.dk, www.holdnyt.dk domains.

axel3rd commented 4 years ago

https://www.equipeactu.fr certificate is fixed => fix only included in next major version (not planned, waiting some feature)