On Mon, Jun 21, 2010, jeff wrote: > Well that completely screwed up my plans. Am i glad i looked at this > thread before creating a disaster. > > So i was using SSL_METHOD struct to provide a custom implementation of > rsa_mod_exp. And this implementation needed to be provided on a per-need > basis. After your reply, I quickly ran a test and saw all my keys (RSA > structs) been carrying the same change. > > What's more disturbing is that I had thought that using "app_data" field > of the struct I could make the method context aware so it knows where it > was called from (and provide some thread safe mechanics in there). > > Is there any way to create unique instances of this struct to possibly > achieve some of the goals above? thanks > jeff >
SSL_METHOD is the wrong place to put this kind of thing. You can develop an RSA_METHOD structure in an ENGINE and assign that to individual RSA structures when they are created. Then anything using that structure automatically ends up calling the custom routines in the RSA_METHOD. This is typically used for crypto accelerators and HSMs. Some of the standard ENGINEs under engines/ should give some pointers. 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 User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org