Skip to content

Commit a896ad5

Browse files
committed
Drop unused BIO member from SSL managers
1 parent da7f295 commit a896ad5

File tree

4 files changed

+1
-8
lines changed

4 files changed

+1
-8
lines changed

src/netlog/netlog-dtls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ int dtls_connect(DTLSManager *m, SocketAddress *address) {
113113

114114
BIO_ctrl(bio, BIO_CTRL_DGRAM_SET_CONNECTED, 0, &address);
115115
SSL_set_bio(ssl, bio, bio);
116-
m->bio = TAKE_PTR(bio);
116+
bio = NULL;
117117

118118
/* Certification verification */
119119
if (m->auth_mode != OPEN_SSL_CERTIFICATE_AUTH_MODE_NONE && m->auth_mode != OPEN_SSL_CERTIFICATE_AUTH_MODE_INVALID) {

src/netlog/netlog-dtls.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#pragma once
33

44
#include <openssl/ssl.h>
5-
#include <openssl/bio.h>
65
#include <stdbool.h>
76

87
#include "socket-util.h"
@@ -13,7 +12,6 @@ typedef struct DTLSManager DTLSManager;
1312

1413
struct DTLSManager {
1514
SSL_CTX *ctx;
16-
BIO *bio;
1715
SSL *ssl;
1816

1917
int fd;

src/netlog/netlog-tls.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
#include <arpa/inet.h>
66
#include <netinet/in.h>
7-
#include <openssl/bio.h>
87
#include <openssl/err.h>
98
#include <sys/epoll.h>
109
#include <sys/socket.h>
@@ -65,7 +64,6 @@ int tls_stream_writev(TLSManager *m, const struct iovec *iov, size_t iovcnt) {
6564
}
6665

6766
int tls_connect(TLSManager *m, SocketAddress *address) {
68-
_cleanup_(BIO_freep) BIO *bio = NULL;
6967
_cleanup_(SSL_freep) SSL *ssl = NULL;
7068
_cleanup_free_ char *pretty = NULL;
7169
const SSL_CIPHER *cipher;
@@ -158,7 +156,6 @@ int tls_connect(TLSManager *m, SocketAddress *address) {
158156

159157
}
160158

161-
m->bio = TAKE_PTR(bio);
162159
m->ssl = TAKE_PTR(ssl);
163160
m->ctx = ctx;
164161
m->fd = fd;

src/netlog/netlog-tls.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#pragma once
33

44
#include <openssl/ssl.h>
5-
#include <openssl/bio.h>
65
#include <stdbool.h>
76

87
#include "socket-util.h"
@@ -21,7 +20,6 @@ typedef struct TLSManager TLSManager;
2120

2221
struct TLSManager {
2322
SSL_CTX *ctx;
24-
BIO *bio;
2523
SSL *ssl;
2624

2725
int fd;

0 commit comments

Comments
 (0)