aboutsummaryrefslogtreecommitdiff
path: root/src/common/tortls.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-01-16 22:32:12 -0500
committerNick Mathewson <nickm@torproject.org>2013-01-16 22:32:12 -0500
commitb998431a33db2be0246f176ea0077b98d5258866 (patch)
treed03935b5fbc9e8f6327af93b2897fc1f34d931fe /src/common/tortls.c
parent8b62a738b3add64dcd26a82dff44a7e9e11ff5a9 (diff)
parentb7cf7bd9ae31aeddd03ad2094dd480d2b1d34d4f (diff)
downloadtor-b998431a33db2be0246f176ea0077b98d5258866.tar
tor-b998431a33db2be0246f176ea0077b98d5258866.tar.gz
Merge branch '024_msvc_squashed'
Conflicts: src/or/or.h srcwin32/orconfig.h
Diffstat (limited to 'src/common/tortls.c')
-rw-r--r--src/common/tortls.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c
index 1d093dfcb..251915d98 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -147,6 +147,12 @@ typedef struct tor_tls_context_t {
#define TOR_TLS_MAGIC 0x71571571
+typedef enum {
+ TOR_TLS_ST_HANDSHAKE, TOR_TLS_ST_OPEN, TOR_TLS_ST_GOTCLOSE,
+ TOR_TLS_ST_SENTCLOSE, TOR_TLS_ST_CLOSED, TOR_TLS_ST_RENEGOTIATE,
+ TOR_TLS_ST_BUFFEREVENT
+} tor_tls_state_t;
+
/** Holds a SSL object and its associated data. Members are only
* accessed from within tortls.c.
*/
@@ -156,12 +162,9 @@ struct tor_tls_t {
SSL *ssl; /**< An OpenSSL SSL object. */
int socket; /**< The underlying file descriptor for this TLS connection. */
char *address; /**< An address to log when describing this connection. */
- enum {
- TOR_TLS_ST_HANDSHAKE, TOR_TLS_ST_OPEN, TOR_TLS_ST_GOTCLOSE,
- TOR_TLS_ST_SENTCLOSE, TOR_TLS_ST_CLOSED, TOR_TLS_ST_RENEGOTIATE,
- TOR_TLS_ST_BUFFEREVENT
- } state : 3; /**< The current SSL state, depending on which operations have
- * completed successfully. */
+ ENUM_BF(tor_tls_state_t) state : 3; /**< The current SSL state,
+ * depending on which operations
+ * have completed successfully. */
unsigned int isServer:1; /**< True iff this is a server-side connection */
unsigned int wasV2Handshake:1; /**< True iff the original handshake for
* this connection used the updated version