Adding asymmetric key to keyring fails with "add_key: Bad message"

Solution Verified - Updated -

Issue

  • While adding assymetric key to keyring below error message occurs

    # openssl pkcs8 -in test.key -topk8 -nocrypt -outform DER | keyctl padd asymmetric sme-tab1 @s
    add_key: Bad message
    

Environment

  • Red Hat Enterprise Linux 8 and below

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