mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-19 02:54:24 +00:00
Merge "fix(cert-create): load openSSL configuration before PKCS11 operations" into integration
This commit is contained in:
commit
5cc9bdd399
1 changed files with 8 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
||||||
#include <openssl/engine.h>
|
#include <openssl/engine.h>
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
|
#include <openssl/ssl.h>
|
||||||
|
|
||||||
#include "cert.h"
|
#include "cert.h"
|
||||||
#include "cmd_opt.h"
|
#include "cmd_opt.h"
|
||||||
|
@ -214,6 +215,13 @@ static EVP_PKEY *key_load_pkcs11(const char *uri)
|
||||||
EVP_PKEY *pkey;
|
EVP_PKEY *pkey;
|
||||||
ENGINE *e;
|
ENGINE *e;
|
||||||
|
|
||||||
|
#if !USING_OPENSSL3
|
||||||
|
if (!OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL)) {
|
||||||
|
fprintf(stderr, "Failed to init SSL\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
ENGINE_load_builtin_engines();
|
ENGINE_load_builtin_engines();
|
||||||
e = ENGINE_by_id("pkcs11");
|
e = ENGINE_by_id("pkcs11");
|
||||||
if (!e) {
|
if (!e) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue