Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/libp11-int.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ struct pkcs11_ctx_private {
void *handle;
char *init_args;
CK_VERSION cryptoki_version;
CK_VERSION library_version;
UI_METHOD *ui_method; /* UI_METHOD for CKU_CONTEXT_SPECIFIC PINs */
void *ui_user_data;
pthread_mutex_t fork_lock;
Expand Down
2 changes: 2 additions & 0 deletions src/p11_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ int pkcs11_CTX_load(PKCS11_CTX *ctx, const char *name)
ctx->description = PKCS11_DUP(ck_info.libraryDescription);
cpriv->cryptoki_version.major = ck_info.cryptokiVersion.major;
cpriv->cryptoki_version.minor = ck_info.cryptokiVersion.minor;
cpriv->library_version.major = ck_info.libraryVersion.major;
cpriv->library_version.minor = ck_info.libraryVersion.minor;
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
register_falcon_oids();
#endif /* OPENSSL_VERSION_NUMBER >= 0x30000000L */
Expand Down
28 changes: 28 additions & 0 deletions src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,29 @@
#define strcasecmp _stricmp
#endif

typedef struct {
int slot_nr;
char *obj_id;
size_t obj_id_len;
char *obj_label;
PKCS11_SLOT **matched_slots;
size_t matched_count;
PKCS11_TOKEN *match_tok;
char *pin;
size_t pin_len;
char *pin_value;
char *pin_source;
char *type;
char *slot_description;
char *slot_manufacturer;
int slot_id;
char *library_description;
char *library_manufacturer;
char *library_version;
char *module_name;
char *module_path;
} PARSED;

/* defined in util_uri.c */
typedef struct util_ctx_st UTIL_CTX; /* opaque */

Expand All @@ -74,6 +97,11 @@ void UTIL_CTX_log(UTIL_CTX *ctx, int level, const char *format, ...)
int UTIL_CTX_set_pin(UTIL_CTX *ctx, const char *pin);
void UTIL_CTX_set_force_login(UTIL_CTX *ctx, int force_login);

char *dump_hex(unsigned char *val, const size_t len);
int util_ctx_parse_uri(UTIL_CTX *ctx, PARSED *parsed,
const char *object_typestr, const char *object_uri);
void util_parsed_free(PARSED *parsed);

X509 *UTIL_CTX_get_cert_from_uri(UTIL_CTX *ctx, const char *uri,
UI_METHOD *ui_method, void *ui_data);
EVP_PKEY *UTIL_CTX_get_pubkey_from_uri(UTIL_CTX *ctx, const char *uri,
Expand Down
Loading
Loading