]> git.baikalelectronics.ru Git - kernel.git/commit
KEYS: Implement PKCS#8 RSA Private Key parser [ver #2]
authorDavid Howells <dhowells@redhat.com>
Tue, 9 Oct 2018 16:47:46 +0000 (17:47 +0100)
committerJames Morris <james.morris@microsoft.com>
Fri, 26 Oct 2018 08:30:46 +0000 (09:30 +0100)
commitdd6a542443f81c6932cc22c08d2ba3d82928b380
tree842096971b747ef531d6b4d3767ac85f993eb83f
parentb52537e8ba175ea47f7642372813f6158e559746
KEYS: Implement PKCS#8 RSA Private Key parser [ver #2]

Implement PKCS#8 RSA Private Key format [RFC 5208] parser for the
asymmetric key type.  For the moment, this will only support unencrypted
DER blobs.  PEM and decryption can be added later.

PKCS#8 keys can be loaded like this:

openssl pkcs8 -in private_key.pem -topk8 -nocrypt -outform DER | \
  keyctl padd asymmetric foo @s

Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Marcel Holtmann <marcel@holtmann.org>
Reviewed-by: Marcel Holtmann <marcel@holtmann.org>
Reviewed-by: Denis Kenzior <denkenz@gmail.com>
Tested-by: Denis Kenzior <denkenz@gmail.com>
Signed-off-by: James Morris <james.morris@microsoft.com>
Documentation/crypto/asymmetric-keys.txt
crypto/asymmetric_keys/Kconfig
crypto/asymmetric_keys/Makefile
crypto/asymmetric_keys/pkcs8.asn1 [new file with mode: 0644]
crypto/asymmetric_keys/pkcs8_parser.c [new file with mode: 0644]