Hi!

This really depends a lot on your situation. If you've got access to the
card containing the certificate and private key, you're better off using
something like Cryptoki (PKCS#11) to encrypt/decrypt directly using the
card without having to extract data.

If you don't have access to the card, and only have the certificate
itself available, I'm afraid you won't be able to get all the way, as
there will by definition be no private key in the certificate (hence:
public-key certificate) for you to get.

Please provide more info and I'll try to help you out.

Best regards,

//oscar

Jaime Vizán González wrote:
> 
> Hi!
> 
> I have got a X509 certifificate, in BER format, from smartcard. I need to
> encrypt a random number using the public key which is stored in that
> certificate. Afeter, I want to decrypt that number. And my problem is:
> How can I get the public key from certificate?
> How can I get the private Key from certificate?
> How can I encrypt and decrypt a random number using RSA?
> 
> Can you help me?
> 
> Thanks
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to