1 /*
2  * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
3  * Copyright (C) 2005-2014, Anthony Minessale II <anthm@freeswitch.org>
4  *
5  * Version: MPL 1.1
6  *
7  * The contents of this file are subject to the Mozilla Public License Version
8  * 1.1 (the "License"); you may not use this file except in compliance with
9  * the License. You may obtain a copy of the License at
10  * http://www.mozilla.org/MPL/
11  *
12  * Software distributed under the License is distributed on an "AS IS" basis,
13  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14  * for the specific language governing rights and limitations under the
15  * License.
16  *
17  * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
18  *
19  * The Initial Developer of the Original Code is
20  * Anthony Minessale II <anthm@freeswitch.org>
21  * Portions created by the Initial Developer are Copyright (C)
22  * the Initial Developer. All Rights Reserved.
23  *
24  * Contributor(s):
25  *
26  *
27  * switch_ssl.h
28  *
29  */
30 
31 #ifndef __SWITCH_SSL_H
32 #define __SWITCH_SSL_H
33 
34 #if defined(HAVE_OPENSSL)
35 #if defined (MACOSX) || defined(DARWIN)
36 /* Disable depricated-declarations on OS X */
37 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
38 #endif
39 #include <openssl/crypto.h>
40 #include <openssl/pem.h>
41 #include <openssl/rand.h>
42 #include <openssl/conf.h>
43 #include <openssl/x509v3.h>
44 #ifndef OPENSSL_NO_ENGINE
45 #include <openssl/engine.h>
46 #endif
47 #include <openssl/ssl.h>
48 #include <openssl/err.h>
49 #include <openssl/bio.h>
50 
51 SWITCH_DECLARE(int) switch_core_cert_extract_fingerprint(X509* x509, dtls_fingerprint_t *fp);
52 
53 #else
switch_core_cert_extract_fingerprint(void * x509,dtls_fingerprint_t * fp)54 static inline int switch_core_cert_extract_fingerprint(void* x509, dtls_fingerprint_t *fp) { return 0; }
55 #endif
56 
57 SWITCH_DECLARE(void) switch_ssl_destroy_ssl_locks(void);
58 SWITCH_DECLARE(void) switch_ssl_init_ssl_locks(void);
59 
60 #endif
61