preload preload preload preload

Importer un certificat auto-signé dans votre JRE/JDK

Le vendredi 04 mars 2011 par madpellzo JDK/JRE 6 commentaires

Comment imorter un certifiact x509 auto-signé dans le fichier cacerts d'un JRE/JDK Sun ?

Prérequis : un JDK ou JRE installé sur le serveur.

Le fichier cacerts contient une liste d'autorités de certification (Thawte, VeriSign ...).

1) Visualiser les autorités déjà présentes dans cacerts

# /usr/local/java/bin/keytool -list -keystore cacerts
Enter keystore password: changeit

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 44 entries

Comme vous pouvez le constater le mot de passe par défaut du cacerts Sun est : changeit.

2) Importer votre certificat auto-signé

Il se trouve (en général) sous /etc/ssl/certs/moncertif.pem.

Commencer par sauvegarder le cacerts original:

# cd /usr/local/java/jre/lib/security/
# cp cacerts cacerts.original

Importation :

# /usr/local/java/bin/keytool -import -alias realmed -keystore cacerts -file /etc/ssl/certs/moncertif.pem
Enter keystore password: changeit

Vérifier qu'une nouvelle autorité se trouve dans cacerts:

# /usr/local/java/bin/keytool -list -keystore cacerts
Enter keystore password: changeit

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 45 entries

Mots clés : jdk, jre, cacerts, x509

  • Commentaires

  • Avatar Gravatar
     #1 Le 23 avril 2016

    You've made some really good points there. I looked on the net to leartn more about the issue and foundd most individuals will go along with your views on this web site.

  • Avatar Gravatar
     vtc nice aeroport
     #2 Le 29 novembre 2016

    Hello i amm kavin, its my first occasion to commenting anywhere, when i
    read this paragraph i thought i could also make comment due to this sensible post.

  • Avatar Gravatar
     #3 Le 09 décembre 2017

    Every weekend i used to pay a visit this web page,
    because i wish for enjoyment, as this this site conations actually nice funny stuff

  • Avatar Gravatar
     #4 Le 03 janvier 2018

    It's really a great and useful piece of info. I'm satisfied that you just shared this useful information with
    us. Please keep us informed like this. Thank you for sharing.

  • Avatar Gravatar
     #5 Le 07 janvier 2018

    Do you have a spam issue on this blog; I also
    am a blogger, and I was wanting to know your situation; many of us have created some nice procedures and we are looking to exchange methods with
    others, please shoot me an e-mail if interested.

  • Avatar Gravatar
     Tarif Sewa Bus Pariwisata Murah
     #6 Le 03 mars 2018

    It's the best time to make some plans for the long run and it is time to be happy.

    I've read this publish and if I may I wish to counsel you ome attention-grabbing issues
    or tips. Perhaps you couyld write subsequent articles relating to this
    article. I want too read even more things approximately it!

  • Ecrire un commentaire

    Quelle est la première lettre du mot jqryk ?