Skip to content

Commit

Permalink
libckteec: Define certificate type and category in pkcs11.h
Browse files Browse the repository at this point in the history
Add definitions for certificate type and category.

Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
  • Loading branch information
vesajaaskelainen authored and jforissier committed Sep 20, 2021
1 parent 69816df commit 98e0c1a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions libckteec/include/pkcs11.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,27 @@ typedef CK_KEY_TYPE *CK_KEY_TYPE_PTR;
#define CKK_SHA512_HMAC 0x02d
#define CKK_SHA224_HMAC 0x02e

/*
* Certificates
*/
typedef CK_ULONG CK_CERTIFICATE_TYPE;
typedef CK_ULONG CK_CERTIFICATE_CATEGORY;

/*
* Valid values for attribute CKA_CERTIFICATE_TYPE
*/
#define CKC_X_509 0x00000000UL
#define CKC_X_509_ATTR_CERT 0x00000001UL
#define CKC_WTLS 0x00000002UL

/*
* Valid values for attribute CKA_CERTIFICATE_CATEGORY
*/
#define CK_CERTIFICATE_CATEGORY_UNSPECIFIED 0UL
#define CK_CERTIFICATE_CATEGORY_TOKEN_USER 1UL
#define CK_CERTIFICATE_CATEGORY_AUTHORITY 2UL
#define CK_CERTIFICATE_CATEGORY_OTHER_ENTITY 3UL

/*
* Mechanisms
*
Expand Down

0 comments on commit 98e0c1a

Please sign in to comment.