*/
/* Macros to build Self test data */
-#define ITM(x) ((void *)&x), sizeof(x)
-#define ITM_STR(x) ((void *)&x), (sizeof(x) - 1)
+#define ITM(x) ((const void *)&x), sizeof(x)
+#define ITM_STR(x) ((const void *)&x), (sizeof(x) - 1)
#define ST_KAT_PARAM_END() { "", 0, NULL, 0 }
#define ST_KAT_PARAM_BIGNUM(name, data) \
ossl_polyval_ghash_hash(ctx->Htable, S_s, ctx->aad, UP16(ctx->aad_len));
}
if (DOWN16(len) > 0)
- ossl_polyval_ghash_hash(ctx->Htable, S_s, (uint8_t *)in, DOWN16(len));
+ ossl_polyval_ghash_hash(ctx->Htable, S_s, in, DOWN16(len));
if (!IS16(len)) {
/* deal with padding - probably easier to memset the padding first rather than calculate */
memset(padding, 0, sizeof(padding));
const PROV_CIPHER_HW *ossl_prov_cipher_hw_chacha20(size_t keybits)
{
- return (PROV_CIPHER_HW *)&chacha20_hw;
+ return (const PROV_CIPHER_HW *)&chacha20_hw;
}
const PROV_CIPHER_HW *ossl_prov_cipher_hw_chacha20_poly1305(size_t keybits)
{
- return (PROV_CIPHER_HW *)&chacha20poly1305_hw;
+ return (const PROV_CIPHER_HW *)&chacha20poly1305_hw;
}
#define RC4_HMAC_MD5_IV_BITS 0
#define RC4_HMAC_MD5_MODE 0
-#define GET_HW(ctx) ((PROV_CIPHER_HW_RC4_HMAC_MD5 *)ctx->base.hw)
+#define GET_HW(ctx) ((const PROV_CIPHER_HW_RC4_HMAC_MD5 *)ctx->base.hw)
static OSSL_FUNC_cipher_encrypt_init_fn rc4_hmac_md5_einit;
static OSSL_FUNC_cipher_decrypt_init_fn rc4_hmac_md5_dinit;
const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc4_hmac_md5(size_t keybits)
{
- return (PROV_CIPHER_HW *)&rc4_hmac_md5_hw;
+ return (const PROV_CIPHER_HW *)&rc4_hmac_md5_hw;
}
#ifndef OPENSSL_NO_ML_KEM
static int ml_kem_to_text(BIO *out, const void *vkey, int selection)
{
- return ossl_ml_kem_key_to_text(out, (ML_KEM_KEY *)vkey, selection);
+ return ossl_ml_kem_key_to_text(out, (const ML_KEM_KEY *)vkey, selection);
}
#endif
#ifndef OPENSSL_NO_SLH_DSA
static int slh_dsa_to_text(BIO *out, const void *key, int selection)
{
- return ossl_slh_dsa_key_to_text(out, (SLH_DSA_KEY *)key, selection);
+ return ossl_slh_dsa_key_to_text(out, (const SLH_DSA_KEY *)key, selection);
}
#endif /* OPENSSL_NO_SLH_DSA */
#ifndef OPENSSL_NO_ML_DSA
static int ml_dsa_to_text(BIO *out, const void *key, int selection)
{
- return ossl_ml_dsa_key_to_text(out, (ML_DSA_KEY *)key, selection);
+ return ossl_ml_dsa_key_to_text(out, (const ML_DSA_KEY *)key, selection);
}
#endif /* OPENSSL_NO_ML_DSA */
/* ---------------------------------------------------------------------- */
}
if (pmacctx->key->cipher.cipher != NULL)
- ciphername = (char *)EVP_CIPHER_get0_name(pmacctx->key->cipher.cipher);
+ ciphername = EVP_CIPHER_get0_name(pmacctx->key->cipher.cipher);
if (!ossl_prov_set_macctx(pmacctx->macctx,
- (char *)ciphername,
- (char *)mdname,
+ ciphername,
+ mdname,
pmacctx->key->properties, params))
return 0;