aboutsummaryrefslogtreecommitdiff
path: root/src/common/tortls.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-09-24 13:00:28 -0400
committerNick Mathewson <nickm@torproject.org>2009-09-24 13:00:28 -0400
commita3f1da2ec067ada4231d0f1c0b6d597ff547d1d9 (patch)
tree17350c97a424198b373facdbaed96a4538560d2f /src/common/tortls.c
parentb8b293536752725ebba5f14852095b512a009e75 (diff)
downloadtor-a3f1da2ec067ada4231d0f1c0b6d597ff547d1d9.tar.gz
tor-a3f1da2ec067ada4231d0f1c0b6d597ff547d1d9.zip
Fix compilation on OpenSSLs with unusual state lists.
"Unusual" in this context means "not the same as nickm's." We should grow a better list later. (Also, move TLS state table to a separate header.)
Diffstat (limited to 'src/common/tortls.c')
-rw-r--r--src/common/tortls.c135
1 files changed, 1 insertions, 134 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c
index 4d673bf1ec..6e0932524a 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -165,140 +165,7 @@ static int tls_library_is_initialized = 0;
#define _TOR_TLS_SYSCALL (_MIN_TOR_TLS_ERROR_VAL - 2)
#define _TOR_TLS_ZERORETURN (_MIN_TOR_TLS_ERROR_VAL - 1)
-static const struct { int state; const char *name; } state_map[] = {
-#define S(state) { state, #state }
- S(DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A),
- S(DTLS1_ST_CR_HELLO_VERIFY_REQUEST_B),
- S(DTLS1_ST_SW_HELLO_VERIFY_REQUEST_A),
- S(DTLS1_ST_SW_HELLO_VERIFY_REQUEST_B),
- S(SSL23_ST_CR_SRVR_HELLO_A),
- S(SSL23_ST_CR_SRVR_HELLO_B),
- S(SSL23_ST_CW_CLNT_HELLO_A),
- S(SSL23_ST_CW_CLNT_HELLO_B),
- S(SSL23_ST_SR_CLNT_HELLO_A),
- S(SSL23_ST_SR_CLNT_HELLO_B),
- S(SSL2_ST_CLIENT_START_ENCRYPTION),
- S(SSL2_ST_GET_CLIENT_FINISHED_A),
- S(SSL2_ST_GET_CLIENT_FINISHED_B),
- S(SSL2_ST_GET_CLIENT_HELLO_A),
- S(SSL2_ST_GET_CLIENT_HELLO_B),
- S(SSL2_ST_GET_CLIENT_HELLO_C),
- S(SSL2_ST_GET_CLIENT_MASTER_KEY_A),
- S(SSL2_ST_GET_CLIENT_MASTER_KEY_B),
- S(SSL2_ST_GET_SERVER_FINISHED_A),
- S(SSL2_ST_GET_SERVER_FINISHED_B),
- S(SSL2_ST_GET_SERVER_HELLO_A),
- S(SSL2_ST_GET_SERVER_HELLO_B),
- S(SSL2_ST_GET_SERVER_VERIFY_A),
- S(SSL2_ST_GET_SERVER_VERIFY_B),
- S(SSL2_ST_SEND_CLIENT_CERTIFICATE_A),
- S(SSL2_ST_SEND_CLIENT_CERTIFICATE_B),
- S(SSL2_ST_SEND_CLIENT_CERTIFICATE_C),
- S(SSL2_ST_SEND_CLIENT_CERTIFICATE_D),
- S(SSL2_ST_SEND_CLIENT_FINISHED_A),
- S(SSL2_ST_SEND_CLIENT_FINISHED_B),
- S(SSL2_ST_SEND_CLIENT_HELLO_A),
- S(SSL2_ST_SEND_CLIENT_HELLO_B),
- S(SSL2_ST_SEND_CLIENT_MASTER_KEY_A),
- S(SSL2_ST_SEND_CLIENT_MASTER_KEY_B),
- S(SSL2_ST_SEND_REQUEST_CERTIFICATE_A),
- S(SSL2_ST_SEND_REQUEST_CERTIFICATE_B),
- S(SSL2_ST_SEND_REQUEST_CERTIFICATE_C),
- S(SSL2_ST_SEND_REQUEST_CERTIFICATE_D),
- S(SSL2_ST_SEND_SERVER_FINISHED_A),
- S(SSL2_ST_SEND_SERVER_FINISHED_B),
- S(SSL2_ST_SEND_SERVER_HELLO_A),
- S(SSL2_ST_SEND_SERVER_HELLO_B),
- S(SSL2_ST_SEND_SERVER_VERIFY_A),
- S(SSL2_ST_SEND_SERVER_VERIFY_B),
- S(SSL2_ST_SEND_SERVER_VERIFY_C),
- S(SSL2_ST_SERVER_START_ENCRYPTION),
- S(SSL2_ST_X509_GET_CLIENT_CERTIFICATE),
- S(SSL2_ST_X509_GET_SERVER_CERTIFICATE),
- S(SSL3_ST_CR_CERT_A),
- S(SSL3_ST_CR_CERT_B),
- S(SSL3_ST_CR_CERT_REQ_A),
- S(SSL3_ST_CR_CERT_REQ_B),
- S(SSL3_ST_CR_CERT_STATUS_A),
- S(SSL3_ST_CR_CERT_STATUS_B),
- S(SSL3_ST_CR_CHANGE_A),
- S(SSL3_ST_CR_CHANGE_B),
- S(SSL3_ST_CR_FINISHED_A),
- S(SSL3_ST_CR_FINISHED_B),
- S(SSL3_ST_CR_KEY_EXCH_A),
- S(SSL3_ST_CR_KEY_EXCH_B),
- S(SSL3_ST_CR_SESSION_TICKET_A),
- S(SSL3_ST_CR_SESSION_TICKET_B),
- S(SSL3_ST_CR_SRVR_DONE_A),
- S(SSL3_ST_CR_SRVR_DONE_B),
- S(SSL3_ST_CR_SRVR_HELLO_A),
- S(SSL3_ST_CR_SRVR_HELLO_B),
- S(SSL3_ST_CW_CERT_A),
- S(SSL3_ST_CW_CERT_B),
- S(SSL3_ST_CW_CERT_C),
- S(SSL3_ST_CW_CERT_D),
- S(SSL3_ST_CW_CERT_VRFY_A),
- S(SSL3_ST_CW_CERT_VRFY_B),
- S(SSL3_ST_CW_CHANGE_A),
- S(SSL3_ST_CW_CHANGE_B),
- S(SSL3_ST_CW_CLNT_HELLO_A),
- S(SSL3_ST_CW_CLNT_HELLO_B),
- S(SSL3_ST_CW_FINISHED_A),
- S(SSL3_ST_CW_FINISHED_B),
- S(SSL3_ST_CW_FLUSH),
- S(SSL3_ST_CW_KEY_EXCH_A),
- S(SSL3_ST_CW_KEY_EXCH_B),
- S(SSL3_ST_SR_CERT_A),
- S(SSL3_ST_SR_CERT_B),
- S(SSL3_ST_SR_CERT_VRFY_A),
- S(SSL3_ST_SR_CERT_VRFY_B),
- S(SSL3_ST_SR_CHANGE_A),
- S(SSL3_ST_SR_CHANGE_B),
- S(SSL3_ST_SR_CLNT_HELLO_A),
- S(SSL3_ST_SR_CLNT_HELLO_B),
- S(SSL3_ST_SR_CLNT_HELLO_C),
- S(SSL3_ST_SR_FINISHED_A),
- S(SSL3_ST_SR_FINISHED_B),
- S(SSL3_ST_SR_KEY_EXCH_A),
- S(SSL3_ST_SR_KEY_EXCH_B),
- S(SSL3_ST_SW_CERT_A),
- S(SSL3_ST_SW_CERT_B),
- S(SSL3_ST_SW_CERT_REQ_A),
- S(SSL3_ST_SW_CERT_REQ_B),
- S(SSL3_ST_SW_CERT_STATUS_A),
- S(SSL3_ST_SW_CERT_STATUS_B),
- S(SSL3_ST_SW_CHANGE_A),
- S(SSL3_ST_SW_CHANGE_B),
- S(SSL3_ST_SW_FINISHED_A),
- S(SSL3_ST_SW_FINISHED_B),
- S(SSL3_ST_SW_FLUSH),
- S(SSL3_ST_SW_HELLO_REQ_A),
- S(SSL3_ST_SW_HELLO_REQ_B),
- S(SSL3_ST_SW_HELLO_REQ_C),
- S(SSL3_ST_SW_KEY_EXCH_A),
- S(SSL3_ST_SW_KEY_EXCH_B),
- S(SSL3_ST_SW_SESSION_TICKET_A),
- S(SSL3_ST_SW_SESSION_TICKET_B),
- S(SSL3_ST_SW_SRVR_DONE_A),
- S(SSL3_ST_SW_SRVR_DONE_B),
- S(SSL3_ST_SW_SRVR_HELLO_A),
- S(SSL3_ST_SW_SRVR_HELLO_B),
- S(SSL_CB_ACCEPT_EXIT),
- S(SSL_CB_ACCEPT_LOOP),
- S(SSL_CB_CONNECT_EXIT),
- S(SSL_CB_CONNECT_LOOP),
- S(SSL_ST_ACCEPT),
- S(SSL_ST_BEFORE),
- S(SSL_ST_CONNECT),
- S(SSL_ST_INIT),
- S(SSL_ST_MASK),
- S(SSL_ST_OK),
- S(SSL_ST_READ_BODY),
- S(SSL_ST_READ_DONE),
- S(SSL_ST_READ_HEADER),
- S(SSL_ST_RENEGOTIATE),
- { 0, NULL }
-};
+#include "tortls_states.h"
/** Return the symbolic name of an OpenSSL state. */
static const char *