I have a CERTCertificate and some data, and I wan't to encrypt and decrypt
the data.

I'm having trouble using PK11_PubDecryptRaw/PK11_PubEncryptRaw. I pass
both functions raw data with is same size as the key modulus, but it
doesn't work all the times. I don't really understand why PubDecryptRaw
takes more arguments than PubEncryptRaw, which could be one of my problems
:) Why is that? Can someone give me a simple example of how to "do it
right"?

My first plan was to use the RSA_*KeyOp-functions from blapi.h, but I
can't find out how to get from CERTCertificate to the
RSAPublicKey/RSAPrivateKey that the functions take as arguments. Any help
there?

Thanks in advance,

Allan Beaufour Larsen

Reply via email to