mirror of
https://github.com/openssl/openssl.git
synced 2024-12-27 06:21:43 +08:00
22e27978b2
The self tests for the fips module are triggered on startup and they need to know the core's libctx in order to function correctly. As the provider can be autoloaded via configuration it then needs to propagate the callers libctx down to the provider via the config load. Note that OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, ..) is still called, but will only load the default configuration if the OPENSSL_CONF environment variable is set. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11240)
60 lines
1.7 KiB
Plaintext
60 lines
1.7 KiB
Plaintext
=pod
|
|
|
|
=head1 NAME
|
|
|
|
NCONF_new_with_libctx, NCONF_new, NCONF_free, NCONF_default, NCONF_load
|
|
- functionality to Load and parse configuration files manually
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
#include <openssl/conf.h>
|
|
|
|
CONF *NCONF_new_with_libctx(OPENSSL_CTX *libctx, CONF_METHOD *meth);
|
|
CONF *NCONF_new(CONF_METHOD *meth);
|
|
void NCONF_free(CONF *conf);
|
|
CONF_METHOD *NCONF_default(void);
|
|
int NCONF_load(CONF *conf, const char *file, long *eline);
|
|
|
|
=head1 DESCRIPTION
|
|
|
|
NCONF_new_with_libctx() creates a new CONF object in heap memory and assigns to
|
|
it a context I<libctx> that can be used during loading. If the method table
|
|
I<meth> is set to NULL then the default value of NCONF_default() is used.
|
|
|
|
NCONF_new() is similar to NCONF_new_with_libctx() but sets the I<libctx> to NULL.
|
|
|
|
NCONF_free() frees the data associated with I<conf> and then frees the I<conf>
|
|
object.
|
|
|
|
NCONF_load() parses the file named I<filename> and adds the values found to
|
|
I<conf>. If an error occurs I<file> and I<eline> list the file and line that
|
|
the load failed on if they are not NULL.
|
|
|
|
NCONF_default() gets the default method table for processing a configuration file.
|
|
|
|
=head1 RETURN VALUES
|
|
|
|
NCONF_load() returns 1 on success or 0 on error.
|
|
|
|
NCONF_new_with_libctx() and NCONF_new() return a newly created I<CONF> object
|
|
or NULL if an error occurs.
|
|
|
|
=head1 SEE ALSO
|
|
|
|
L<CONF_modules_load_file(3)>,
|
|
|
|
=head1 HISTORY
|
|
|
|
NCONF_new_with_libctx() was added in OpenSSL 3.0.
|
|
|
|
=head1 COPYRIGHT
|
|
|
|
Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
|
|
|
|
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
|
|
L<https://www.openssl.org/source/license.html>.
|
|
|
|
=cut
|