The keydata argument of OSSL_FUNC_keymgmt_has() should be read-only.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13200)
const OSSL_PARAM *OSSL_FUNC_keymgmt_settable_params(void *provctx);
/* Key object content checks */
- int OSSL_FUNC_keymgmt_has(void *keydata, int selection);
+ int OSSL_FUNC_keymgmt_has(const void *keydata, int selection);
int OSSL_FUNC_keymgmt_match(const void *keydata1, const void *keydata2,
int selection);
/* Key checks - key data content checks */
# define OSSL_FUNC_KEYMGMT_HAS 21
-OSSL_CORE_MAKE_FUNC(int, keymgmt_has, (void *keydata, int selection))
+OSSL_CORE_MAKE_FUNC(int, keymgmt_has, (const void *keydata, int selection))
/* Key checks - validation */
# define OSSL_FUNC_KEYMGMT_VALIDATE 22
DH_free(keydata);
}
-static int dh_has(void *keydata, int selection)
+static int dh_has(const void *keydata, int selection)
{
- DH *dh = keydata;
+ const DH *dh = keydata;
int ok = 0;
if (ossl_prov_is_running() && dh != NULL) {
DSA_free(keydata);
}
-static int dsa_has(void *keydata, int selection)
+static int dsa_has(const void *keydata, int selection)
{
- DSA *dsa = keydata;
+ const DSA *dsa = keydata;
int ok = 0;
if (ossl_prov_is_running() && dsa != NULL) {
}
static
-int ec_has(void *keydata, int selection)
+int ec_has(const void *keydata, int selection)
{
- EC_KEY *ec = keydata;
+ const EC_KEY *ec = keydata;
int ok = 0;
if (ossl_prov_is_running() && ec != NULL) {
NULL);
}
-static int ecx_has(void *keydata, int selection)
+static int ecx_has(const void *keydata, int selection)
{
- ECX_KEY *key = keydata;
+ const ECX_KEY *key = keydata;
int ok = 0;
if (ossl_prov_is_running() && key != NULL) {
kdf_data_free(kdfdata);
}
-static int kdf_has(void *keydata, int selection)
+static int kdf_has(const void *keydata, int selection)
{
return 0;
}
mac_key_free(mackey);
}
-static int mac_has(void *keydata, int selection)
+static int mac_has(const void *keydata, int selection)
{
- MAC_KEY *key = keydata;
+ const MAC_KEY *key = keydata;
int ok = 0;
if (ossl_prov_is_running() && key != NULL) {
RSA_free(keydata);
}
-static int rsa_has(void *keydata, int selection)
+static int rsa_has(const void *keydata, int selection)
{
- RSA *rsa = keydata;
+ const RSA *rsa = keydata;
int ok = 0;
if (rsa != NULL && ossl_prov_is_running()) {
OPENSSL_free(keydata);
}
-static int xor_has(void *vkey, int selection)
+static int xor_has(const void *vkey, int selection)
{
- XORKEY *key = vkey;
+ const XORKEY *key = vkey;
int ok = 0;
if (key != NULL) {