]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
crypto: remove OSSL_FUTURE_CONST as it is not more needed since 4.0
authorDr. David von Oheimb <dev@ddvo.net>
Mon, 8 Sep 2025 09:29:46 +0000 (11:29 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 11 Sep 2025 15:56:02 +0000 (17:56 +0200)
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28033)

crypto/asn1/t_spki.c
crypto/x509/t_crl.c
crypto/x509/t_req.c
crypto/x509/t_x509.c
crypto/x509/x509_req.c
crypto/x509/x509cset.c
crypto/x509/x_x509a.c
include/openssl/types.h
include/openssl/x509.h.in
include/openssl/x509_vfy.h.in

index 759a83099f26a1bf91e8501cb2b8c2ca99a813e0..580aed0ac0374be555d91f5dbcce0569050f6559 100644 (file)
@@ -17,7 +17,7 @@
 
 /* Print out an SPKI */
 
-int NETSCAPE_SPKI_print(BIO *out, OSSL_FUTURE_CONST NETSCAPE_SPKI *spki)
+int NETSCAPE_SPKI_print(BIO *out, const NETSCAPE_SPKI *spki)
 {
     EVP_PKEY *pkey;
     ASN1_IA5STRING *chal;
index 306b07ea888599f2d43997346514919243c43d7a..d7cc435e00b5800884709487861a2bebb61be79d 100644 (file)
@@ -32,12 +32,12 @@ int X509_CRL_print_fp(FILE *fp, X509_CRL *x)
 }
 #endif
 
-int X509_CRL_print(BIO *out, OSSL_FUTURE_CONST X509_CRL *x)
+int X509_CRL_print(BIO *out, const X509_CRL *x)
 {
   return X509_CRL_print_ex(out, x, XN_FLAG_COMPAT);
 }
 
-int X509_CRL_print_ex(BIO *out, OSSL_FUTURE_CONST X509_CRL *x, unsigned long nmflag)
+int X509_CRL_print_ex(BIO *out, const X509_CRL *x, unsigned long nmflag)
 {
     STACK_OF(X509_REVOKED) *rev;
     X509_REVOKED *r;
index 0ac0f250f95b7d948c367b445cfab1314250c5d1..d427c193488e2f3316e125abe534fe44a513a39d 100644 (file)
@@ -18,7 +18,7 @@
 #include <openssl/dsa.h>
 
 #ifndef OPENSSL_NO_STDIO
-int X509_REQ_print_fp(FILE *fp, OSSL_FUTURE_CONST X509_REQ *x)
+int X509_REQ_print_fp(FILE *fp, const X509_REQ *x)
 {
     BIO *b;
     int ret;
@@ -34,8 +34,7 @@ int X509_REQ_print_fp(FILE *fp, OSSL_FUTURE_CONST X509_REQ *x)
 }
 #endif
 
-int X509_REQ_print_ex(BIO *bp, OSSL_FUTURE_CONST X509_REQ *x, unsigned long nmflags,
-                      unsigned long cflag)
+int X509_REQ_print_ex(BIO *bp, const X509_REQ *x, unsigned long nmflags, unsigned long cflag)
 {
     long l;
     int i;
@@ -210,7 +209,7 @@ int X509_REQ_print_ex(BIO *bp, OSSL_FUTURE_CONST X509_REQ *x, unsigned long nmfl
     return 0;
 }
 
-int X509_REQ_print(BIO *bp, OSSL_FUTURE_CONST X509_REQ *x)
+int X509_REQ_print(BIO *bp, const X509_REQ *x)
 {
     return X509_REQ_print_ex(bp, x, XN_FLAG_COMPAT, X509_FLAG_COMPAT);
 }
index 089902e8a47350b02c1c58fb06ee984ae820fd9f..b7be0b22915b594145e8e8e9253dd64018eee1af 100644 (file)
@@ -33,8 +33,7 @@ int X509_print_fp(FILE *fp, X509 *x)
     return X509_print_ex_fp(fp, x, XN_FLAG_COMPAT, X509_FLAG_COMPAT);
 }
 
-int X509_print_ex_fp(FILE *fp, X509 *x, unsigned long nmflag,
-                     unsigned long cflag)
+int X509_print_ex_fp(FILE *fp, X509 *x, unsigned long nmflag, unsigned long cflag)
 {
     BIO *b;
     int ret;
@@ -50,13 +49,12 @@ int X509_print_ex_fp(FILE *fp, X509 *x, unsigned long nmflag,
 }
 #endif
 
-int X509_print(BIO *bp, OSSL_FUTURE_CONST X509 *x)
+int X509_print(BIO *bp, const X509 *x)
 {
     return X509_print_ex(bp, x, XN_FLAG_COMPAT, X509_FLAG_COMPAT);
 }
 
-int X509_print_ex(BIO *bp, OSSL_FUTURE_CONST X509 *x, unsigned long nmflags,
-                  unsigned long cflag)
+int X509_print_ex(BIO *bp, const X509 *x, unsigned long nmflags, unsigned long cflag)
 {
     long l;
     int ret = 0;
@@ -200,7 +198,7 @@ int X509_print_ex(BIO *bp, OSSL_FUTURE_CONST X509 *x, unsigned long nmflags,
     return ret;
 }
 
-int X509_ocspid_print(BIO *bp, OSSL_FUTURE_CONST X509 *x)
+int X509_ocspid_print(BIO *bp, const X509 *x)
 {
     unsigned char *der = NULL;
     unsigned char *dertmp;
@@ -322,7 +320,7 @@ int X509_signature_print(BIO *bp, const X509_ALGOR *sigalg,
     return 1;
 }
 
-int X509_aux_print(BIO *out, OSSL_FUTURE_CONST X509 *x, int indent)
+int X509_aux_print(BIO *out, const X509 *x, int indent)
 {
     char oidstr[80], first;
     STACK_OF(ASN1_OBJECT) *trust, *reject;
index dd75c3fb8a80c9f3162e7d6b7de58b208c315be8..74ebc675299e778039e5ef9c8349acf2e947c05d 100644 (file)
@@ -74,7 +74,7 @@ EVP_PKEY *X509_REQ_get0_pubkey(const X509_REQ *req)
     return X509_PUBKEY_get0(req->req_info.pubkey);
 }
 
-X509_PUBKEY *X509_REQ_get_X509_PUBKEY(OSSL_FUTURE_CONST X509_REQ *req)
+X509_PUBKEY *X509_REQ_get_X509_PUBKEY(const X509_REQ *req)
 {
     return req->req_info.pubkey;
 }
@@ -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_FUTURE_CONST X509_REQ *req)
+STACK_OF(X509_EXTENSION) *X509_REQ_get_extensions(const X509_REQ *req)
 {
     STACK_OF(X509_EXTENSION) *exts = NULL;
     int *pnid;
index 8d4aff6d8ae8fcc192586ea321318870d9a7feaa..cade403fd1cadc7506142e549e64d1e8554a2cb1 100644 (file)
@@ -120,7 +120,7 @@ const STACK_OF(X509_EXTENSION) *X509_CRL_get0_extensions(const X509_CRL *crl)
     return crl->crl.extensions;
 }
 
-STACK_OF(X509_REVOKED) *X509_CRL_get_REVOKED(OSSL_FUTURE_CONST X509_CRL *crl)
+STACK_OF(X509_REVOKED) *X509_CRL_get_REVOKED(const X509_CRL *crl)
 {
     return crl->crl.revoked;
 }
index 22680a27233f364296b3942803e637f7db7f9af0..ce728544fe5eb9b41a3aed8317c13593220b14e0 100644 (file)
@@ -82,7 +82,7 @@ int X509_keyid_set1(X509 *x, const unsigned char *id, int len)
     return ASN1_STRING_set(aux->keyid, id, len);
 }
 
-unsigned char *X509_alias_get0(OSSL_FUTURE_CONST X509 *x, int *len)
+unsigned char *X509_alias_get0(const X509 *x, int *len)
 {
     if (!x->aux || !x->aux->alias)
         return NULL;
@@ -91,7 +91,7 @@ unsigned char *X509_alias_get0(OSSL_FUTURE_CONST X509 *x, int *len)
     return x->aux->alias->data;
 }
 
-unsigned char *X509_keyid_get0(OSSL_FUTURE_CONST X509 *x, int *len)
+unsigned char *X509_keyid_get0(const X509 *x, int *len)
 {
     if (!x->aux || !x->aux->keyid)
         return NULL;
@@ -159,14 +159,14 @@ void X509_reject_clear(X509 *x)
     }
 }
 
-STACK_OF(ASN1_OBJECT) *X509_get0_trust_objects(OSSL_FUTURE_CONST X509 *x)
+STACK_OF(ASN1_OBJECT) *X509_get0_trust_objects(const X509 *x)
 {
     if (x->aux != NULL)
         return x->aux->trust;
     return NULL;
 }
 
-STACK_OF(ASN1_OBJECT) *X509_get0_reject_objects(OSSL_FUTURE_CONST X509 *x)
+STACK_OF(ASN1_OBJECT) *X509_get0_reject_objects(const X509 *x)
 {
     if (x->aux != NULL)
         return x->aux->reject;
index 344d892a9ea7f98c851d255988970ad2afc2e89b..a83811e7485109ba79fb3ccfd80d097c761dbb94 100644 (file)
@@ -33,12 +33,6 @@ extern "C" {
 # include <openssl/safestack.h>
 # include <openssl/macros.h>
 
-# if OPENSSL_VERSION_MAJOR >= 4
-#  define OSSL_FUTURE_CONST const
-# else
-#  define OSSL_FUTURE_CONST
-# endif
-
 typedef struct ossl_provider_st OSSL_PROVIDER; /* Provider Object */
 
 # ifdef NO_ASN1_TYPEDEFS
index d1d5ca2bb4d5d6c776894f1209e0e4211ab419ba..c5b8525e125bc1ef79267db588971d6e8b5e0461 100644 (file)
@@ -344,7 +344,7 @@ char *NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *x);
 EVP_PKEY *NETSCAPE_SPKI_get_pubkey(NETSCAPE_SPKI *x);
 int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey);
 
-int NETSCAPE_SPKI_print(BIO *out, OSSL_FUTURE_CONST NETSCAPE_SPKI *spki);
+int NETSCAPE_SPKI_print(BIO *out, const NETSCAPE_SPKI *spki);
 
 int X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent);
 int X509_signature_print(BIO *bp, const X509_ALGOR *alg,
@@ -600,8 +600,8 @@ ASN1_OCTET_STRING *X509_REQ_get0_distinguishing_id(X509_REQ *x);
 
 int X509_alias_set1(X509 *x, const unsigned char *name, int len);
 int X509_keyid_set1(X509 *x, const unsigned char *id, int len);
-unsigned char *X509_alias_get0(OSSL_FUTURE_CONST X509 *x, int *len);
-unsigned char *X509_keyid_get0(OSSL_FUTURE_CONST X509 *x, int *len);
+unsigned char *X509_alias_get0(const X509 *x, int *len);
+unsigned char *X509_keyid_get0(const X509 *x, int *len);
 
 DECLARE_ASN1_FUNCTIONS(X509_REVOKED)
 DECLARE_ASN1_FUNCTIONS(X509_CRL_INFO)
@@ -710,11 +710,11 @@ int i2d_re_X509_REQ_tbs(X509_REQ *req, unsigned char **pp);
 int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey);
 EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req); /* deprecated */
 EVP_PKEY *X509_REQ_get0_pubkey(const X509_REQ *req);
-X509_PUBKEY *X509_REQ_get_X509_PUBKEY(OSSL_FUTURE_CONST X509_REQ *req);
+X509_PUBKEY *X509_REQ_get_X509_PUBKEY(const 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_FUTURE_CONST X509_REQ *req);
+STACK_OF(X509_EXTENSION) *X509_REQ_get_extensions(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);
@@ -759,7 +759,7 @@ OSSL_DEPRECATEDIN_1_1_0 ASN1_TIME *X509_CRL_get_nextUpdate(X509_CRL *crl);
 #endif
 X509_NAME *X509_CRL_get_issuer(const X509_CRL *crl);
 const STACK_OF(X509_EXTENSION) *X509_CRL_get0_extensions(const X509_CRL *crl);
-STACK_OF(X509_REVOKED) *X509_CRL_get_REVOKED(OSSL_FUTURE_CONST X509_CRL *crl);
+STACK_OF(X509_REVOKED) *X509_CRL_get_REVOKED(const X509_CRL *crl);
 const X509_ALGOR *X509_CRL_get0_tbs_sigalg(const X509_CRL *crl);
 void X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig,
                              const X509_ALGOR **palg);
@@ -821,29 +821,24 @@ unsigned long X509_NAME_hash_old(const X509_NAME *x);
 
 int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b);
 int X509_CRL_match(const X509_CRL *a, const X509_CRL *b);
-int X509_aux_print(BIO *out, OSSL_FUTURE_CONST X509 *x, int indent);
+int X509_aux_print(BIO *out, const X509 *x, int indent);
 # ifndef OPENSSL_NO_STDIO
-int X509_print_ex_fp(FILE *bp, X509 *x, unsigned long nmflag,
-                     unsigned long cflag);
+int X509_print_ex_fp(FILE *bp, X509 *x, unsigned long nmflag, unsigned long cflag);
 int X509_print_fp(FILE *bp, X509 *x);
 int X509_CRL_print_fp(FILE *bp, X509_CRL *x);
-int X509_REQ_print_fp(FILE *bp, OSSL_FUTURE_CONST X509_REQ *req);
-int X509_NAME_print_ex_fp(FILE *fp, const X509_NAME *nm, int indent,
-                          unsigned long flags);
+int X509_REQ_print_fp(FILE *bp, const X509_REQ *req);
+int X509_NAME_print_ex_fp(FILE *fp, const X509_NAME *nm, int indent, unsigned long flags);
 # endif
 
 int X509_NAME_print(BIO *bp, const X509_NAME *name, int obase);
-int X509_NAME_print_ex(BIO *out, const X509_NAME *nm, int indent,
-                       unsigned long flags);
-int X509_print_ex(BIO *bp, OSSL_FUTURE_CONST X509 *x, unsigned long nmflag,
-                  unsigned long cflag);
-int X509_print(BIO *bp, OSSL_FUTURE_CONST X509 *x);
-int X509_ocspid_print(BIO *bp, OSSL_FUTURE_CONST X509 *x);
-int X509_CRL_print_ex(BIO *out, OSSL_FUTURE_CONST X509_CRL *x, unsigned long nmflag);
-int X509_CRL_print(BIO *bp, OSSL_FUTURE_CONST X509_CRL *x);
-int X509_REQ_print_ex(BIO *bp, OSSL_FUTURE_CONST X509_REQ *x, unsigned long nmflag,
-                      unsigned long cflag);
-int X509_REQ_print(BIO *bp, OSSL_FUTURE_CONST X509_REQ *req);
+int X509_NAME_print_ex(BIO *out, const X509_NAME *nm, int indent, unsigned long flags);
+int X509_print_ex(BIO *bp, const X509 *x, unsigned long nmflag, unsigned long cflag);
+int X509_print(BIO *bp, const X509 *x);
+int X509_ocspid_print(BIO *bp, const X509 *x);
+int X509_CRL_print_ex(BIO *out, const X509_CRL *x, unsigned long nmflag);
+int X509_CRL_print(BIO *bp, const X509_CRL *x);
+int X509_REQ_print_ex(BIO *bp, const X509_REQ *x, unsigned long nmflag, unsigned long cflag);
+int X509_REQ_print(BIO *bp, const X509_REQ *req);
 
 int X509_NAME_entry_count(const X509_NAME *name);
 int X509_NAME_get_text_by_NID(const X509_NAME *name, int nid,
index 440bc7168b3ac48057acce591cf139c9c6c02604..f23f94afd9be4cfc1c38fe74582031d8941b6416 100644 (file)
@@ -132,8 +132,8 @@ int X509_add1_trust_object(X509 *x, const ASN1_OBJECT *obj);
 int X509_add1_reject_object(X509 *x, const ASN1_OBJECT *obj);
 void X509_trust_clear(X509 *x);
 void X509_reject_clear(X509 *x);
-STACK_OF(ASN1_OBJECT) *X509_get0_trust_objects(OSSL_FUTURE_CONST X509 *x);
-STACK_OF(ASN1_OBJECT) *X509_get0_reject_objects(OSSL_FUTURE_CONST X509 *x);
+STACK_OF(ASN1_OBJECT) *X509_get0_trust_objects(const X509 *x);
+STACK_OF(ASN1_OBJECT) *X509_get0_reject_objects(const X509 *x);
 
 int (*X509_TRUST_set_default(int (*trust) (int, X509 *, int))) (int, X509 *,
                                                                 int);