Debian Codegraph @

debian/rust-vendor/aws-lc-sys/aws-lc/crypto/err/internal.h

raw
1 // Copyright (c) 2017, Google Inc.
2 // SPDX-License-Identifier: ISC
3
4 #ifndef OPENSSL_HEADER_CRYPTO_ERR_INTERNAL_H
5 #define OPENSSL_HEADER_CRYPTO_ERR_INTERNAL_H
6
7 #include <openssl/err.h>
8
9 #if defined(__cplusplus)
10 extern "C" {
11 #endif
12
13
14 // Private error queue functions.
15
16 // ERR_SAVE_STATE contains a saved representation of the error queue. It is
17 // slightly more compact than |ERR_STATE| as the error queue will typically not
18 // contain |ERR_NUM_ERRORS| entries.
19 typedef struct err_save_state_st ERR_SAVE_STATE;
20
21 // ERR_SAVE_STATE_free releases all memory associated with |state|.
22 OPENSSL_EXPORT void ERR_SAVE_STATE_free(ERR_SAVE_STATE *state);
23
24 // ERR_save_state returns a newly-allocated |ERR_SAVE_STATE| structure
25 // containing the current state of the error queue or NULL on allocation
26 // error. It should be released with |ERR_SAVE_STATE_free|.
27 OPENSSL_EXPORT ERR_SAVE_STATE *ERR_save_state(void);
28
29 // ERR_restore_state clears the error queue and replaces it with |state|.
30 OPENSSL_EXPORT void ERR_restore_state(const ERR_SAVE_STATE *state);
31
32
33 #if defined(__cplusplus)
34 } // extern C
35
36 extern "C++" {
37
38 BSSL_NAMESPACE_BEGIN
39
40 BORINGSSL_MAKE_DELETER(ERR_SAVE_STATE, ERR_SAVE_STATE_free)
41
42 BSSL_NAMESPACE_END
43
44 } // extern C++
45 #endif
46
47 #endif // OPENSSL_HEADER_CRYPTO_ERR_INTERNAL_H