I suppose it's just not my day today, third time lucky...
OK here's the portable example:
/* EVP_PKEY structure pkey */
RSA *trsa = EVP_PKEY_get1_RSA(pkey);
ret = RSA_public_encrypt(key_len, key, encrypted_key, trsa,
RSA_PKCS1_PADDING);
RSA_free(trsa);
if (ret <= 0) /* Some error occurred */
I also note you are using the internal macros M_ASN1_*() in several
places in that code. Please use the functions without the leading M_
instead.
Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [email protected]
Automated List Manager [email protected]