From 21cb26382916b2467c32b4dbecc2d1b97f501c70 Mon Sep 17 00:00:00 2001 From: "Dr. David von Oheimb" Date: Fri, 5 Jul 2024 06:46:30 +0200 Subject: [PATCH] fixup! fixup! refactor and constify X509_REQ_get_extensions() --- crypto/x509/x509_req.c | 2 +- include/openssl/types.h | 4 ++-- include/openssl/x509.h.in | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crypto/x509/x509_req.c b/crypto/x509/x509_req.c index 825aa117f0b4d..4085b587a5e18 100644 --- a/crypto/x509/x509_req.c +++ b/crypto/x509/x509_req.c @@ -139,7 +139,7 @@ static STACK_OF(X509_EXTENSION) *get_extensions_by_nid(const X509_REQ *req, ASN1_ITEM_rptr(X509_EXTENSIONS)); } -STACK_OF(X509_EXTENSION) *X509_REQ_get_extensions(OSSL_CONST_FUTURE X509_REQ *req) +STACK_OF(X509_EXTENSION) *X509_REQ_get_extensions(OSSL_FUTURE_CONST X509_REQ *req) { STACK_OF(X509_EXTENSION) *exts = NULL; int *pnid; diff --git a/include/openssl/types.h b/include/openssl/types.h index 54a186ea1516d..91c70813655d7 100644 --- a/include/openssl/types.h +++ b/include/openssl/types.h @@ -34,9 +34,9 @@ extern "C" { # include # if OPENSSL_VERSION_MAJOR >= 4 -# define OSSL_CONST_FUTURE const +# define OSSL_FUTURE_CONST const # else -# define OSSL_CONST_FUTURE +# define OSSL_FUTURE_CONST # endif typedef struct ossl_provider_st OSSL_PROVIDER; /* Provider Object */ diff --git a/include/openssl/x509.h.in b/include/openssl/x509.h.in index c5aa97e404298..99bc4aab29133 100644 --- a/include/openssl/x509.h.in +++ b/include/openssl/x509.h.in @@ -710,7 +710,7 @@ X509_PUBKEY *X509_REQ_get_X509_PUBKEY(X509_REQ *req); int X509_REQ_extension_nid(int nid); int *X509_REQ_get_extension_nids(void); void X509_REQ_set_extension_nids(int *nids); -STACK_OF(X509_EXTENSION) *X509_REQ_get_extensions(OSSL_CONST_FUTURE X509_REQ *req); +STACK_OF(X509_EXTENSION) *X509_REQ_get_extensions(OSSL_FUTURE_CONST X509_REQ *req); int X509_REQ_add_extensions_nid(X509_REQ *req, const STACK_OF(X509_EXTENSION) *exts, int nid); int X509_REQ_add_extensions(X509_REQ *req, const STACK_OF(X509_EXTENSION) *ext);