[gnutls-help] Getting Object Type From Usb Token

Nikos Mavrogiannopoulos nmav at gnutls.org
Wed Feb 1 08:44:57 CET 2017

On Tue, Jan 31, 2017 at 5:46 PM, Mandar Joshi <emailmandar at gmail.com> wrote:
> 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);

This is an opaque pointer, you don't have direct access to it. You can
access it via functions like gnutls_pkcs11_obj_get_type().


More information about the Gnutls-help mailing list