How to distinguish between encrypted/unencrypted key in a PEM file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hello,

I have a PEM file on the device which can contain an encrypted/non-encrypted private key. When it's encrypted, it's using PBES/PBKDF. The file is accessed from a C++ application which uses the OpenSSL library. If the key is encrypted, then it should be PKCS#8, but checking it is PKCS#8 by using e.g. `PEM_read_PKCS8` is not enough to confirm it is actually encrypted, since an unencrypted key can also be stored as PKCS#8. Is there a way to check whether the key is encrypted or not using OpenSSL APIs?

Best regards,
Bartlomiej Nowak



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux