]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - include/openssl/dh.h
Deprecate DH_new as well as i2d_DHparams and d2i_DHparams
[thirdparty/openssl.git] / include / openssl / dh.h
index 69a5b79c18de73830dcba2220b94373a0cd9d16b..86f0e73464a65eb6abbb1e4da0be20d314ca6ab3 100644 (file)
@@ -147,7 +147,7 @@ DEPRECATEDIN_3_0(const DH_METHOD *DH_get_default_method(void))
 DEPRECATEDIN_3_0(int DH_set_method(DH *dh, const DH_METHOD *meth))
 DEPRECATEDIN_3_0(DH *DH_new_method(ENGINE *engine))
 
-DH *DH_new(void);
+DEPRECATEDIN_3_0(DH *DH_new(void))
 void DH_free(DH *dh);
 int DH_up_ref(DH *dh);
 int DH_bits(const DH *dh);
@@ -185,8 +185,12 @@ DEPRECATEDIN_3_0(int DH_compute_key(unsigned char *key, const BIGNUM *pub_key,
                                     DH *dh))
 DEPRECATEDIN_3_0(int DH_compute_key_padded(unsigned char *key,
                                            const BIGNUM *pub_key, DH *dh))
-DECLARE_ASN1_ENCODE_FUNCTIONS_only(DH, DHparams)
-DECLARE_ASN1_ENCODE_FUNCTIONS_only(DH, DHxparams)
+
+#  ifndef OPENSSL_NO_DEPRECATED_3_0
+DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0, DH, DHparams)
+DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0, DH, DHxparams)
+#  endif
+
 #  ifndef OPENSSL_NO_STDIO
 DEPRECATEDIN_3_0(int DHparams_print_fp(FILE *fp, const DH *x))
 #  endif