Skip to content

Commit

Permalink
Add cryptoki_version to PKCS11_CTX
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrojnar committed Oct 4, 2023
1 parent 6c96847 commit 9ac6919
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libp11.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ typedef struct PKCS11_slot_st {
typedef struct PKCS11_ctx_st {
char *manufacturer;
char *description;
struct {
unsigned char major, minor;
} cryptoki_version;
void *_private;
} PKCS11_CTX;

Expand Down
2 changes: 2 additions & 0 deletions src/p11_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ int pkcs11_CTX_load(PKCS11_CTX *ctx, const char *name)

ctx->manufacturer = PKCS11_DUP(ck_info.manufacturerID);
ctx->description = PKCS11_DUP(ck_info.libraryDescription);
ctx->cryptoki_version.major = ck_info.cryptokiVersion.major;
ctx->cryptoki_version.minor = ck_info.cryptokiVersion.minor;

return 0;
}
Expand Down

0 comments on commit 9ac6919

Please sign in to comment.