errors in libp11

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

errors in libp11

Paulo Soto de Miranda
Hi

I'm calling PKCS11_enumerate_keys(). Its returning 0 keys, but my card
has 2 keys (listing with pkcs15-tool).

--//--

this code is right ?
EVP_PKEY *PKCS11_get_public_key(PKCS11_KEY * key)
{
    return PKCS11_get_private_key(key);
}

--//--

How can i unblock a PIN using libp11?

Thanks.
_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: errors in libp11

Andreas Jellinghaus-2
Hi Paulo,

did you login first?
Some cards do not show any key, unless you login first.

Not sure what OpenSC does, I guess the same.

> How can i unblock a PIN using libp11?

not sure, maybe using
/* Change the user PIN on a token */
extern int PKCS11_change_pin(PKCS11_SLOT *, const char *old_pin,
        const char *new_pin);

?

Does anyone know how to unlock a pin using PKCS#11?
then I can check if change_pin does the same, or
we add a new function to do that.

Regards, Andreas
_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: errors in libp11

Ludovic Rousseau
On 14/09/05, Andreas Jellinghaus <[hidden email]> wrote:
> > How can i unblock a PIN using libp11?
> Does anyone know how to unlock a pin using PKCS#11?
> then I can check if change_pin does the same, or
> we add a new function to do that.

I use:
  rc = PKCS11_init_pin(slot->token, new_pin);

You need to be logged in as the Security Officer with read/write access.

Bye,

--
 Dr. Ludovic Rousseau
 For private mail use [hidden email] and not "big brother" Google
_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel