1 /*
2 * Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC")
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NETWORK ASSOCIATES DISCLAIMS
9 * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
10 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE
11 * FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
14 * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 *
16 * See the COPYRIGHT file distributed with this work for additional
17 * information regarding copyright ownership.
18 *
19 * Portions Copyright (C) Network Associates, Inc.
20 *
21 * Permission to use, copy, modify, and/or distribute this software for any
22 * purpose with or without fee is hereby granted, provided that the above
23 * copyright notice and this permission notice appear in all copies.
24 *
25 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NETWORK ASSOCIATES DISCLAIMS
26 * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
27 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE
28 * FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
29 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
30 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
31 * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
32 */
33
34 /*
35 * Principal Author: Brian Wellington
36 */
37
38 #include <isc/result.h>
39
40 #include <openssl/conf.h>
41 #include <openssl/crypto.h>
42 #include <openssl/err.h>
43 #include <openssl/evp.h>
44 #include <openssl/objects.h>
45
46 #include "dst_internal.h"
47
48 isc_result_t
dst__openssl_init(void)49 dst__openssl_init(void) {
50 ERR_load_crypto_strings();
51 return (ISC_R_SUCCESS);
52 }
53
54 void
dst__openssl_destroy(void)55 dst__openssl_destroy(void) {
56 /*
57 * Sequence taken from apps_shutdown() in <apps/apps.h>.
58 */
59 CONF_modules_free();
60 OBJ_cleanup();
61 EVP_cleanup();
62 CRYPTO_cleanup_all_ex_data();
63 ERR_clear_error();
64 ERR_remove_thread_state(NULL);
65 ERR_free_strings();
66
67 }
68
69 /*! \file */
70