I am wondering if it is possible to bind the ENGINE* implementation to the SSL_CTX* and / or SSL* structures. I want to achieve SSL_CTX* , which will be installed with the default cryptographic operations built into OpenSSL, and another SSL_CTX* , which will use the dedicated HSM as the cryptographic layer.
I can do it? From what I read, it was possible to register and set some cryptographic operations by default (random, ciphers, md, etc.), but those that were installed will be used, not built-in.
eg. EVP_CipherInit_ex has the third parameter a ENGINE* . Encryption / decryption with EVP_CIPHER_CTX* initialized in this way will handle encryption / decryption using the ENGINE implementation.
source share