summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_lib.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2022-10-31 16:04:08 +0000
committerHugo Landau <hlandau@openssl.org>2022-11-14 07:51:17 +0000
commitf471f60a8adcbb72314be974f6bc320943786b96 (patch)
tree1e40179e21a4fd67a52b5081c9cab9bc457614a2 /ssl/ssl_lib.c
parent1e065a15119520e13a2d68d003c4c06869208a32 (diff)
Remove remaining refs to enc_(write|read)_ctx/(read|write)_hash
Those fields are no longer used. Their previous function is now in the new record layer. Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19586)
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r--ssl/ssl_lib.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index e71f0b5da5..2c8a8fd3ec 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -546,8 +546,6 @@ static void clear_ciphers(SSL_CONNECTION *s)
{
/* clear the current cipher */
ssl_clear_cipher_ctx(s);
- ssl_clear_hash_ctx(&s->read_hash);
- ssl_clear_hash_ctx(&s->write_hash);
}
int SSL_clear(SSL *s)
@@ -4716,14 +4714,6 @@ SSL *SSL_dup(SSL *s)
void ssl_clear_cipher_ctx(SSL_CONNECTION *s)
{
- if (s->enc_read_ctx != NULL) {
- EVP_CIPHER_CTX_free(s->enc_read_ctx);
- s->enc_read_ctx = NULL;
- }
- if (s->enc_write_ctx != NULL) {
- EVP_CIPHER_CTX_free(s->enc_write_ctx);
- s->enc_write_ctx = NULL;
- }
#ifndef OPENSSL_NO_COMP
COMP_CTX_free(s->expand);
s->expand = NULL;
@@ -5505,32 +5495,6 @@ size_t SSL_CTX_get_num_tickets(const SSL_CTX *ctx)
return ctx->num_tickets;
}
-/*
- * Allocates new EVP_MD_CTX and sets pointer to it into given pointer
- * variable, freeing EVP_MD_CTX previously stored in that variable, if any.
- * If EVP_MD pointer is passed, initializes ctx with this |md|.
- * Returns the newly allocated ctx;
- */
-
-EVP_MD_CTX *ssl_replace_hash(EVP_MD_CTX **hash, const EVP_MD *md)
-{
- ssl_clear_hash_ctx(hash);
- *hash = EVP_MD_CTX_new();
- if (*hash == NULL || (md && EVP_DigestInit_ex(*hash, md, NULL) <= 0)) {
- EVP_MD_CTX_free(*hash);
- *hash = NULL;
- return NULL;
- }
- return *hash;
-}
-
-void ssl_clear_hash_ctx(EVP_MD_CTX **hash)
-{
-
- EVP_MD_CTX_free(*hash);
- *hash = NULL;
-}
-
/* Retrieve handshake hashes */
int ssl_handshake_hash(SSL_CONNECTION *s,
unsigned char *out, size_t outlen,