My Oracle Support Banner

Keytool Error "Detect premature EOF" When Trying to Convert OAM Server to SSL (Doc ID 1572049.1)

Last updated on SEPTEMBER 08, 2023

Applies to:

Oracle Access Manager - Version 11.1.1.5.0 and later
Information in this document applies to any platform.

Symptoms

I am following note ID 1235653.1 to convert OAM Managed server to SSL and followed the note to create JKS and import the certificate. However, when I try to import the certificate onto the JKS, I am getting the error as below,

$ keytool -importcert -v -alias <ALIAS> -file <CERTIFICATE_FILE> -keystore <KEYSTORE_FILE> -keypass <CERTIFICATE_PASSWORD> -storepass <KEYSTORE_PASSWORD>
keytool error: java.security.cert.CertificateException: java.io.EOFException: Detect premature EOF
java.security.cert.CertificateException: java.io.EOFException: Detect premature EOF
  at sun.security.provider.X509Factory.engineGenerateCertificates(X509Factory.java:419)
  at java.security.cert.CertificateFactory.generateCertificates(CertificateFactory.java:427)
  at sun.security.tools.KeyTool.installReply(KeyTool.java:1861)
  at sun.security.tools.KeyTool.doCommands(KeyTool.java:807)
  at sun.security.tools.KeyTool.run(KeyTool.java:172)
  at sun.security.tools.KeyTool.main(KeyTool.java:166)
Caused by: java.io.EOFException: Detect premature EOF
  at sun.misc.IOUtils.readFully(IOUtils.java:50)
  at sun.security.util.DerValue.init(DerValue.java:370)
  at sun.security.util.DerValue.<init>(DerValue.java:303)
  at sun.security.provider.X509Factory.parseX509orPKCS7Cert(X509Factory.java:532)
  at sun.security.provider.X509Factory.engineGenerateCertificates(X509Factory.java:417)
  ... 5 more

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.