From 98d81174d3763053b32b8cfd7225acd0a111d456 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Mon, 14 Aug 2023 12:38:44 +0200 Subject: [PATCH] Remove include/internal/decoder.h, as it's superfluous The routines declared in there are entirely libcrypto internal, so include/crypto/decoder.h is better suited for them. Reviewed-by: Matt Caswell Reviewed-by: Hugo Landau Reviewed-by: Dmitry Belyavskiy (Merged from https://github.com/openssl/openssl/pull/21733) --- crypto/context.c | 2 +- crypto/encode_decode/decoder_pkey.c | 1 - crypto/evp/evp_fetch.c | 2 +- crypto/provider_core.c | 1 - include/crypto/decoder.h | 4 ++++ include/internal/decoder.h | 18 ------------------ 6 files changed, 6 insertions(+), 22 deletions(-) delete mode 100644 include/internal/decoder.h diff --git a/crypto/context.c b/crypto/context.c index f84a00566c3..ba67b0c618e 100644 --- a/crypto/context.c +++ b/crypto/context.c @@ -14,7 +14,7 @@ #include "internal/core.h" #include "internal/bio.h" #include "internal/provider.h" -#include "internal/decoder.h" +#include "crypto/decoder.h" #include "crypto/context.h" struct ossl_lib_ctx_st { diff --git a/crypto/encode_decode/decoder_pkey.c b/crypto/encode_decode/decoder_pkey.c index e3aaa449023..d00ec75bead 100644 --- a/crypto/encode_decode/decoder_pkey.c +++ b/crypto/encode_decode/decoder_pkey.c @@ -22,7 +22,6 @@ #include "encoder_local.h" #include "internal/namemap.h" #include "internal/sizes.h" -#include "internal/decoder.h" int OSSL_DECODER_CTX_set_passphrase(OSSL_DECODER_CTX *ctx, const unsigned char *kstr, diff --git a/crypto/evp/evp_fetch.c b/crypto/evp/evp_fetch.c index b21c6f283b4..11281312993 100644 --- a/crypto/evp/evp_fetch.c +++ b/crypto/evp/evp_fetch.c @@ -17,7 +17,7 @@ #include "internal/core.h" #include "internal/provider.h" #include "internal/namemap.h" -#include "internal/decoder.h" +#include "crypto/decoder.h" #include "crypto/evp.h" /* evp_local.h needs it */ #include "evp_local.h" diff --git a/crypto/provider_core.c b/crypto/provider_core.c index 14f0d527fec..4cb3e21f69b 100644 --- a/crypto/provider_core.c +++ b/crypto/provider_core.c @@ -28,7 +28,6 @@ #include "internal/refcount.h" #include "internal/bio.h" #include "internal/core.h" -#include "internal/decoder.h" #include "provider_local.h" #include "crypto/context.h" #ifndef FIPS_MODULE diff --git a/include/crypto/decoder.h b/include/crypto/decoder.h index 514190fca23..b7b91209df1 100644 --- a/include/crypto/decoder.h +++ b/include/crypto/decoder.h @@ -33,4 +33,8 @@ int ossl_decoder_get_number(const OSSL_DECODER *encoder); int ossl_decoder_store_cache_flush(OSSL_LIB_CTX *libctx); int ossl_decoder_store_remove_all_provided(const OSSL_PROVIDER *prov); +void *ossl_decoder_cache_new(OSSL_LIB_CTX *ctx); +void ossl_decoder_cache_free(void *vcache); +int ossl_decoder_cache_flush(OSSL_LIB_CTX *libctx); + #endif diff --git a/include/internal/decoder.h b/include/internal/decoder.h deleted file mode 100644 index bfe1429ffbd..00000000000 --- a/include/internal/decoder.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2023 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 - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#ifndef OSSL_INTERNAL_DECODER_H -# define OSSL_INTERNAL_DECODER_H -# pragma once - -void *ossl_decoder_cache_new(OSSL_LIB_CTX *ctx); -void ossl_decoder_cache_free(void *vcache); -int ossl_decoder_cache_flush(OSSL_LIB_CTX *libctx); - -#endif -- 2.47.2