/*
- * Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2019-2021 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
*/
#include "internal/deprecated.h"
+#include <openssl/proverr.h>
#include "cipher_aes_siv.h"
#include "prov/implementations.h"
#include "prov/providercommon.h"
-#include "prov/providercommonerr.h"
#include "prov/ciphercommon_aead.h"
#include "prov/provider_ctx.h"
if (ctx != NULL) {
ctx->taglen = SIV_LEN;
ctx->mode = mode;
- ctx->flags = flags;
ctx->keylen = keybits / 8;
ctx->hw = ossl_prov_cipher_hw_aes_siv(keybits);
- ctx->libctx = PROV_LIBRARY_CONTEXT_OF(provctx);
+ ctx->libctx = PROV_LIBCTX_OF(provctx);
}
return ctx;
}
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;
}
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;
}
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; \
alg##_##lc##_settable_ctx_params; \
static int alg##_##kbits##_##lc##_get_params(OSSL_PARAM params[]) \
{ \
- return cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
- flags, 2*kbits, blkbits, ivbits); \
+ return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
+ flags, 2*kbits, blkbits, ivbits); \
} \
static void * alg##kbits##lc##_newctx(void *provctx) \
{ \
{ OSSL_FUNC_CIPHER_GET_PARAMS, \
(void (*)(void)) alg##_##kbits##_##lc##_get_params }, \
{ OSSL_FUNC_CIPHER_GETTABLE_PARAMS, \
- (void (*)(void))cipher_generic_gettable_params }, \
+ (void (*)(void))ossl_cipher_generic_gettable_params }, \
{ OSSL_FUNC_CIPHER_GET_CTX_PARAMS, \
(void (*)(void)) alg##_##lc##_get_ctx_params }, \
{ OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS, \