We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a39f934 commit 273fe9fCopy full SHA for 273fe9f
1 file changed
shim.h
@@ -176,6 +176,16 @@ static inline EVP_CIPHER_CTX *EVP_CIPHER_CTX_new_wrapper(void) {
176
#endif
177
}
178
179
+// This wrapper allows for a common call for both versions of OpenSSL when initalizing an EVP_CIPHER_CTX.
180
+static inline void EVP_CIPHER_CTX_init_wrapper(EVP_CIPHER_CTX *ctx) {
181
+
182
+ #if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
183
+ EVP_CIPHER_CTX_reset(ctx);
184
+ #else
185
+ EVP_CIPHER_CTX_init(ctx);
186
+ #endif
187
+}
188
189
// This wrapper allows for a common call for both versions of OpenSSL when resetting an EVP_CIPHER_CTX.
190
static inline int EVP_CIPHER_CTX_reset_wrapper(EVP_CIPHER_CTX *ctx) {
191
0 commit comments