Added more signature infrestructure.
This commit is contained in:
@@ -3,8 +3,11 @@
|
||||
|
||||
#include "pkcs11t.h"
|
||||
#include "obj_types.h"
|
||||
#include "openssl_types.h"
|
||||
#include "vendors.h"
|
||||
|
||||
#define YKCS11_OP_BUFSIZE 4096
|
||||
|
||||
typedef struct {
|
||||
vendor_id_t vid;
|
||||
CK_TOKEN_INFO info;
|
||||
@@ -25,4 +28,41 @@ typedef struct {
|
||||
ykcs11_slot_t *slot;
|
||||
} ykcs11_session_t;
|
||||
|
||||
|
||||
typedef enum {
|
||||
YKCS11_NOOP,
|
||||
YKCS11_SIGN,
|
||||
YKCS11_HASH,
|
||||
YKCS11_DECRYPT
|
||||
} ykcs11_op_type_t;
|
||||
|
||||
typedef struct {
|
||||
ykcs11_md_ctx_t *md_ctx;
|
||||
CK_BYTE algo;
|
||||
CK_ULONG key;
|
||||
CK_ULONG key_len;
|
||||
} sign_info_t;
|
||||
|
||||
typedef struct {
|
||||
CK_BYTE todo;
|
||||
} hash_info_t;
|
||||
|
||||
typedef struct {
|
||||
CK_BYTE todo;
|
||||
} decrypt_info_t;
|
||||
|
||||
typedef union {
|
||||
sign_info_t sign;
|
||||
hash_info_t hash;
|
||||
decrypt_info_t decrypt;
|
||||
} op_t;
|
||||
|
||||
typedef struct {
|
||||
ykcs11_op_type_t type;
|
||||
CK_MECHANISM mechanism;
|
||||
op_t op;
|
||||
CK_BYTE buf[YKCS11_OP_BUFSIZE];
|
||||
CK_ULONG buf_len;
|
||||
} op_info_t;
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user