Skip to content

Commit

Permalink
tls: typedef'ed several structs, enums and unions
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Oct 20, 2020
1 parent 44a21a8 commit 449f9fa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/modules/tls/tls_server.h
Expand Up @@ -34,25 +34,25 @@
#include "tls_domain.h"
#include "tls_ct_wrq.h"

enum tls_conn_states {
typedef enum tls_conn_states {
S_TLS_NONE = 0,
S_TLS_ACCEPTING,
S_TLS_CONNECTING,
S_TLS_ESTABLISHED
};
} tls_conn_states_t;

struct tls_rd_buf {
typedef struct tls_rd_buf {
unsigned int pos; /* current position */
unsigned int size; /* total size (buf) */
unsigned char buf[1];
};
} tls_rd_buf_t;

/* tls conn flags */
#define F_TLS_CON_WR_WANTS_RD 1 /* write wants read */
#define F_TLS_CON_HANDSHAKED 2 /* connection is handshaked */
#define F_TLS_CON_RENEGOTIATION 4 /* renegotiation by clinet */

struct tls_extra_data {
typedef struct tls_extra_data {
tls_domains_cfg_t* cfg; /* Configuration used for this connection */
SSL* ssl; /* SSL context used for the connection */
BIO* rwbio; /* bio used for read/write
Expand All @@ -62,7 +62,7 @@ struct tls_extra_data {
struct tls_rd_buf* enc_rd_buf;
unsigned int flags;
enum tls_conn_states state;
};
} tls_extra_data_t;


/* return true if write wants read */
Expand Down

0 comments on commit 449f9fa

Please sign in to comment.