I am wondering if there is a possibility to attach an ENGINE*
implementation to a SSL_CTX*
and/or SSL*
structures. What I want to achieve is to have a SSL_CTX*
that will be set with the default cryptographic operations builtin in OpenSSL and another SSL_CTX*
that will use a dedicated HSM as the crypto layer.
Is a way that I can achieve this? From what I've read one could register and set to default some cryptographic operations(random, ciphers, md, etc...) but those that have been set will be used and not the builtin ones.
e.g. EVP_CipherInit_ex
has its third parameter an ENGINE*
. Encryption/Decryption with EVP_CIPHER_CTX*
initialized this way will process the encryption/decryption via the ENGINE implementation.