Skip to content

Commit

Permalink
fix integrations that define no-deprecated-declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel40791765 committed Mar 8, 2024
1 parent 77d133b commit 020fb7a
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 16 deletions.
5 changes: 4 additions & 1 deletion include/openssl/bio.h
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,10 @@ OPENSSL_EXPORT int (*BIO_meth_get_puts(const BIO_METHOD *method)) (BIO *, const
// General No-op Functions [Deprecated].

// BIO_set_write_buffer_size returns zero.
OPENSSL_EXPORT OPENSSL_DEPRECATED int BIO_set_write_buffer_size(
//
// TODO: Add |OPENSSL_DEPRECATED|. nginx defines -Wno-deprecated-declarations
// and depends on this.
OPENSSL_EXPORT int BIO_set_write_buffer_size(
BIO *bio, int buffer_size);


Expand Down
2 changes: 1 addition & 1 deletion include/openssl/cipher.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ OPENSSL_EXPORT int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,
#define EVP_CIPH_XTS_MODE 0x7
#define EVP_CIPH_CCM_MODE 0x8

// Buffer length in bits not bytes: CFB1 mode only.
// EVP_CIPH_FLAG_LENGTH_BITS buffers length in bits not bytes: CFB1 mode only.
#define EVP_CIPH_FLAG_LENGTH_BITS 0x2000
// The following values are never returned from |EVP_CIPHER_mode| and are
// included only to make it easier to compile code with BoringSSL.
Expand Down
5 changes: 4 additions & 1 deletion include/openssl/conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ OPENSSL_EXPORT OPENSSL_DEPRECATED void CONF_modules_unload(int all);
OPENSSL_EXPORT OPENSSL_DEPRECATED void CONF_modules_finish(void);

// OPENSSL_config does nothing. This has been deprecated since OpenSSL 1.1.0.
OPENSSL_EXPORT OPENSSL_DEPRECATED void OPENSSL_config(const char *config_name);
//
// TODO: Add |OPENSSL_DEPRECATED|. nginx defines -Wno-deprecated-declarations
// and depends on this.
OPENSSL_EXPORT void OPENSSL_config(const char *config_name);

// OPENSSL_no_config does nothing. This has been deprecated since OpenSSL
// 1.1.0.
Expand Down
15 changes: 12 additions & 3 deletions include/openssl/evp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,10 @@ OPENSSL_EXPORT OPENSSL_DEPRECATED void *EVP_PKEY_get0(const EVP_PKEY *pkey);

// OpenSSL_add_all_algorithms does nothing. This has been deprecated since
// OpenSSL 1.1.0.
OPENSSL_EXPORT OPENSSL_DEPRECATED void OpenSSL_add_all_algorithms(void);
//
// TODO: Add |OPENSSL_DEPRECATED|. nginx defines -Wno-deprecated-declarations
// and depends on this.
OPENSSL_EXPORT void OpenSSL_add_all_algorithms(void);

// OPENSSL_add_all_algorithms_conf does nothing. This has been deprecated since
// OpenSSL 1.1.0.
Expand All @@ -1165,7 +1168,10 @@ OPENSSL_EXPORT OPENSSL_DEPRECATED void OpenSSL_add_all_ciphers(void);

// OpenSSL_add_all_digests does nothing. This has been deprecated since OpenSSL
// 1.1.0.
OPENSSL_EXPORT OPENSSL_DEPRECATED void OpenSSL_add_all_digests(void);
//
// TODO: Add |OPENSSL_DEPRECATED|. tpm2-tss defines -Wno-deprecated-declarations
// and depends on this.
OPENSSL_EXPORT void OpenSSL_add_all_digests(void);

// EVP_cleanup does nothing. This has been deprecated since OpenSSL 1.1.0.
OPENSSL_EXPORT OPENSSL_DEPRECATED void EVP_cleanup(void);
Expand Down Expand Up @@ -1198,7 +1204,10 @@ OPENSSL_EXPORT OPENSSL_DEPRECATED int EVP_PKEY_CTX_set_dsa_paramgen_q_bits(
#define EVP_PKEY_DH NID_dhKeyAgreement

// EVP_PKEY_get0_DH returns NULL.
OPENSSL_EXPORT OPENSSL_DEPRECATED DH *EVP_PKEY_get0_DH(const EVP_PKEY *pkey);
//
// TODO: Add |OPENSSL_DEPRECATED|. curl defines -Wno-deprecated-declarations and
// depends on this.
OPENSSL_EXPORT DH *EVP_PKEY_get0_DH(const EVP_PKEY *pkey);

// EVP_PKEY_get1_DH returns NULL.
OPENSSL_EXPORT OPENSSL_DEPRECATED DH *EVP_PKEY_get1_DH(const EVP_PKEY *pkey);
Expand Down
11 changes: 7 additions & 4 deletions include/openssl/rand.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ OPENSSL_EXPORT void RAND_seed(const void *buf, int num);
// entropy and mix them into the entropy pool. AWS-LC sources entropy for the
// consuming application and the following functions have been deprecated as
// no-ops. Consumers should call |RAND_bytes| directly.
//
// TODO: Add |OPENSSL_DEPRECATED| to the ones that are missing. curl and
// tpm2-tss defines -Wno-deprecated-declarations and depends on them.

// RAND_load_file returns a nonnegative number.
OPENSSL_EXPORT OPENSSL_DEPRECATED int RAND_load_file(const char *path,
Expand All @@ -105,7 +108,7 @@ OPENSSL_EXPORT OPENSSL_DEPRECATED int RAND_egd(const char *);
OPENSSL_EXPORT OPENSSL_DEPRECATED int RAND_poll(void);

// RAND_status returns one.
OPENSSL_EXPORT OPENSSL_DEPRECATED int RAND_status(void);
OPENSSL_EXPORT int RAND_status(void);

// RAND_cleanup does nothing.
OPENSSL_EXPORT OPENSSL_DEPRECATED void RAND_cleanup(void);
Expand All @@ -126,13 +129,13 @@ struct rand_meth_st {
OPENSSL_EXPORT OPENSSL_DEPRECATED RAND_METHOD *RAND_SSLeay(void);

// RAND_OpenSSL returns a pointer to a dummy |RAND_METHOD|.
OPENSSL_EXPORT OPENSSL_DEPRECATED RAND_METHOD *RAND_OpenSSL(void);
OPENSSL_EXPORT RAND_METHOD *RAND_OpenSSL(void);

// RAND_get_rand_method returns |RAND_SSLeay()|.
OPENSSL_EXPORT OPENSSL_DEPRECATED const RAND_METHOD *RAND_get_rand_method(void);
OPENSSL_EXPORT const RAND_METHOD *RAND_get_rand_method(void);

// RAND_set_rand_method returns one.
OPENSSL_EXPORT OPENSSL_DEPRECATED int RAND_set_rand_method(const RAND_METHOD *);
OPENSSL_EXPORT int RAND_set_rand_method(const RAND_METHOD *);

// RAND_keep_random_devices_open does nothing.
OPENSSL_EXPORT OPENSSL_DEPRECATED void RAND_keep_random_devices_open(int a);
Expand Down
18 changes: 12 additions & 6 deletions include/openssl/ssl.h
Original file line number Diff line number Diff line change
Expand Up @@ -5658,8 +5658,10 @@ OPENSSL_EXPORT OPENSSL_DEPRECATED int SSL_get_server_tmp_key(
SSL *ssl, EVP_PKEY **out_key);

// SSL_CTX_set_tmp_dh returns 1.
OPENSSL_EXPORT OPENSSL_DEPRECATED int SSL_CTX_set_tmp_dh(SSL_CTX *ctx,
const DH *dh);
//
// TODO: Add |OPENSSL_DEPRECATED|. nginx defines -Wno-deprecated-declarations
// and depends on this.
OPENSSL_EXPORT int SSL_CTX_set_tmp_dh(SSL_CTX *ctx, const DH *dh);

// SSL_set_tmp_dh returns 1.
OPENSSL_EXPORT OPENSSL_DEPRECATED int SSL_set_tmp_dh(SSL *ssl, const DH *dh);
Expand Down Expand Up @@ -5725,9 +5727,10 @@ OPENSSL_EXPORT OPENSSL_DEPRECATED void SSL_set_state(SSL *ssl, int state);

// SSL_get_shared_ciphers writes an empty string to |buf| and returns a
// pointer to |buf|, or NULL if |len| is less than or equal to zero.
OPENSSL_EXPORT OPENSSL_DEPRECATED char *SSL_get_shared_ciphers(const SSL *ssl,
char *buf,
int len);
//
// TODO: Add |OPENSSL_DEPRECATED|. nginx defines -Wno-deprecated-declarations
// and depends on this.
OPENSSL_EXPORT char *SSL_get_shared_ciphers(const SSL *ssl, char *buf, int len);

// SSL_get_shared_sigalgs returns zero.
OPENSSL_EXPORT OPENSSL_DEPRECATED int SSL_get_shared_sigalgs(
Expand All @@ -5744,7 +5747,10 @@ OPENSSL_EXPORT OPENSSL_DEPRECATED int SSL_get_shared_sigalgs(
OPENSSL_EXPORT OPENSSL_DEPRECATED void ERR_load_SSL_strings(void);

// SSL_load_error_strings does nothing in AWS-LC and OpenSSL.
OPENSSL_EXPORT OPENSSL_DEPRECATED void SSL_load_error_strings(void);
//
// TODO: Add |OPENSSL_DEPRECATED|. nginx defines -Wno-deprecated-declarations
// and depends on this.
OPENSSL_EXPORT void SSL_load_error_strings(void);


// SSL TMP_RSA No-ops [Deprecated].
Expand Down

0 comments on commit 020fb7a

Please sign in to comment.