Hi...thanks for your feedback.
>Which engine?
The engine I was referring to is a sample engine that I created. This engine
uses the default RSA method "RSA_PKC51_SSLeay" for RSA crypto operation.
Below is my engine implementation.
static RSA_METHOD myengine_rsa =
{
"MYENGINE RSA method",
NULL, //pub encrypt
NULL, //pub decrypt
NULL, //priv encrypt
NULL, //priv decrypt
NULL, //rsa_mod_exp
NULL, //bn_mod_exp
NULL, //init
NULL, //finish
0, //flag
NULL, //app data
NULL, //rsa_sign
NULL, //rsa_verify
NULL //rsa_keygen
};
static int myengine_bind_helper(ENGINE *e)
{
if(!ENGINE_set_id(e, MYENGINE_ID) ||
!ENGINE_set_name(e, MYENGINE_NAME) ||
!ENGINE_set_init_function(e, myengine_init) ||
!ENGINE_set_finish_function(e, myengine_finish) ||
!ENGINE_set_RSA(e, &myengine_rsa))
{
return 0;
}
return 1;
}
static int myengine_init(ENGINE *e)
{
const RSA_METHOD *defMethodRSA = RSA_PKCS1_SSLeay();
if (defMethodRSA)
{
myengine_rsa.rsa_pub_enc = defMethodRSA->rsa_pub_enc;
myengine_rsa.rsa_pub_dec = defMethodRSA->rsa_pub_dec;
myengine_rsa.rsa_priv_enc = defMethodRSA->rsa_priv_enc;
myengine_rsa.rsa_priv_dec = defMethodRSA->rsa_priv_dec;
myengine_rsa.rsa_mod_exp = defMethodRSA->rsa_mod_exp;
myengine_rsa.bn_mod_exp = defMethodRSA->bn_mod_exp;
myengine_rsa.init = defMethodRSA->init;
myengine_rsa.finish = defMethodRSA->finish;
myengine_rsa.flags = defMethodRSA->flags;
myengine_rsa.app_data = defMethodRSA->app_data;
myengine_rsa.rsa_sign = defMethodRSA->rsa_sign;
myengine_rsa.rsa_verify = defMethodRSA->rsa_verify;
myengine_rsa.rsa_keygen = defMethodRSA->rsa_keygen;
}
else
{
return 0;
}
return 1;
}
Regards,
Mohan
--
View this message in context:
http://openssl.6102.n7.nabble.com/OpenSSL-engine-utilization-causes-performance-overhead-for-large-number-of-concurrent-client-connects-tp46834p46839.html
Sent from the OpenSSL - Dev mailing list archive at Nabble.com.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [email protected]
Automated List Manager [email protected]