Skip to content

Commit

Permalink
Cleanup of unused functions and macros in ssl_local.h
Browse files Browse the repository at this point in the history
  • Loading branch information
fwh-dc committed Jun 14, 2024
1 parent 1977c00 commit 51df4b5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
14 changes: 0 additions & 14 deletions ssl/ssl_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -3189,15 +3189,6 @@ long SSL_CTX_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp) (void))
}
}

int ssl_cipher_id_cmp(const SSL_CIPHER *a, const SSL_CIPHER *b)
{
if (a->id > b->id)
return 1;
if (a->id < b->id)
return -1;
return 0;
}

int ssl_cipher_ptr_id_cmp(const SSL_CIPHER *const *ap,
const SSL_CIPHER *const *bp)
{
Expand Down Expand Up @@ -4795,11 +4786,6 @@ int ssl_undefined_void_function(void)
return 0;
}

int ssl_undefined_const_function(const SSL *s)
{
return 0;
}

const char *ssl_protocol_to_string(int version)
{
switch (version)
Expand Down
25 changes: 0 additions & 25 deletions ssl/ssl_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,8 @@
# define SSL_kRSA 0x00000001U
/* tmp DH key no DH cert */
# define SSL_kDHE 0x00000002U
/* synonym */
# define SSL_kEDH SSL_kDHE
/* ephemeral ECDH */
# define SSL_kECDHE 0x00000004U
/* synonym */
# define SSL_kEECDH SSL_kECDHE
/* PSK */
# define SSL_kPSK 0x00000008U
/* GOST key exchange */
Expand Down Expand Up @@ -369,12 +365,6 @@
* SSL_aDSS <- DSA_SIGN
*/

/*-
#define CERT_INVALID 0
#define CERT_PUBLIC_KEY 1
#define CERT_PRIVATE_KEY 2
*/

/* Certificate Type State */
# define OSSL_CERT_TYPE_CTOS_NONE 0
# define OSSL_CERT_TYPE_CTOS_GOOD 1
Expand Down Expand Up @@ -1869,12 +1859,6 @@ typedef struct sigalg_lookup_st {
/* Max MTU overhead we know about so far is 40 for IPv6 + 8 for UDP */
# define DTLS1_MAX_MTU_OVERHEAD 48

/*
* Flag used in message reuse to indicate the buffer contains the record
* header as well as the handshake message header.
*/
# define DTLS1_SKIP_RECORD_HEADER 2

struct dtls1_retransmit_state {
const OSSL_RECORD_METHOD *wrlmethod;
OSSL_RECORD_LAYER *wrl;
Expand Down Expand Up @@ -2109,8 +2093,6 @@ typedef struct cert_st {
CRYPTO_REF_COUNT references; /* >1 only if SSL_copy_session_id is used */
} CERT;

# define FP_ICC (int (*)(const void *,const void *))

/*
* This is for the SSLv3/TLSv1.0 differences in crypto/hash stuff It is a bit
* of a mess of functions, but hell, think of it as an opaque structure :-)
Expand Down Expand Up @@ -2221,9 +2203,6 @@ typedef enum downgrade_en {
#define SSL_USE_PSS(s) (s->s3.tmp.peer_sigalg != NULL && \
s->s3.tmp.peer_sigalg->sig == EVP_PKEY_RSA_PSS)

/* A dummy signature value not valid for TLSv1.2 signature algs */
#define TLSEXT_signature_rsa_pss 0x0101

/* TLSv1.3 downgrade protection sentinel values */
extern const unsigned char tls11downgrade[8];
extern const unsigned char tls12downgrade[8];
Expand Down Expand Up @@ -2472,7 +2451,6 @@ __owur SSL_SESSION *lookup_sess_in_cache(SSL_CONNECTION *s,
size_t sess_id_len);
__owur int ssl_get_prev_session(SSL_CONNECTION *s, CLIENTHELLO_MSG *hello);
__owur SSL_SESSION *ssl_session_dup(const SSL_SESSION *src, int ticket);
__owur int ssl_cipher_id_cmp(const SSL_CIPHER *a, const SSL_CIPHER *b);
DECLARE_OBJ_BSEARCH_GLOBAL_CMP_FN(SSL_CIPHER, SSL_CIPHER, ssl_cipher_id);
__owur int ssl_cipher_ptr_id_cmp(const SSL_CIPHER *const *ap,
const SSL_CIPHER *const *bp);
Expand Down Expand Up @@ -2536,7 +2514,6 @@ __owur const SSL_CERT_LOOKUP *ssl_cert_lookup_by_idx(size_t idx, SSL_CTX *ctx);

int ssl_undefined_function(SSL *s);
__owur int ssl_undefined_void_function(void);
__owur int ssl_undefined_const_function(const SSL *s);
__owur int ssl_get_server_cert_serverinfo(SSL_CONNECTION *s,
const unsigned char **serverinfo,
size_t *serverinfo_length);
Expand Down Expand Up @@ -2910,8 +2887,6 @@ __owur int custom_exts_copy_flags(custom_ext_methods *dst,
const custom_ext_methods *src);
void custom_exts_free(custom_ext_methods *exts);

void ssl_comp_free_compression_methods_int(void);

/* ssl_mcnf.c */
int ssl_ctx_system_config(SSL_CTX *ctx);

Expand Down

0 comments on commit 51df4b5

Please sign in to comment.