summaryrefslogtreecommitdiff
path: root/crypto/evp/evp_locl.h
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-02-08 17:01:56 +0100
committerRichard Levitte <levitte@openssl.org>2019-03-18 14:27:02 +0100
commitc13d2ab439a9dcbbf22ef85a00603142b0a37779 (patch)
tree626fc5adbbc472ef6053da0ac08c4409e519bc16 /crypto/evp/evp_locl.h
parenta383083194b882a904ae66fcf74ebc348602407c (diff)
Add generic EVP method fetcher
This is an interface between Core dispatch table fetching and EVP_{method}_fetch(). All that's needed from the diverse method fetchers are the functions to create a method structure from a dispatch table, a function that ups the method reference counter and a function to free the method (in case of failure). This routine is internal to the EVP API andis therefore only made accessible within crypto/evp, by including evp_locl.h Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8341)
Diffstat (limited to 'crypto/evp/evp_locl.h')
-rw-r--r--crypto/evp/evp_locl.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/crypto/evp/evp_locl.h b/crypto/evp/evp_locl.h
index 95a9d5c517..82e7bf8b11 100644
--- a/crypto/evp/evp_locl.h
+++ b/crypto/evp/evp_locl.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -76,3 +76,13 @@ typedef struct evp_pbe_st EVP_PBE_CTL;
DEFINE_STACK_OF(EVP_PBE_CTL)
int is_partially_overlapping(const void *ptr1, const void *ptr2, int len);
+
+#include <openssl/ossl_typ.h>
+#include <openssl/core.h>
+
+void *evp_generic_fetch(OPENSSL_CTX *ctx, int operation_id,
+ const char *algorithm, const char *properties,
+ void *(*new_method)(int nid, const OSSL_DISPATCH *fns,
+ OSSL_PROVIDER *prov),
+ int (*upref_method)(void *),
+ void (*free_method)(void *));