Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds const qualifier to ciphertext parameter in EVP_PKEY_decapsulate #1713

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crypto/fipsmodule/evp/evp_ctx.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ int EVP_PKEY_encapsulate(EVP_PKEY_CTX *ctx,

int EVP_PKEY_decapsulate(EVP_PKEY_CTX *ctx,
uint8_t *shared_secret, size_t *shared_secret_len,
uint8_t *ciphertext, size_t ciphertext_len) {
const uint8_t *ciphertext, size_t ciphertext_len) {
if (ctx == NULL || ctx->pmeth == NULL || ctx->pmeth->decapsulate == NULL) {
OPENSSL_PUT_ERROR(EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
return 0;
Expand Down
2 changes: 1 addition & 1 deletion include/openssl/evp.h
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ OPENSSL_EXPORT int EVP_PKEY_encapsulate(EVP_PKEY_CTX *ctx /* IN */,
OPENSSL_EXPORT int EVP_PKEY_decapsulate(EVP_PKEY_CTX *ctx /* IN */,
uint8_t *shared_secret /* OUT */,
size_t *shared_secret_len /* OUT */,
uint8_t *ciphertext /* IN */,
const uint8_t *ciphertext /* IN */,
size_t ciphertext_len /* IN */);

// EVP_PKEY_paramgen_init initialises an |EVP_PKEY_CTX| for a parameter
Expand Down
Loading