On Sun, Feb 29, 2004, Richard Levitte - VMS Whacker wrote:
> In message <[EMAIL PROTECTED]> on Sat, 28 Feb 2004 00:16:39 -0800 (PST), "S.Mehdi
> Sheikhalishahi" <[EMAIL PROTECTED]> said:
>
> sm_justice> Hi All
> sm_justice> I want to have a function that get an RSA* and return
> sm_justice> a newly allocated RSA structure.
> sm_justice> RSA* RSA_new(RSA*);
> sm_justice> I look for it on OpenSSL but doesn't exists.Everybody
> sm_justice> implement it.
>
> The following works with OpenSSL 0.9.7 and on:
>
> RSA *RSA_dup(RSA *rsa) {
> if (rsa) {
> RSA_up_ref(rsa);
> }
> return rsa;
> }
>
Or if the OP really wants two independent structures (as opposed to sharing
one) then RSAPublicKey_dup() or RSAPrivateKey_dup() will do.
Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]