summaryrefslogtreecommitdiffstats
path: root/providers/implementations
diff options
context:
space:
mode:
authorPauli <ppzgs1@gmail.com>2021-02-23 11:48:35 +1000
committerPauli <ppzgs1@gmail.com>2021-02-26 18:08:41 +1000
commit644c5dd366913d9297db8e0693a754e2d45c9089 (patch)
treeb11b63227cf04b7672e265744993001482c49ea9 /providers/implementations
parent35c76a528bb14611d7ff2c77762b16cf28c1fef3 (diff)
prov: upport modified gettable/settable ctx calls for ciphers
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14240)
Diffstat (limited to 'providers/implementations')
-rw-r--r--providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c6
-rw-r--r--providers/implementations/ciphers/cipher_aes_ocb.c6
-rw-r--r--providers/implementations/ciphers/cipher_aes_siv.c7
-rw-r--r--providers/implementations/ciphers/cipher_aes_xts.c3
-rw-r--r--providers/implementations/ciphers/cipher_chacha20.c6
-rw-r--r--providers/implementations/ciphers/cipher_chacha20_poly1305.c2
-rw-r--r--providers/implementations/ciphers/cipher_null.c6
-rw-r--r--providers/implementations/ciphers/cipher_rc4_hmac_md5.c6
-rw-r--r--providers/implementations/ciphers/ciphercommon.c6
-rw-r--r--providers/implementations/include/prov/ciphercommon.h6
10 files changed, 34 insertions, 20 deletions
diff --git a/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c b/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c
index abefc20ab2..b78687ceae 100644
--- a/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c
+++ b/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c
@@ -59,7 +59,8 @@ static const OSSL_PARAM cipher_aes_known_settable_ctx_params[] = {
OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_KEYLEN, NULL),
OSSL_PARAM_END
};
-const OSSL_PARAM *aes_settable_ctx_params(ossl_unused void *provctx)
+const OSSL_PARAM *aes_settable_ctx_params(ossl_unused void *cctx,
+ ossl_unused void *provctx)
{
return cipher_aes_known_settable_ctx_params;
}
@@ -278,7 +279,8 @@ static const OSSL_PARAM cipher_aes_known_gettable_ctx_params[] = {
OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_UPDATED_IV, NULL, 0),
OSSL_PARAM_END
};
-const OSSL_PARAM *aes_gettable_ctx_params(ossl_unused void *provctx)
+const OSSL_PARAM *aes_gettable_ctx_params(ossl_unused void *cctx,
+ ossl_unused void *provctx)
{
return cipher_aes_known_gettable_ctx_params;
}
diff --git a/providers/implementations/ciphers/cipher_aes_ocb.c b/providers/implementations/ciphers/cipher_aes_ocb.c
index 69ee9f2cc5..627f146273 100644
--- a/providers/implementations/ciphers/cipher_aes_ocb.c
+++ b/providers/implementations/ciphers/cipher_aes_ocb.c
@@ -469,7 +469,8 @@ static const OSSL_PARAM cipher_ocb_known_gettable_ctx_params[] = {
OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_AEAD_TAG, NULL, 0),
OSSL_PARAM_END
};
-static const OSSL_PARAM *cipher_ocb_gettable_ctx_params(ossl_unused void *p_ctx)
+static const OSSL_PARAM *cipher_ocb_gettable_ctx_params(ossl_unused void *cctx,
+ ossl_unused void *p_ctx)
{
return cipher_ocb_known_gettable_ctx_params;
}
@@ -480,7 +481,8 @@ static const OSSL_PARAM cipher_ocb_known_settable_ctx_params[] = {
OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_AEAD_TAG, NULL, 0),
OSSL_PARAM_END
};
-static const OSSL_PARAM *cipher_ocb_settable_ctx_params(ossl_unused void *p_ctx)
+static const OSSL_PARAM *cipher_ocb_settable_ctx_params(ossl_unused void *cctx,
+ ossl_unused void *p_ctx)
{
return cipher_ocb_known_settable_ctx_params;
}
diff --git a/providers/implementations/ciphers/cipher_aes_siv.c b/providers/implementations/ciphers/cipher_aes_siv.c
index 25409bf0a8..9a75f6f5b7 100644
--- a/providers/implementations/ciphers/cipher_aes_siv.c
+++ b/providers/implementations/ciphers/cipher_aes_siv.c
@@ -183,7 +183,8 @@ static const OSSL_PARAM aes_siv_known_gettable_ctx_params[] = {
OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_AEAD_TAG, NULL, 0),
OSSL_PARAM_END
};
-static const OSSL_PARAM *aes_siv_gettable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *aes_siv_gettable_ctx_params(ossl_unused void *cctx,
+ ossl_unused void *provctx)
{
return aes_siv_known_gettable_ctx_params;
}
@@ -233,7 +234,8 @@ static const OSSL_PARAM aes_siv_known_settable_ctx_params[] = {
OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_AEAD_TAG, NULL, 0),
OSSL_PARAM_END
};
-static const OSSL_PARAM *aes_siv_settable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *aes_siv_settable_ctx_params(ossl_unused void *cctx,
+ ossl_unused void *provctx)
{
return aes_siv_known_settable_ctx_params;
}
@@ -248,7 +250,6 @@ static OSSL_FUNC_cipher_update_fn lc##_stream_update; \
static OSSL_FUNC_cipher_final_fn lc##_stream_final; \
static OSSL_FUNC_cipher_cipher_fn lc##_cipher; \
static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lc##_get_params; \
-static OSSL_FUNC_cipher_gettable_params_fn alg##_##lc##_gettable_ctx_params; \
static OSSL_FUNC_cipher_get_ctx_params_fn alg##_##lc##_get_ctx_params; \
static OSSL_FUNC_cipher_gettable_ctx_params_fn \
alg##_##lc##_gettable_ctx_params; \
diff --git a/providers/implementations/ciphers/cipher_aes_xts.c b/providers/implementations/ciphers/cipher_aes_xts.c
index e4b18b2719..13552b2a76 100644
--- a/providers/implementations/ciphers/cipher_aes_xts.c
+++ b/providers/implementations/ciphers/cipher_aes_xts.c
@@ -218,7 +218,8 @@ static const OSSL_PARAM aes_xts_known_settable_ctx_params[] = {
OSSL_PARAM_END
};
-static const OSSL_PARAM *aes_xts_settable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *aes_xts_settable_ctx_params(ossl_unused void *cctx,
+ ossl_unused void *provctx)
{
return aes_xts_known_settable_ctx_params;
}
diff --git a/providers/implementations/ciphers/cipher_chacha20.c b/providers/implementations/ciphers/cipher_chacha20.c
index bee1bb925b..9bce5b0914 100644
--- a/providers/implementations/ciphers/cipher_chacha20.c
+++ b/providers/implementations/ciphers/cipher_chacha20.c
@@ -95,7 +95,8 @@ static const OSSL_PARAM chacha20_known_gettable_ctx_params[] = {
OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_IVLEN, NULL),
OSSL_PARAM_END
};
-const OSSL_PARAM *chacha20_gettable_ctx_params(ossl_unused void *provctx)
+const OSSL_PARAM *chacha20_gettable_ctx_params(ossl_unused void *cctx,
+ ossl_unused void *provctx)
{
return chacha20_known_gettable_ctx_params;
}
@@ -135,7 +136,8 @@ static const OSSL_PARAM chacha20_known_settable_ctx_params[] = {
OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_IVLEN, NULL),
OSSL_PARAM_END
};
-const OSSL_PARAM *chacha20_settable_ctx_params(ossl_unused void *provctx)
+const OSSL_PARAM *chacha20_settable_ctx_params(ossl_unused void *cctx,
+ ossl_unused void *provctx)
{
return chacha20_known_settable_ctx_params;
}
diff --git a/providers/implementations/ciphers/cipher_chacha20_poly1305.c b/providers/implementations/ciphers/cipher_chacha20_poly1305.c
index 5d9ffad801..78ede20b44 100644
--- a/providers/implementations/ciphers/cipher_chacha20_poly1305.c
+++ b/providers/implementations/ciphers/cipher_chacha20_poly1305.c
@@ -135,7 +135,7 @@ static const OSSL_PARAM chacha20_poly1305_known_gettable_ctx_params[] = {
OSSL_PARAM_END
};
static const OSSL_PARAM *chacha20_poly1305_gettable_ctx_params
- (ossl_unused void *provctx)
+ (ossl_unused void *cctx, ossl_unused void *provctx)
{
return chacha20_poly1305_known_gettable_ctx_params;
}
diff --git a/providers/implementations/ciphers/cipher_null.c b/providers/implementations/ciphers/cipher_null.c
index 9d33a26f8d..00c97aad7a 100644
--- a/providers/implementations/ciphers/cipher_null.c
+++ b/providers/implementations/ciphers/cipher_null.c
@@ -111,7 +111,8 @@ static const OSSL_PARAM null_known_gettable_ctx_params[] = {
};
static OSSL_FUNC_cipher_gettable_ctx_params_fn null_gettable_ctx_params;
-static const OSSL_PARAM *null_gettable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *null_gettable_ctx_params(ossl_unused void *cctx,
+ ossl_unused void *provctx)
{
return null_known_gettable_ctx_params;
}
@@ -147,7 +148,8 @@ static const OSSL_PARAM null_known_settable_ctx_params[] = {
};
static OSSL_FUNC_cipher_settable_ctx_params_fn null_settable_ctx_params;
-static const OSSL_PARAM *null_settable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *null_settable_ctx_params(ossl_unused void *cctx,
+ ossl_unused void *provctx)
{
return null_known_settable_ctx_params;
}
diff --git a/providers/implementations/ciphers/cipher_rc4_hmac_md5.c b/providers/implementations/ciphers/cipher_rc4_hmac_md5.c
index c69b9aecb8..533820cd80 100644
--- a/providers/implementations/ciphers/cipher_rc4_hmac_md5.c
+++ b/providers/implementations/ciphers/cipher_rc4_hmac_md5.c
@@ -77,7 +77,8 @@ static const OSSL_PARAM rc4_hmac_md5_known_gettable_ctx_params[] = {
OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_AEAD_TLS1_AAD_PAD, NULL),
OSSL_PARAM_END
};
-const OSSL_PARAM *rc4_hmac_md5_gettable_ctx_params(ossl_unused void *provctx)
+const OSSL_PARAM *rc4_hmac_md5_gettable_ctx_params(ossl_unused void *cctx,
+ ossl_unused void *provctx)
{
return rc4_hmac_md5_known_gettable_ctx_params;
}
@@ -112,7 +113,8 @@ static const OSSL_PARAM rc4_hmac_md5_known_settable_ctx_params[] = {
OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_AEAD_TLS1_AAD, NULL, 0),
OSSL_PARAM_END
};
-const OSSL_PARAM *rc4_hmac_md5_settable_ctx_params(ossl_unused void *provctx)
+const OSSL_PARAM *rc4_hmac_md5_settable_ctx_params(ossl_unused void *cctx,
+ ossl_unused void *provctx)
{
return rc4_hmac_md5_known_settable_ctx_params;
}
diff --git a/providers/implementations/ciphers/ciphercommon.c b/providers/implementations/ciphers/ciphercommon.c
index b32f564bf7..3d2fb5b8f8 100644
--- a/providers/implementations/ciphers/ciphercommon.c
+++ b/providers/implementations/ciphers/ciphercommon.c
@@ -33,7 +33,7 @@ static const OSSL_PARAM cipher_known_gettable_params[] = {
{ OSSL_CIPHER_PARAM_TLS_MAC, OSSL_PARAM_OCTET_PTR, NULL, 0, OSSL_PARAM_UNMODIFIED },
OSSL_PARAM_END
};
-const OSSL_PARAM *ossl_cipher_generic_gettable_params(void *provctx)
+const OSSL_PARAM *ossl_cipher_generic_gettable_params(ossl_unused void *provctx)
{
return cipher_known_gettable_params;
}
@@ -141,7 +141,7 @@ static const OSSL_PARAM cipher_aead_known_gettable_ctx_params[] = {
OSSL_PARAM_END
};
const OSSL_PARAM *ossl_cipher_aead_gettable_ctx_params(
- ossl_unused void *provctx
+ ossl_unused void *cctx, ossl_unused void *provctx
)
{
return cipher_aead_known_gettable_ctx_params;
@@ -156,7 +156,7 @@ static const OSSL_PARAM cipher_aead_known_settable_ctx_params[] = {
OSSL_PARAM_END
};
const OSSL_PARAM *ossl_cipher_aead_settable_ctx_params(
- ossl_unused void *provctx
+ ossl_unused void *cctx, ossl_unused void *provctx
)
{
return cipher_aead_known_settable_ctx_params;
diff --git a/providers/implementations/include/prov/ciphercommon.h b/providers/implementations/include/prov/ciphercommon.h
index c0d7a04b24..d5212c3c81 100644
--- a/providers/implementations/include/prov/ciphercommon.h
+++ b/providers/implementations/include/prov/ciphercommon.h
@@ -333,7 +333,8 @@ static const OSSL_PARAM name##_known_gettable_ctx_params[] = { \
#define CIPHER_DEFAULT_GETTABLE_CTX_PARAMS_END(name) \
OSSL_PARAM_END \
}; \
-const OSSL_PARAM * name##_gettable_ctx_params(ossl_unused void *provctx) \
+const OSSL_PARAM * name##_gettable_ctx_params(ossl_unused void *cctx, \
+ ossl_unused void *provctx) \
{ \
return name##_known_gettable_ctx_params; \
}
@@ -345,7 +346,8 @@ static const OSSL_PARAM name##_known_settable_ctx_params[] = { \
#define CIPHER_DEFAULT_SETTABLE_CTX_PARAMS_END(name) \
OSSL_PARAM_END \
}; \
-const OSSL_PARAM * name##_settable_ctx_params(ossl_unused void *provctx) \
+const OSSL_PARAM * name##_settable_ctx_params(ossl_unused void *cctx, \
+ ossl_unused void *provctx) \
{ \
return name##_known_settable_ctx_params; \
}