我正在寻求构建自定义引擎并使用EVP API实现RSA算法。谁能指导我应该实现哪种结构并将其绑定到引擎。
您需要使用此处记录的RSA_METHOD
功能创建自定义RSA_meth_*
:
https://www.openssl.org/docs/man1.1.1/man3/RSA_meth_new.html
然后使用ENGINE_set_RSA
将其设置为在引擎中使用:
https://www.openssl.org/docs/man1.1.1/man3/ENGINE_set_RSA.html
这里有一些例子:
还有这里:
https://github.com/openssl/openssl/blob/a9a8863b791a54625da2a079a496a31cb7f94482/engines/e_capi.c#L425-L438https://github.com/openssl/openssl/blob/a9a8863b791a54625da2a079a496a31cb7f94482/engines/e_capi.c#L546