Why does the java keytool utility throw a gnu.javax.crypto.keyring.MalformedKeyringException error when importing a certificate?

Solution Verified - Updated -

Issue

  • Why does the java keytool utility throw a gnu.javax.crypto.keyring.MalformedKeyringException error when importing a certificate?
    $ keytool -import -trustcacerts -alias client_cert -file client.cert -keystore server.truststore
    keytool error: gnu.javax.crypto.keyring.MalformedKeyringException: incorrect magic
    

Environment

  • Java

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content