Thread (24 messages) 24 messages, 3 authors, 2023-02-14

Re: [PATCH v4 4/6] KEYS: X.509: Parse Key Usage

flat view

From: Mimi Zohar <zohar@linux.ibm.com>
Date: 2023-02-08 21:03:41
Also in: keyrings, linux-crypto, linux-integrity, lkml

On Mon, 2023-02-06 at 21:59 -0500, Eric Snowberg wrote:
Parse the X.509 Key Usage.  The key usage extension defines the purpose of
the key contained in the certificate.

   id-ce-keyUsage OBJECT IDENTIFIER ::=  { id-ce 15 }

      KeyUsage ::= BIT STRING {
           digitalSignature        (0),
           contentCommitment       (1),
           keyEncipherment         (2),
           dataEncipherment        (3),
           keyAgreement            (4),
           keyCertSign             (5),
           cRLSign                 (6),
           encipherOnly            (7),
           decipherOnly            (8) }

If the keyCertSign or digitalSignature is set, store it in the
public_key structure.  This will be used in a follow on patch that
requires knowing the certificate key usage type.

Link: https://www.rfc-editor.org/rfc/rfc5280#section-4.2.1.3
Signed-off-by: Eric Snowberg <eric.snowberg@oracle.com>
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help