diff options
-rw-r--r-- | lib/includes/gnutls/pkcs11.h | 1 | ||||
-rw-r--r-- | lib/pkcs11.c | 27 |
2 files changed, 1 insertions, 27 deletions
diff --git a/lib/includes/gnutls/pkcs11.h b/lib/includes/gnutls/pkcs11.h index 26b86f2b1c..77a410ffe0 100644 --- a/lib/includes/gnutls/pkcs11.h +++ b/lib/includes/gnutls/pkcs11.h @@ -231,7 +231,6 @@ typedef enum { GNUTLS_PKCS11_TOKEN_SERIAL, GNUTLS_PKCS11_TOKEN_MANUFACTURER, GNUTLS_PKCS11_TOKEN_MODEL, - GNUTLS_PKCS11_TOKEN_TRUSTED_UINT, } gnutls_pkcs11_token_info_t; /** diff --git a/lib/pkcs11.c b/lib/pkcs11.c index 6163dfcf89..e6cff7e2b9 100644 --- a/lib/pkcs11.c +++ b/lib/pkcs11.c @@ -1716,9 +1716,6 @@ gnutls_pkcs11_token_get_url(unsigned int seq, * This function will return information about the PKCS 11 token such * as the label, id, etc. * - * All types are strings, except the type %GNUTLS_PKCS11_TOKEN_TRUSTED_UINT which - * returns an integer with true (1) or false (0) value. - * * Returns: %GNUTLS_E_SUCCESS (0) on success or a negative error code * on error. * @@ -1730,8 +1727,6 @@ gnutls_pkcs11_token_get_info(const char *url, void *output, size_t * output_size) { struct p11_kit_uri *info = NULL; - struct ck_function_list *module; - ck_slot_id_t slot; const uint8_t *str; size_t str_max; size_t len; @@ -1760,26 +1755,6 @@ gnutls_pkcs11_token_get_info(const char *url, str = p11_kit_uri_get_token_info(info)->model; str_max = 16; break; - case GNUTLS_PKCS11_TOKEN_TRUSTED_UINT: - if (*output_size < sizeof(ret)) { - *output_size = sizeof(ret); - return gnutls_assert_val(GNUTLS_E_SHORT_MEMORY_BUFFER); - } - - ret = pkcs11_find_slot(&module, &slot, info, NULL); - if (ret < 0) { - gnutls_assert(); - goto cleanup; - } - - if (p11_kit_module_get_flags(module) & P11_KIT_MODULE_TRUSTED) { - ret = 1; - } else { - ret = 0; - } - memcpy(output, &ret, sizeof(ret)); - ret = 0; - goto cleanup; default: p11_kit_uri_free(info); gnutls_assert(); @@ -1799,7 +1774,7 @@ gnutls_pkcs11_token_get_info(const char *url, *output_size = len; ret = 0; -cleanup: + p11_kit_uri_free(info); return ret; } |