Thank you!
I found that the functions RSAPublicKey_dup(RSA*) or RSAPrivateKey_dup defined in x509.h will also do the trick. They actually work exactly as you suggested (i2d then d2i)! Sincerely, _____________________________________________________________ Federico Sauter [EMAIL PROTECTED] Software Entwicklung Tel: +49 89 7465 4778 TESIS Sysware GmbH Fax: +49 89 7465 4788 Implerstraße 26 * D-81371 München * Deutschland Frank Balluffi wrote: > Federico, > > You can either encode and decode CopyKey (i.e., call i2d followed by d2i) or >increment the rsa_st's references element using CRYPTO_add. For example: > > CRYPTO_add (&CopyKey->references, 1, CRYPTO_LOCK_RSA); > > See crypto/threads/mttest.c for setting up mutexes for a multithreaded application. > > Frank > ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]