[gnutls-help] Getting Object Type From Usb Token
Mandar Joshi
emailmandar at gmail.com
Tue Jan 31 17:46:45 CET 2017
Hello,
I want to retrieve the URLs and type of all objects in a token.
I am able to get the object list using
gnutls_pkcs11_obj_list_import_url4 (...) using the code in examples on
the gnutls website.
Now, while iterating over the object list, I tried using
-----------------------------------------------------------------------------------------------------
struct gnutls_pkcs11_obj_st *x = (struct gnutls_pkcs11_obj_st *) obj_list[i];
g_message ("Type: %d", x->type);
-----------------------------------------------------------------------------------------------------
but this gives me an error while compiling
--------------------------------------------------------------------------------------------------------
error: dereferencing pointer to incomplete type ‘struct gnutls_pkcs11_obj_st’
g_message ("Type: %d", x->type);
--------------------------------------------------------------------------------------------------------
Is there a header file I am missing? I have the following in my code
#include <gnutls/gnutls.h>
#include <gnutls/pkcs11.h>
Is there a simpler method to retrieve the type.?
I found gnutls_pkcs11_type_get_name (..) in the API docs but I can use
that only after I get the type enum.
pkcs11.h only contains
-------------------------------------------------------------------------------
struct gnutls_pkcs11_obj_st;
typedef struct gnutls_pkcs11_obj_st *gnutls_pkcs11_obj_t;
-------------------------------------------------------------------------------
There is no struct there as shown in the API docs
https://gnutls.org/reference/gnutls-pkcs11.html
Regards
Mandar Joshi
More information about the Gnutls-help
mailing list