mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Tested-by: Marcel Holtmann <[email protected]> Reviewed-by: Marcel Holtmann <[email protected]> Reviewed-by: Denis Kenzior <[email protected]> Tested-by: Denis Kenzior <[email protected]> Signed-off-by: James Morris <[email protected]>
This commit is contained in:
parent
c08fed7371
commit
3c58b2362b
5 changed files with 233 additions and 0 deletions
|
|
@ -248,6 +248,8 @@ Examples of blob formats for which parsers could be implemented include:
|
|||
- X.509 ASN.1 stream.
|
||||
- Pointer to TPM key.
|
||||
- Pointer to UEFI key.
|
||||
- PKCS#8 private key [RFC 5208].
|
||||
- PKCS#5 encrypted private key [RFC 2898].
|
||||
|
||||
During key instantiation each parser in the list is tried until one doesn't
|
||||
return -EBADMSG.
|
||||
|
|
|
|||
Loading…
Reference in a new issue