Re: Problems with token and rsa and possible bug with cryptAddPrivateKey

Peter Gutmann <[email protected]> Fri, 27 Jul 2012 08:25:57 +1200
Newsgroups gmane.comp.encryption.cryptlib
Message-ID <[email protected]>
JexMcByte <[email protected]> writes:

>I've tryed in different ways to get a public/private keypair inside a token
>but, so far, without any luck
>
>1) crreating the keykair:
>
>        res = cryptDeviceOpen( &cryptDevice, CRYPT_UNUSED, CRYPT_DEVICE_PKCS11, "[Autodetect]" );
>        res = cryptDeviceCreateContext( cryptDevice, &cryptDeviceContext, CRYPT_ALGO_RSA );
>[...]
>
>final return is CRYPT_ERROR_NOTINITED

You haven't logged onto the device or, possibly even initialised it.  Thus
cryptlib is returning CRYPT_ERROR_NOTINITED.

Peter.

_______________________________________________
Cryptlib mailing list
[email protected] via Mail: [email protected]
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.