* https://www.openssl.org/source/license.html
*/
-#include "internal/cryptlib_int.h"
+#include "crypto/cryptlib.h"
+#include <openssl/conf.h>
#include "internal/thread_once.h"
#include "internal/property.h"
return ctx;
}
+#ifndef FIPS_MODE
+int OPENSSL_CTX_load_config(OPENSSL_CTX *ctx, const char *config_file)
+{
+ return CONF_modules_load_file_with_libctx(ctx, config_file, NULL, 0) > 0;
+}
+#endif
+
void OPENSSL_CTX_free(OPENSSL_CTX *ctx)
{
if (ctx != NULL)
return ctx;
}
+int openssl_ctx_is_default(OPENSSL_CTX *ctx)
+{
+#ifndef FIPS_MODE
+ if (ctx == NULL || ctx == default_context)
+ return 1;
+#endif
+ return 0;
+}
+
static void openssl_ctx_generic_new(void *parent_ign, void *ptr_ign,
CRYPTO_EX_DATA *ad, int index,
long argl_ign, void *argp)