Skip to content

Commit

Permalink
fixup! fixup! refactor and constify X509_REQ_get_extensions()
Browse files Browse the repository at this point in the history
  • Loading branch information
DDvO committed Jul 5, 2024
1 parent 2eb4942 commit 21cb263
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crypto/x509/x509_req.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions include/openssl/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ extern "C" {
# include <openssl/macros.h>

# 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 */
Expand Down
2 changes: 1 addition & 1 deletion include/openssl/x509.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 21cb263

Please sign in to comment.