/*
- * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
* Copyright 2005 Nokia. All rights reserved.
*
if (ret->cert_store == NULL)
goto err;
#ifndef OPENSSL_NO_CT
- ret->ctlog_store = CTLOG_STORE_new();
+ ret->ctlog_store = CTLOG_STORE_new_with_libctx(libctx, propq);
if (ret->ctlog_store == NULL)
goto err;
#endif
/* initialize cipher/digest methods table */
if (!ssl_load_ciphers(ret))
- return 0;
+ goto err2;
if (!SSL_CTX_set_ciphersuites(ret, OSSL_default_ciphersuites()))
goto err;
}
}
- ctx = CT_POLICY_EVAL_CTX_new();
+ ctx = CT_POLICY_EVAL_CTX_new_with_libctx(s->ctx->libctx, s->ctx->propq);
if (ctx == NULL) {
SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL_VALIDATE_CT,
ERR_R_MALLOC_FAILURE);
int nid,
const char *properties)
{
+ EVP_CIPHER *ciph;
+
#ifndef OPENSSL_NO_ENGINE
ENGINE *eng;
}
#endif
- /* Otherwise we do an explicit fetch */
- return EVP_CIPHER_fetch(libctx, OBJ_nid2sn(nid), properties);
+ /* Otherwise we do an explicit fetch. This may fail and that could be ok */
+ ERR_set_mark();
+ ciph = EVP_CIPHER_fetch(libctx, OBJ_nid2sn(nid), properties);
+ ERR_pop_to_mark();
+ return ciph;
}
int nid,
const char *properties)
{
+ EVP_MD *md;
+
#ifndef OPENSSL_NO_ENGINE
ENGINE *eng;
#endif
/* Otherwise we do an explicit fetch */
- return EVP_MD_fetch(libctx, OBJ_nid2sn(nid), properties);
+ ERR_set_mark();
+ md = EVP_MD_fetch(libctx, OBJ_nid2sn(nid), properties);
+ ERR_pop_to_mark();
+ return md;
}
int ssl_evp_md_up_ref(const EVP_MD *md)