diff --git a/crypto/param_build.c b/crypto/param_build.c index db2182196c..01866b01d9 100644 --- a/crypto/param_build.c +++ b/crypto/param_build.c @@ -260,7 +260,7 @@ static OSSL_PARAM *param_bld_convert(OSSL_PARAM_BLD *bld, OSSL_PARAM *param, } else if (pd->type == OSSL_PARAM_OCTET_PTR || pd->type == OSSL_PARAM_UTF8_PTR) { /* PTR */ - *(void **)p = pd->string; + *(const void **)p = pd->string; } else if (pd->type == OSSL_PARAM_OCTET_STRING || pd->type == OSSL_PARAM_UTF8_STRING) { if (pd->string != NULL) diff --git a/include/internal/param_build.h b/include/internal/param_build.h index 83f8087020..bb96ba98e0 100644 --- a/include/internal/param_build.h +++ b/include/internal/param_build.h @@ -20,7 +20,7 @@ typedef struct { size_t size; size_t alloc_blocks; const BIGNUM *bn; - void *string; + const void *string; union { /* * These fields are never directly addressed, but their sizes are