Keytool Error When Trying to Convert OAM Server to SSL (Doc ID 1572049.1)

Last updated on JUNE 06, 2017

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,

[appoam@es0a809d keystores]$ keytool -importcert -v -alias certificate.com -file certificate.cer -keystore keystore.jks -keypass welcome1 -storepass welcome1
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

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms