summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-03-06 23:32:07 +0100
committerRichard Levitte <levitte@openssl.org>2019-11-03 18:38:23 +0100
commite3c4ad283bd1a52f3d53de22e4fc6053bade14d6 (patch)
treef68fe010a6f844046cb76db86173ae7000912df9 /crypto
parent3ee348b0dc5cd904fc2c022e6543f478c3d78732 (diff)
OSSL_STORE: constify the criterion parameter a bit more
For some reason, OSSL_STORE_SEARCH_get0_name() and OSSL_STORE_find() accepted a non-const OSSL_STORE_SEARCH criterion, which isn't at all necessary. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8442)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/store/loader_file.c3
-rw-r--r--crypto/store/store_lib.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/crypto/store/loader_file.c b/crypto/store/loader_file.c
index 078c7c2573..cf9951f0fd 100644
--- a/crypto/store/loader_file.c
+++ b/crypto/store/loader_file.c
@@ -930,7 +930,8 @@ static int file_expect(OSSL_STORE_LOADER_CTX *ctx, int expected)
return 1;
}
-static int file_find(OSSL_STORE_LOADER_CTX *ctx, OSSL_STORE_SEARCH *search)
+static int file_find(OSSL_STORE_LOADER_CTX *ctx,
+ const OSSL_STORE_SEARCH *search)
{
/*
* If ctx == NULL, the library is looking to know if this loader supports
diff --git a/crypto/store/store_lib.c b/crypto/store/store_lib.c
index 92b957c7cd..84f768bb5b 100644
--- a/crypto/store/store_lib.c
+++ b/crypto/store/store_lib.c
@@ -147,7 +147,7 @@ int OSSL_STORE_expect(OSSL_STORE_CTX *ctx, int expected_type)
return 1;
}
-int OSSL_STORE_find(OSSL_STORE_CTX *ctx, OSSL_STORE_SEARCH *search)
+int OSSL_STORE_find(OSSL_STORE_CTX *ctx, const OSSL_STORE_SEARCH *search)
{
if (ctx->loading) {
OSSL_STOREerr(OSSL_STORE_F_OSSL_STORE_FIND,
@@ -569,7 +569,7 @@ int OSSL_STORE_SEARCH_get_type(const OSSL_STORE_SEARCH *criterion)
return criterion->search_type;
}
-X509_NAME *OSSL_STORE_SEARCH_get0_name(OSSL_STORE_SEARCH *criterion)
+X509_NAME *OSSL_STORE_SEARCH_get0_name(const OSSL_STORE_SEARCH *criterion)
{
return criterion->name;
}