Cov txheej txheem:

Kuv yuav tau PEM cov ntaub ntawv los ntawm JKS li cas?
Kuv yuav tau PEM cov ntaub ntawv los ntawm JKS li cas?

Video: Kuv yuav tau PEM cov ntaub ntawv los ntawm JKS li cas?

Video: Kuv yuav tau PEM cov ntaub ntawv los ntawm JKS li cas?
Video: Niam tij thiab tij laug xa ntsuag mus nrauj zoo 3/15/2018 2024, Kaum ib hlis
Anonim

Yuav ua li cas hloov Java keystore (JKS) rau PEM hom

  1. Export daim ntawv pov thawj los ntawm Java keystore thiab import nws mus rau PKCS #12 tshiab keystore format siv cov Java keytool (C: Program FilesJava jre6 ib keytool .exe los ntawm lub neej ntawd Windows).
  2. Hloov tshiab PKCS #12 ntaub ntawv (myapp.
  3. (Yeem nyob ntawm ib puag ncig) Tsim ib lub version ntawm lub PEM file nrog tus password raug tshem tawm.

Hais txog qhov no, kuv yuav tsim cov ntaub ntawv JKS los ntawm PEM li cas?

Txhawm rau hloov PEM-hom yuam sij rau Java KeyStores:

  1. Hloov daim ntawv pov thawj los ntawm PEM rau PKCS12, siv cov lus txib hauv qab no:
  2. Nkag mus thiab rov ua tus password export.
  3. Tsim thiab tom qab ntawd rho tawm ib qho khoob truststore siv cov lus txib hauv qab no:
  4. Ntshuam CA rau hauv truststore, siv cov lus txib hauv qab no:

Kuv yuav rho tawm cov ntaub ntawv. PEM li cas? Txhawm rau rho tawm daim ntawv pov thawj, siv cov lus txib no, qhov twg cer yog cov ntaub ntawv npe uas koj xav siv:

  1. openssl pkcs12 -in store.p12 -out cer.pem. Qhov no rho tawm daim ntawv pov thawj hauv ib. pem format.
  2. openssl x509 -outform der -in cer.pem -out cer.der. Qhov no formats daim ntawv pov thawj nyob rau hauv ib tug. ua format.

Hais txog qhov no, kuv tuaj yeem tau daim ntawv pov thawj los ntawm JKS cov ntaub ntawv li cas?

Tsim ib daim ntawv pov thawj los ntawm kev siv keytool

  1. Hloov mus rau cov npe uas muaj cov keystore thiab truststore cov ntaub ntawv.
  2. Tsim daim ntawv pov thawj hauv cov ntaub ntawv keystore, keystore.jks, siv hom lus hais hauv qab no:
  3. Export daim ntawv pov thawj generated rau cov ntaub ntawv server.cer (lossis client.cer yog tias koj xav tau), siv hom lus hais hauv qab no:

Kuv yuav tsim cov ntaub ntawv PEM li cas hauv Truststore?

Yog koj muaj keystore thiab truststore hauv PEM format, convert lub PEM keystore ntaub ntawv rau PKCS12. Tom qab ntawd, export lub daim ntawv pov thawj thiab tus yuam sij rau JKS cov ntaub ntawv . Yog koj tsis muaj keystore thiab truststore cov ntaub ntawv , koj ua tau tsim lawv nrog OpenSSL thiab Java keytool.

Pom zoo: