summaryrefslogtreecommitdiff
path: root/crypto/encode_decode
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/encode_decode')
-rw-r--r--crypto/encode_decode/decoder_meth.c23
-rw-r--r--crypto/encode_decode/encoder_meth.c23
2 files changed, 4 insertions, 42 deletions
diff --git a/crypto/encode_decode/decoder_meth.c b/crypto/encode_decode/decoder_meth.c
index c469f84558..2a8b044f78 100644
--- a/crypto/encode_decode/decoder_meth.c
+++ b/crypto/encode_decode/decoder_meth.c
@@ -17,6 +17,7 @@
#include "internal/provider.h"
#include "crypto/decoder.h"
#include "encoder_local.h"
+#include "crypto/context.h"
/*
* Decoder can have multiple names, separated with colons in a name string
@@ -65,25 +66,6 @@ void OSSL_DECODER_free(OSSL_DECODER *decoder)
OPENSSL_free(decoder);
}
-/* Permanent decoder method store, constructor and destructor */
-static void decoder_store_free(void *vstore)
-{
- ossl_method_store_free(vstore);
-}
-
-static void *decoder_store_new(OSSL_LIB_CTX *ctx)
-{
- return ossl_method_store_new(ctx);
-}
-
-
-static const OSSL_LIB_CTX_METHOD decoder_store_method = {
- /* We want decoder_store to be cleaned up before the provider store */
- OSSL_LIB_CTX_METHOD_PRIORITY_2,
- decoder_store_new,
- decoder_store_free,
-};
-
/* Data to be passed through ossl_method_construct() */
struct decoder_data_st {
OSSL_LIB_CTX *libctx;
@@ -120,8 +102,7 @@ static void dealloc_tmp_decoder_store(void *store)
/* Get the permanent decoder store */
static OSSL_METHOD_STORE *get_decoder_store(OSSL_LIB_CTX *libctx)
{
- return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DECODER_STORE_INDEX,
- &decoder_store_method);
+ return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DECODER_STORE_INDEX);
}
/* Get decoder methods from a store, or put one in */
diff --git a/crypto/encode_decode/encoder_meth.c b/crypto/encode_decode/encoder_meth.c
index 57b2f998e2..67bfcc23fe 100644
--- a/crypto/encode_decode/encoder_meth.c
+++ b/crypto/encode_decode/encoder_meth.c
@@ -17,6 +17,7 @@
#include "internal/provider.h"
#include "crypto/encoder.h"
#include "encoder_local.h"
+#include "crypto/context.h"
/*
* Encoder can have multiple names, separated with colons in a name string
@@ -65,25 +66,6 @@ void OSSL_ENCODER_free(OSSL_ENCODER *encoder)
OPENSSL_free(encoder);
}
-/* Permanent encoder method store, constructor and destructor */
-static void encoder_store_free(void *vstore)
-{
- ossl_method_store_free(vstore);
-}
-
-static void *encoder_store_new(OSSL_LIB_CTX *ctx)
-{
- return ossl_method_store_new(ctx);
-}
-
-
-static const OSSL_LIB_CTX_METHOD encoder_store_method = {
- /* We want encoder_store to be cleaned up before the provider store */
- OSSL_LIB_CTX_METHOD_PRIORITY_2,
- encoder_store_new,
- encoder_store_free,
-};
-
/* Data to be passed through ossl_method_construct() */
struct encoder_data_st {
OSSL_LIB_CTX *libctx;
@@ -120,8 +102,7 @@ static void dealloc_tmp_encoder_store(void *store)
/* Get the permanent encoder store */
static OSSL_METHOD_STORE *get_encoder_store(OSSL_LIB_CTX *libctx)
{
- return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_ENCODER_STORE_INDEX,
- &encoder_store_method);
+ return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_ENCODER_STORE_INDEX);
}
/* Get encoder methods from a store, or put one in */