summaryrefslogtreecommitdiffstats
path: root/include/internal
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-02-06 17:42:50 +0100
committerRichard Levitte <levitte@openssl.org>2019-02-16 00:29:42 +0100
commitd64b62998beceef8a8b8e1558862eb1c671d677a (patch)
tree1488259182cb8a09b18410623eb070afc07f63ee /include/internal
parentAdd CRYPTO_alloc_ex_data() (diff)
downloadopenssl-d64b62998beceef8a8b8e1558862eb1c671d677a.tar.xz
openssl-d64b62998beceef8a8b8e1558862eb1c671d677a.zip
Add an OpenSSL library context
The context builds on CRYPTO_EX_DATA, allowing it to be dynamically extended with new data from the different parts of libcrypto. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8225)
Diffstat (limited to 'include/internal')
-rw-r--r--include/internal/cryptlib.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/internal/cryptlib.h b/include/internal/cryptlib.h
index 9bf3c31620..28fd96e207 100644
--- a/include/internal/cryptlib.h
+++ b/include/internal/cryptlib.h
@@ -95,4 +95,13 @@ uint32_t OPENSSL_rdtsc(void);
size_t OPENSSL_instrument_bus(unsigned int *, size_t);
size_t OPENSSL_instrument_bus2(unsigned int *, size_t, size_t);
+typedef struct openssl_ctx_method {
+ void *(*new_func)(void);
+ void (*free_func)(void *);
+} OPENSSL_CTX_METHOD;
+/* For each type of data to store in the context, an index must be created */
+int openssl_ctx_new_index(const OPENSSL_CTX_METHOD *);
+/* Functions to retrieve pointers to data by index */
+void *openssl_ctx_get_data(OPENSSL_CTX *, int /* index */);
+
#endif