java keytool 给出 "final block not properly padded"

标签 java ssl-certificate

根据 step 3b of this Jetty guide for using Keytool and OpenSSL, last step ,我正在执行命令:

keytool -importkeystore -srckeystore jetty.pkcs12 -srcstoretype PKCS12 -destkeystore keystore

当我运行命令时,我得到:keytool error: java.io.IOException: failed to decrypt safe contents entry: javax.crypto.BadPaddingException: Given final block not properly padded

你知道如何解决这个问题吗?

最佳答案

我也遇到过类似的问题。我终于意识到目标 keystore 还指定了一个 key 密码。所以我不得不使用额外的参数“destkeypass”来成功导入 key 。

关于java keytool 给出 "final block not properly padded",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9236939/

相关文章:

asp.net-mvc - 无法建立 SSL/TLS 安全通道的信任关系 : The remote certificate is invalid according to the validation procedure

php - 生成 OpenSSL 私钥和公钥

java - 如何为具有两种可能类型的嵌入式对象编写 GSON 自定义解串器

Java如何对Point对象的ArrayList进行排序

java - JAXB 绑定(bind)错误, "Content must match...?"

c# - X509Certificate2 的私钥不可导出?

php - 如果在 url 中使用 https,动态网页内容不会出现

java.lang.TypeNotPresentException : Type org. apache.maven.plugin.surefire.SurefirePlugin 不存在 - MAVEN

java - 什么是NullPointerException,我该如何解决?

ssl - 如果 SSL/TLS 证书没有真正的签名/CA,为什么它们是自签名的?