Last active
March 10, 2019 12:16
-
-
Save ezhov-da/31eae83a82fe1e6a4c03a4ebd9ac4c10 to your computer and use it in GitHub Desktop.
common-создание-и-продление-ssl-сертификатов
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Я пользовался этим - https://zerossl.com/ | |
Откуда наткнулся на этот сайт: https://letsencrypt.org/docs/client-options/ | |
Для повторного использования достаточно ввести ключ аккаунта и csr. | |
Через программу [KeyStore Explorer] необходимо импортировать пару как OpenSSL. | |
Указав ключ файл: domain-key | |
Сертификат: domain-crt | |
Сняв галочку шифрования. | |
Важно! Для пары ключей необходимо указать пароль такой же как от хранилищица, не понятно - обязательно такой же, но с таким же работает. | |
В противном случае в консоль будут сыпаться ошибки типа: | |
java.security.UnrecoverableKeyException: Cannot recover key | |
at sun.security.provider.KeyProtector.recover(KeyProtector.java:328) | |
at sun.security.provider.JavaKeyStore.engineGetKey(JavaKeyStore.java:146) | |
at sun.security.provider.JavaKeyStore$JKS.engineGetKey(JavaKeyStore.java:56) | |
java.security.UnrecoverableKeyException: Get Key failed: Given final block not properly padded | |
at sun.security.pkcs12.PKCS12KeyStore.engineGetKey(PKCS12KeyStore.java:410) | |
at sun.security.provider.KeyStoreDelegator.engineGetKey(KeyStoreDelegator.java:96) | |
at sun.security.provider.JavaKeyStore$DualFormatJKS.engineGetKey(JavaKeyStore.java:70) | |
at java.security.KeyStore.getKey(KeyStore.java:1023) | |
at sun.security.ssl.SunX509KeyManagerImpl.<init>(SunX509KeyManagerImpl.java:133) | |
at sun.security.ssl.KeyManagerFactoryImpl$SunX509.engineInit(KeyManagerFactoryImpl.java:70) | |
Caused by: javax.crypto.BadPaddingException: Given final block not properly padded | |
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:966) | |
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:824) | |
at com.sun.crypto.provider.PKCS12PBECipherCore.implDoFinal(PKCS12PBECipherCore.java:399) | |
at com.sun.crypto.provider.PKCS12PBECipherCore$PBEWithSHA1AndDESede.engineDoFinal(PKCS12PBECipherCore.java:431) | |
После обновления сертификата запустить рестарт сервисов: restart-systemctl-applications.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment