Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Getting Exception while accessing the java keystore jssecacerts file

838162Dec 5 2017 — edited Dec 13 2017

Hi,

I am getting the below exception while accessing the java keystore (..\..\jvm\lib\security\jssecacerts) file to install or access the SSL certificate, this usually happens once in a while in few environments like on RHEL with java 7 and 8. Can anybody please help me to find out the possible root cause of this error? I am using the java.security and java.net API to load the keystore and installing the certificates. the jssecacerts file also get corrupted.

Could not generate certificate: Too many octets supplied for length of BER Data Value. (Number of octets = 84, Depth = 4, Position = 923)

  1. java.security.cert.CertificateParsingException: Could not generate certificate: Too many octets supplied for length of BER Data Value. (Number of octets = 84, Depth = 4, Position = 923)

               at com.rsa.cryptoj.o.ot.a(Unknown Source)

at com.rsa.cryptoj.o.ot.engineGenerateCertificate(Unknown Source)

at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:339)

at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:755)

at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:56)

at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:225)

at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:70)

at java.security.KeyStore.load(KeyStore.java:1445)

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 10 2018
Added on Dec 5 2017
1 comment
623 views