From: Richard Levitte Date: Fri, 20 Nov 2020 09:10:06 +0000 (+0100) Subject: Switch deprecation method for X.509 X-Git-Tag: openssl-3.0.0-alpha10~135 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=76191c7999e0d1f709ea468950457f71cea378c4;p=thirdparty%2Fopenssl.git Switch deprecation method for X.509 Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/13460) --- diff --git a/include/openssl/x509.h.in b/include/openssl/x509.h.in index 14a4a02da77..5a3a4eedd71 100644 --- a/include/openssl/x509.h.in +++ b/include/openssl/x509.h.in @@ -647,15 +647,18 @@ void X509_INFO_free(X509_INFO *a); char *X509_NAME_oneline(const X509_NAME *a, char *buf, int size); /* TODO move this block of decls to asn1.h when 'breaking change' is possible */ -DEPRECATEDIN_3_0(int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1, - ASN1_BIT_STRING *signature, char *data, - EVP_PKEY *pkey)) -DEPRECATEDIN_3_0(int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, - char *data, - unsigned char *md, unsigned int *len)) -DEPRECATEDIN_3_0(int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1, - X509_ALGOR *algor2, ASN1_BIT_STRING *signature, - char *data, EVP_PKEY *pkey, const EVP_MD *type)) +#ifndef OPENSSL_NO_DEPRECATED_3_0 +OSSL_DEPRECATEDIN_3_0 +int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1, + ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey); +OSSL_DEPRECATEDIN_3_0 +int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data, + unsigned char *md, unsigned int *len); +OSSL_DEPRECATEDIN_3_0 +int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1, X509_ALGOR *algor2, + ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey, + const EVP_MD *type); +#endif int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *data, unsigned char *md, unsigned int *len); int ASN1_item_verify(const ASN1_ITEM *it, const X509_ALGOR *alg, @@ -766,8 +769,10 @@ int X509_CRL_up_ref(X509_CRL *crl); long X509_CRL_get_version(const X509_CRL *crl); const ASN1_TIME *X509_CRL_get0_lastUpdate(const X509_CRL *crl); const ASN1_TIME *X509_CRL_get0_nextUpdate(const X509_CRL *crl); -DEPRECATEDIN_1_1_0(ASN1_TIME *X509_CRL_get_lastUpdate(X509_CRL *crl)) -DEPRECATEDIN_1_1_0(ASN1_TIME *X509_CRL_get_nextUpdate(X509_CRL *crl)) +#ifndef OPENSSL_NO_DEPRECATED_1_1_0 +OSSL_DEPRECATEDIN_1_1_0 ASN1_TIME *X509_CRL_get_lastUpdate(X509_CRL *crl); +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); /* TODO change to get0_ */ const STACK_OF(X509_EXTENSION) *X509_CRL_get0_extensions(const X509_CRL *crl); STACK_OF(X509_REVOKED) *X509_CRL_get_REVOKED(X509_CRL *crl);