Add flags for PKCS#11 libraries with reduced feature set
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#ifndef PKCS11_LIBRARY_H_
|
||||
#define PKCS11_LIBRARY_H_
|
||||
|
||||
typedef enum pkcs11_feature_t pkcs11_feature_t;
|
||||
typedef struct pkcs11_library_t pkcs11_library_t;
|
||||
|
||||
#include "pkcs11.h"
|
||||
@@ -28,6 +29,14 @@ typedef struct pkcs11_library_t pkcs11_library_t;
|
||||
#include <enum.h>
|
||||
#include <utils/enumerator.h>
|
||||
|
||||
/**
|
||||
* Optional PKCS#11 features some libraries support, some not
|
||||
*/
|
||||
enum pkcs11_feature_t {
|
||||
/** CKA_TRUSTED attribute supported for certificate objects */
|
||||
PKCS11_TRUSTED_CERTS = (1<<0),
|
||||
};
|
||||
|
||||
/**
|
||||
* A loaded and initialized PKCS#11 library.
|
||||
*/
|
||||
@@ -45,6 +54,13 @@ struct pkcs11_library_t {
|
||||
*/
|
||||
char* (*get_name)(pkcs11_library_t *this);
|
||||
|
||||
/**
|
||||
* Get the feature set supported by this library.
|
||||
*
|
||||
* @return ORed set of features supported
|
||||
*/
|
||||
pkcs11_feature_t (*get_features)(pkcs11_library_t *this);
|
||||
|
||||
/**
|
||||
* Create an enumerator over CK_OBJECT_HANDLE using a search template.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user