aboutsummaryrefslogtreecommitdiff
path: root/crypto/engine/tb_cipher.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/engine/tb_cipher.c')
-rw-r--r--crypto/engine/tb_cipher.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/crypto/engine/tb_cipher.c b/crypto/engine/tb_cipher.c
index 236da346cd4c..037f5687524f 100644
--- a/crypto/engine/tb_cipher.c
+++ b/crypto/engine/tb_cipher.c
@@ -1,12 +1,15 @@
/*
- * Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2001-2021 The OpenSSL Project Authors. All Rights Reserved.
*
- * Licensed under the OpenSSL license (the "License"). You may not use
+ * Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
+/* We need to use some engine deprecated APIs */
+#define OPENSSL_SUPPRESS_DEPRECATED
+
#include "eng_local.h"
static ENGINE_TABLE *cipher_table = NULL;
@@ -62,7 +65,8 @@ int ENGINE_set_default_ciphers(ENGINE *e)
*/
ENGINE *ENGINE_get_cipher_engine(int nid)
{
- return engine_table_select(&cipher_table, nid);
+ return ossl_engine_table_select(&cipher_table, nid,
+ OPENSSL_FILE, OPENSSL_LINE);
}
/* Obtains a cipher implementation from an ENGINE functional reference */
@@ -71,7 +75,7 @@ const EVP_CIPHER *ENGINE_get_cipher(ENGINE *e, int nid)
const EVP_CIPHER *ret;
ENGINE_CIPHERS_PTR fn = ENGINE_get_ciphers(e);
if (!fn || !fn(e, &ret, NULL, nid)) {
- ENGINEerr(ENGINE_F_ENGINE_GET_CIPHER, ENGINE_R_UNIMPLEMENTED_CIPHER);
+ ERR_raise(ERR_LIB_ENGINE, ENGINE_R_UNIMPLEMENTED_CIPHER);
return NULL;
}
return ret;