2017-04-22 1 views
5

J'ai récemment passé à letsencrypt certificats pour mon repo maven (Artifactory derrière le proxy Apache). Repo accès via le navigateur fonctionne très bien, ne montrant aucun problème avec le certificat (capture d'écran ci-dessous). Il fonctionne également si je import the certificate manually into the java keystore.maven est "impossible de trouver le chemin de certification valide à la cible demandée" - certificat SSL de letsencrypt

Mais selon cette question SO, Java should accept letsencrypt certificates starting with 8u101.

Je suis toujours reçois cette exception:

sun.security.validator.ValidatorException: 
PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: 
unable to find valid certification path to requested target -> [Help 1] 

enter image description here

enter image description here

C:\myproject>mvn -version 
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00) 
Maven home: C:\maven 
Java version: 1.8.0_112, vendor: Oracle Corporation 
Java home: C:\jdk1.8_win64\jre 
Default locale: en_US, platform encoding: Cp1252 
OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos" 

Répondre

1

Enfin figured it out, 3 mois plus tard ...

Le serveur apache dans devant le dépôt artificiel Maven y n'a pas été configuré pour fournir le certificat intermédiaire dans la chaîne.

J'ai téléchargé le certificat intermédiaire - Let’s Encrypt Authority X3 (IdenTrust cross-signed) - et j'ai configuré Apache pour le servir également.

En fait, le fichier domain.crt contient à la fois le certificat de domaine et le certificat intermédiaire, et pour tous mes navigateurs de test, cela a toujours été suffisant. Mais l'installation eclipse/maven sur cette machine ne pouvait pas le gérer.

J'ai seulement commencé à regarder dans la config apache après un SSL Labs check m'a dit que la chaîne de certificat était incomplète (même si aucun navigateur ne semblaient s'en soucier).

Avant:

SSLEngine On 
    SSLCertificateFile "path/to/domain.crt" 
    SSLCertificateKeyFile "path/to/domain.key" 

Après:

SSLEngine On 
    SSLCertificateFile "path/to/domain.crt" 
    SSLCertificateKeyFile "path/to/domain.key" 
    SSLCertificateChainFile "path/to/letsencrypt-authority-x3-identrust.pem"