Adam Langley | 4c921e1 | 2014-07-14 15:28:14 -0700 | [diff] [blame] | 1 | /* Copyright (c) 2014, Google Inc. |
| 2 | * |
| 3 | * Permission to use, copy, modify, and/or distribute this software for any |
| 4 | * purpose with or without fee is hereby granted, provided that the above |
| 5 | * copyright notice and this permission notice appear in all copies. |
| 6 | * |
| 7 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 8 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 9 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY |
| 10 | * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 11 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION |
| 12 | * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN |
| 13 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ |
| 14 | |
David Benjamin | a70c75c | 2014-09-11 19:11:15 -0400 | [diff] [blame] | 15 | #ifndef OPENSSL_HEADER_CRYPTO_H |
| 16 | #define OPENSSL_HEADER_CRYPTO_H |
| 17 | |
| 18 | #include <openssl/base.h> |
| 19 | |
David Benjamin | 2c6080f | 2015-04-24 10:15:31 -0400 | [diff] [blame] | 20 | /* Upstream OpenSSL defines |OPENSSL_malloc|, etc., in crypto.h rather than |
| 21 | * mem.h. */ |
| 22 | #include <openssl/mem.h> |
| 23 | |
Matt Braithwaite | d0e1f1c | 2015-08-05 11:40:35 -0700 | [diff] [blame] | 24 | /* Upstream OpenSSL defines |CRYPTO_LOCK|, etc., in crypto.h rather than |
| 25 | * thread.h. */ |
| 26 | #include <openssl/thread.h> |
| 27 | |
David Benjamin | a70c75c | 2014-09-11 19:11:15 -0400 | [diff] [blame] | 28 | |
| 29 | #if defined(__cplusplus) |
| 30 | extern "C" { |
| 31 | #endif |
| 32 | |
| 33 | |
| 34 | /* crypto.h contains functions for initializing the crypto library. */ |
| 35 | |
| 36 | |
| 37 | /* CRYPTO_library_init initializes the crypto library. It must be called if the |
| 38 | * library is built with BORINGSSL_NO_STATIC_INITIALIZER. Otherwise, it does |
| 39 | * nothing and a static initializer is used instead. */ |
| 40 | OPENSSL_EXPORT void CRYPTO_library_init(void); |
| 41 | |
| 42 | |
Adam Langley | c3ef76f | 2015-04-13 14:34:17 -0700 | [diff] [blame] | 43 | /* Deprecated functions. */ |
| 44 | |
| 45 | #define OPENSSL_VERSION_TEXT "BoringSSL" |
| 46 | |
| 47 | #define SSLEAY_VERSION 0 |
| 48 | |
| 49 | /* SSLeay_version is a compatibility function that returns the string |
| 50 | * "BoringSSL". */ |
| 51 | OPENSSL_EXPORT const char *SSLeay_version(int unused); |
| 52 | |
Adam Langley | b3a262c | 2015-05-19 16:30:20 -0700 | [diff] [blame] | 53 | /* SSLeay is a compatibility function that returns OPENSSL_VERSION_NUMBER from |
| 54 | * base.h. */ |
| 55 | OPENSSL_EXPORT unsigned long SSLeay(void); |
Adam Langley | c3ef76f | 2015-04-13 14:34:17 -0700 | [diff] [blame] | 56 | |
Adam Langley | 05ee4fd | 2015-08-02 09:35:44 -0700 | [diff] [blame^] | 57 | /* CRYPTO_malloc_init returns one. */ |
| 58 | OPENSSL_EXPORT int CRYPTO_malloc_init(void); |
| 59 | |
| 60 | /* ENGINE_load_builtin_engines does nothing. */ |
| 61 | OPENSSL_EXPORT void ENGINE_load_builtin_engines(void); |
| 62 | |
Adam Langley | c3ef76f | 2015-04-13 14:34:17 -0700 | [diff] [blame] | 63 | |
David Benjamin | a70c75c | 2014-09-11 19:11:15 -0400 | [diff] [blame] | 64 | #if defined(__cplusplus) |
| 65 | } /* extern C */ |
| 66 | #endif |
Adam Langley | 4c921e1 | 2014-07-14 15:28:14 -0700 | [diff] [blame] | 67 | |
David Benjamin | a70c75c | 2014-09-11 19:11:15 -0400 | [diff] [blame] | 68 | #endif /* OPENSSL_HEADER_CRYPTO_H */ |