Skip to content

Commit

Permalink
tls: Avoid using OpenSSL internal type names.
Browse files Browse the repository at this point in the history
OpenSSL documentation only mentions SSL_CTX as the TLS context type,
so use that consistently in libre function definitions.
  • Loading branch information
Lastique authored and sreimers committed Jul 8, 2022
1 parent e541437 commit 4dfae41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion include/re_tls.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ struct tls;
struct tls_conn;
struct tcp_conn;
struct udp_sock;

#ifndef USE_OPENSSL
struct ssl_ctx_st;

typedef struct ssl_ctx_st SSL_CTX;
#endif


/** Defines the TLS method */
Expand Down Expand Up @@ -126,7 +129,7 @@ void dtls_recv_packet(struct dtls_sock *sock, const struct sa *src,


#ifdef USE_OPENSSL
struct ssl_ctx_st *tls_openssl_context(const struct tls *tls);
SSL_CTX *tls_openssl_context(const struct tls *tls);
int tls_set_certificate_openssl(struct tls *tls, X509* cert, EVP_PKEY* pkey,
bool up_ref);
#endif
4 changes: 2 additions & 2 deletions src/tls/openssl/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,7 @@ void tls_flush_error(void)
*
* @return OpenSSL context
*/
struct ssl_ctx_st *tls_openssl_context(const struct tls *tls)
SSL_CTX *tls_openssl_context(const struct tls *tls)
{
return tls ? tls->ctx : NULL;
}
Expand Down Expand Up @@ -1641,7 +1641,7 @@ static bool remove_handler(struct le *le, void *arg)
}


static void session_remove_cb(struct ssl_ctx_st *ctx, SSL_SESSION *sess)
static void session_remove_cb(SSL_CTX *ctx, SSL_SESSION *sess)
{
struct tls *tls = SSL_SESSION_get_ex_data(sess, 0);
(void) ctx;
Expand Down

0 comments on commit 4dfae41

Please sign in to comment.