#language cs ## 20211206 AK ---- '''česky''' | [[HowToDocuments/Validation|english]] ---- Zpět na [[HowToDocuments/CZ | Podpora - Návody ]] == Ověření v aplikaci Java Webstart == === Problém === Už několik týdnů mám problém s aplikací Java Webstart podepsanou certifikátem CAcert. Proces validace se přeruší a není možné ji spustit. Zkontroloval jsem a obnovil všechny své certifikáty, ale nepomáhá to. A v logu je pojmenováno datum 08/24/2021, které v mém certifikátu nikde není. Nemůže to být tím, že ověřovací služba na cacert.org potřebuje aktualizaci certifikátu? {{{ java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Responder's certificate not within the validity period at com.sun.deploy.security.RevocationChecker.checkOCSP(Unknown Source) at com.sun.deploy.security.RevocationChecker.check(Unknown Source) at com.sun.deploy.security.TrustDecider.checkRevocationStatus(Unknown Source) at com.sun.deploy.security.TrustDecider.getValidationState(Unknown Source) at com.sun.deploy.security.TrustDecider.validateChain(Unknown Source) at com.sun.deploy.security.TrustDecider.isAllPermissionGrantedInt(Unknown Source) at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(Unknown Source) at com.sun.javaws.security.AppPolicy.grantUnrestrictedAccess(Unknown Source) at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResourcesHelper(Unknown Source) at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResources(Unknown Source) at com.sun.javaws.Launcher.prepareResources(Unknown Source) at com.sun.javaws.Launcher.prepareAllResources(Unknown Source) at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source) at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source) at com.sun.javaws.Launcher.launch(Unknown Source) at com.sun.javaws.Main.launchApp(Unknown Source) at com.sun.javaws.Main.continueInSecureThread(Unknown Source) at com.sun.javaws.Main.access$000(Unknown Source) at com.sun.javaws.Main$1.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Suppressed: com.sun.deploy.security.RevocationChecker $StatusUnknownException: sun.security.provider.certpath.PKIX $CertStoreTypeException: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Responder's certificate not within the validity period at com.sun.deploy.security.RevocationChecker.checkCRLs(Unknown Source) ... 19 more Caused by: sun.security.provider.certpath.PKIX$CertStoreTypeException: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Responder's certificate not within the validity period at sun.security.provider.certpath.URICertStore.engineGetCRLs(Unknown Source) at java.security.cert.CertStore.getCRLs(Unknown Source) at sun.security.provider.certpath.DistributionPointFetcher.getCRL(Unknown Source) at sun.security.provider.certpath.DistributionPointFetcher.getCRLs(Unknown Source) at sun.security.provider.certpath.DistributionPointFetcher.getCRLs(Unknown Source) at sun.security.provider.certpath.DistributionPointFetcher.getCRLs(Unknown Source) at com.sun.deploy.security.RevocationChecker$3.run(Unknown Source) at com.sun.deploy.security.RevocationChecker$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at com.sun.deploy.security.RevocationChecker.getCRLsPrivileged(Unknown Source) ... 20 more Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Responder's certificate not within the validity period at sun.security.ssl.Alert.createSSLException(Unknown Source) at sun.security.ssl.TransportContext.fatal(Unknown Source) at sun.security.ssl.TransportContext.fatal(Unknown Source) at sun.security.ssl.TransportContext.fatal(Unknown Source) at sun.security.ssl.CertificateMessage $T12CertificateConsumer.checkServerCerts(Unknown Source) at sun.security.ssl.CertificateMessage $T12CertificateConsumer.onCertificate(Unknown Source) at sun.security.ssl.CertificateMessage $T12CertificateConsumer.consume(Unknown Source) at sun.security.ssl.SSLHandshake.consume(Unknown Source) at sun.security.ssl.HandshakeContext.dispatch(Unknown Source) at sun.security.ssl.HandshakeContext.dispatch(Unknown Source) at sun.security.ssl.TransportContext.dispatch(Unknown Source) at sun.security.ssl.SSLTransport.decode(Unknown Source) at sun.security.ssl.SSLSocketImpl.decode(Unknown Source) at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.access $200(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessController.doPrivilegedWithCombiner(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source) ... 30 more Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Responder's certificate not within the validity period at com.sun.deploy.security.RevocationChecker.checkOCSP(Unknown Source) at com.sun.deploy.security.RevocationChecker.check(Unknown Source) at com.sun.deploy.security.RevocationCheckHelper.doRevocationCheck(Unknown Source) at com.sun.deploy.security.RevocationCheckHelper.doRevocationCheck(Unknown Source) at com.sun.deploy.security.RevocationCheckHelper.checkRevocationStatus(Unknown Source) at com.sun.deploy.security.X509TrustManagerDelegate.checkTrusted(Unknown Source) at com.sun.deploy.security.X509Extended7DeployTrustManagerDelegate.checkServerTrusted(Unknown Source) at com.sun.deploy.security.X509Extended7DeployTrustManager.checkServerTrusted(Unknown Source) ... 52 more Suppressed: com.sun.deploy.security.RevocationChecker $StatusUnknownException at com.sun.deploy.security.RevocationChecker.checkCRLs(Unknown Source) ... 59 more Caused by: java.security.cert.CertPathValidatorException: Responder's certificate not within the validity period at sun.security.provider.certpath.OCSPResponse.verify(Unknown Source) at sun.security.provider.certpath.OCSP.check(Unknown Source) at sun.security.provider.certpath.OCSP.check(Unknown Source) at com.sun.deploy.security.RevocationChecker$2.run(Unknown Source) at com.sun.deploy.security.RevocationChecker$2.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at com.sun.deploy.security.RevocationChecker.doPrivilegedOCSPCheck(Unknown Source) ... 60 more Caused by: java.security.cert.CertificateExpiredException: NotAfter: Tue Aug 24 16:12:48 CEST 2021 at sun.security.x509.CertificateValidity.valid(Unknown Source) at sun.security.x509.X509CertImpl.checkValidity(Unknown Source) ... 67 more Caused by: java.security.cert.CertPathValidatorException: Responder's certificate not within the validity period at sun.security.provider.certpath.OCSPResponse.verify(Unknown Source) at sun.security.provider.certpath.OCSP.check(Unknown Source) at sun.security.provider.certpath.OCSP.check(Unknown Source) at com.sun.deploy.security.RevocationChecker$2.run(Unknown Source) at com.sun.deploy.security.RevocationChecker$2.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at com.sun.deploy.security.RevocationChecker.doPrivilegedOCSPCheck(Unknown Source) ... 20 more Caused by: java.security.cert.CertificateExpiredException: NotAfter: Tue Aug 24 16:12:48 CEST 2021 at sun.security.x509.CertificateValidity.valid(Unknown Source) at sun.security.x509.X509CertImpl.checkValidity(Unknown Source) ... 27 more }}} === Krok 1 === Slova (Unknown Source = Neznámý zdroj) mohou vést k nenainstalovaným nebo prošlým kořenovým certifikátům CAcert v operačním systému počítače (Sun?), který certifikáty ověřuje. Obnovení kořenového certifikátu CAcert třídy 3 poř. č. 00000E na 14E228 bylo skutečně nutné, pokud vím, od 20. května 2021. Zkontrolujte si to prosím. Nový certifikát třídy 3 je zveřejněn na stránce https://www.cacert.org/index.php?id=3. Bohužel existují i programové systémy nebo operační systémy, které odmítají certifikáty CAcert záměrně. Ani ocsp.cacert.org, ani www.cacert.org nemají certifikát s platností Tue Aug 24 16:12:48 CEST 2021. Neváhejte nám prosím zaslat nějaké bližší informace o procesu ověřování. Probíhá na vašem lokálním systému, nebo někde v cloudu? ==== Více informací ==== Ano, přesně tak, viděl jsem, že platnost mezilehlého certifikátu (třídy 3) vypršela v květnu. A všude jsem ho měnil, ale v tom problém nebyl. Hlášení "Responder's certificate not within the validity period (Certifikát respondenta není v době platnosti - tj. jeho platnost vypršela)" se zobrazuje proto, že certifikát služby na straně CAcert vypršel v srpnu. Nejsem specialista na knihovny Sun Java, ale myslím, že proces validace kvůli tomu kontaktuje speciální službu na straně CAcert. A ano, myslím, že Java WebStart to bude kontrolovat prostřednictvím OCSP. Můj problém je, že nikde nevidím adresu a port, který WebStart použije ke kontaktování. Jste si jisti, že všechny spuštěné služby na všech serverech pro ověření jsou aktualizované a žádný certifikát nevypršel 24.8.2021? Může být, že validace z Německa je kořenově vázána jinou cestou na jiný server? === Krok 2 === Navzdory tomu, co hlásila moje utilita, jsem dnes viděl interní zprávu, že OCSP má prošlý certifikát od srpna (předpokládám, že to '''není''' certifikát samotného webového serveru) a že tento certifikát bude dnes obnoven. Podle mých znalostí musí systém pro provedení kontroly platnosti sestavit řetězec certifikátů až ke kořenovému certifikátu CA, všechny certifikáty musí být platné. V případě CAcertu jsou to: Váš certifikát, pravděpodobně kořenový certifikát třídy 3 a kořenový certifikát třídy 1. Platnost Vašeho certifikátu se odvíjí od data vypršení platnosti '''a''' informace, zda je certifikát odvolán. Poslední test se provádí pomocí serveru OCSP. Ve Vašem případě nebyla odpověď OCSP platná. Nyní (nebo zítra) by měla být opět platná. Chyba tedy nebyla na Vaší straně. Omlouváme se. === Řešení === Perfektní. Funguje to správně. Vše je v pořádku. Děkujeme za podporu! === Testovací nástroj === Mimochodem: víte o nástroji na testování takového chování? Problém je v tom, že standardní hláška Javy není opravdu podstatná a já jsem to kontroloval a zkoušel několik hodin, než jsem se na vás obrátil. === Odpověď === Mám utilitu EAS_MD (Exchange Active Sync _ Mobility Dojo), která je primárně určena pro testování serverů Exchange, ale umí také číst a prezentovat certifikát webového serveru a jeho řetězec. Pro (možná) lepší, sofistikovanější test OCSP serveru si zkuste přečíst: [[https://www.sysadmins.lv/blog-en/ocsp-client-tool.aspx | OCSP Client Tool - PKI Extensions (sysadmins.lv)]]. ---- DN/AK 2021 ---- CategoryTutorials CategorySoftware CategoryAssurance CategorySupport