]>
Commit | Line | Data |
---|---|---|
22e27978 SL |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
6b750b89 RS |
5 | NCONF_new_ex, NCONF_new, NCONF_free, NCONF_default, NCONF_load, |
6 | NCONF_get0_libctx | |
22e27978 SL |
7 | - functionality to Load and parse configuration files manually |
8 | ||
9 | =head1 SYNOPSIS | |
10 | ||
11 | #include <openssl/conf.h> | |
12 | ||
b4250010 | 13 | CONF *NCONF_new_ex(OSSL_LIB_CTX *libctx, CONF_METHOD *meth); |
22e27978 SL |
14 | CONF *NCONF_new(CONF_METHOD *meth); |
15 | void NCONF_free(CONF *conf); | |
16 | CONF_METHOD *NCONF_default(void); | |
17 | int NCONF_load(CONF *conf, const char *file, long *eline); | |
6b750b89 | 18 | OSSL_LIB_CTX *NCONF_get0_libctx(CONF *conf); |
22e27978 SL |
19 | |
20 | =head1 DESCRIPTION | |
21 | ||
d8652be0 | 22 | NCONF_new_ex() creates a new CONF object in heap memory and assigns to |
22e27978 SL |
23 | it a context I<libctx> that can be used during loading. If the method table |
24 | I<meth> is set to NULL then the default value of NCONF_default() is used. | |
25 | ||
d8652be0 | 26 | NCONF_new() is similar to NCONF_new_ex() but sets the I<libctx> to NULL. |
22e27978 SL |
27 | |
28 | NCONF_free() frees the data associated with I<conf> and then frees the I<conf> | |
29 | object. | |
30 | ||
31 | NCONF_load() parses the file named I<filename> and adds the values found to | |
32 | I<conf>. If an error occurs I<file> and I<eline> list the file and line that | |
33 | the load failed on if they are not NULL. | |
34 | ||
35 | NCONF_default() gets the default method table for processing a configuration file. | |
36 | ||
6b750b89 RS |
37 | NCONF_get0_libctx() gets the library context associated with the I<conf> |
38 | parameter. | |
39 | ||
22e27978 SL |
40 | =head1 RETURN VALUES |
41 | ||
42 | NCONF_load() returns 1 on success or 0 on error. | |
43 | ||
d8652be0 | 44 | NCONF_new_ex() and NCONF_new() return a newly created I<CONF> object |
22e27978 SL |
45 | or NULL if an error occurs. |
46 | ||
47 | =head1 SEE ALSO | |
48 | ||
49 | L<CONF_modules_load_file(3)>, | |
50 | ||
51 | =head1 HISTORY | |
52 | ||
d8652be0 | 53 | NCONF_new_ex() was added in OpenSSL 3.0. |
22e27978 SL |
54 | |
55 | =head1 COPYRIGHT | |
56 | ||
57 | Copyright 2020 The OpenSSL Project Authors. All Rights Reserved. | |
58 | ||
59 | Licensed under the Apache License 2.0 (the "License"). You may not use | |
60 | this file except in compliance with the License. You can obtain a copy | |
61 | in the file LICENSE in the source distribution or at | |
62 | L<https://www.openssl.org/source/license.html>. | |
63 | ||
64 | =cut |