Why do I get the error “Cannot store non-PrivateKeys” when creating an SSL Socket in Java?

前端 未结 3 1454
-上瘾入骨i
-上瘾入骨i 2020-12-15 12:00

I am working on an older IBM iSeries (IBM-i, i5OS, AS/400, etc), with a Java 5 JVM (Classic, not ITJ J9) on O/S version V5R3M0.

Here is the scenario in a nutshell:

3条回答
  •  旧时难觅i
    2020-12-15 12:12

    The "Cannot store non-PrivateKeys" error message usually indicates you are trying to use secret symmetric keys with a JKS keystore type. The JKS keystore type only supports asymmetric (public/private) keys. You would have to create a new keystore of type JCEKS to support secret keys.

提交回复
热议问题