Rename STATEM to OSSL_STATEM
authorMatt Caswell <matt@openssl.org>
Mon, 5 Oct 2015 09:58:52 +0000 (10:58 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 30 Oct 2015 08:39:46 +0000 (08:39 +0000)
Add an OSSL_ prefix onto STATEM

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
ssl/ssl_locl.h
ssl/statem/statem.c
ssl/statem/statem.h
ssl/statem/statem_clnt.c
ssl/statem/statem_srvr.c

index 24ce4f7..8d9f51a 100644 (file)
@@ -1010,7 +1010,7 @@ struct ssl_st {
     /* we have shut things down, 0x01 sent, 0x02 for received */
     int shutdown;
     /* where we are */
     /* we have shut things down, 0x01 sent, 0x02 for received */
     int shutdown;
     /* where we are */
-    STATEM statem;
+    OSSL_STATEM statem;
 
     BUF_MEM *init_buf;          /* buffer used during init */
     void *init_msg;             /* pointer to handshake message body, set by
 
     BUF_MEM *init_buf;          /* buffer used during init */
     void *init_msg;             /* pointer to handshake message body, set by
index dd7a260..062329f 100644 (file)
@@ -228,7 +228,7 @@ static int state_machine(SSL *s, int server) {
     BUF_MEM *buf = NULL;
     unsigned long Time = (unsigned long)time(NULL);
     void (*cb) (const SSL *ssl, int type, int val) = NULL;
     BUF_MEM *buf = NULL;
     unsigned long Time = (unsigned long)time(NULL);
     void (*cb) (const SSL *ssl, int type, int val) = NULL;
-    STATEM *st = &s->statem;
+    OSSL_STATEM *st = &s->statem;
     int ret = -1;
     int ssret;
 
     int ret = -1;
     int ssret;
 
@@ -454,7 +454,7 @@ static int state_machine(SSL *s, int server) {
  */
 static void init_read_state_machine(SSL *s)
 {
  */
 static void init_read_state_machine(SSL *s)
 {
-    STATEM *st = &s->statem;
+    OSSL_STATEM *st = &s->statem;
 
     st->read_state = READ_STATE_HEADER;
 }
 
     st->read_state = READ_STATE_HEADER;
 }
@@ -486,7 +486,7 @@ static void init_read_state_machine(SSL *s)
  * will resume in the same state where we left off.
  */
 static enum SUB_STATE_RETURN read_state_machine(SSL *s) {
  * will resume in the same state where we left off.
  */
 static enum SUB_STATE_RETURN read_state_machine(SSL *s) {
-    STATEM *st = &s->statem;
+    OSSL_STATEM *st = &s->statem;
     int ret, mt;
     unsigned long len;
     int (*transition)(SSL *s, int mt);
     int ret, mt;
     unsigned long len;
     int (*transition)(SSL *s, int mt);
@@ -632,7 +632,7 @@ static enum SUB_STATE_RETURN read_state_machine(SSL *s) {
  */
 static int statem_do_write(SSL *s)
 {
  */
 static int statem_do_write(SSL *s)
 {
-    STATEM *st = &s->statem;
+    OSSL_STATEM *st = &s->statem;
 
     if (st->hand_state == TLS_ST_CW_CHANGE
             || st->hand_state == TLS_ST_SW_CHANGE) {
 
     if (st->hand_state == TLS_ST_CW_CHANGE
             || st->hand_state == TLS_ST_SW_CHANGE) {
@@ -650,7 +650,7 @@ static int statem_do_write(SSL *s)
  */
 static void init_write_state_machine(SSL *s)
 {
  */
 static void init_write_state_machine(SSL *s)
 {
-    STATEM *st = &s->statem;
+    OSSL_STATEM *st = &s->statem;
 
     st->write_state = WRITE_STATE_TRANSITION;
 }
 
     st->write_state = WRITE_STATE_TRANSITION;
 }
@@ -688,7 +688,7 @@ static void init_write_state_machine(SSL *s)
  */
 static enum SUB_STATE_RETURN write_state_machine(SSL *s)
 {
  */
 static enum SUB_STATE_RETURN write_state_machine(SSL *s)
 {
-    STATEM *st = &s->statem;
+    OSSL_STATEM *st = &s->statem;
     int ret;
     enum WRITE_TRAN (*transition)(SSL *s);
     enum WORK_STATE (*pre_work)(SSL *s, enum WORK_STATE wst);
     int ret;
     enum WRITE_TRAN (*transition)(SSL *s);
     enum WORK_STATE (*pre_work)(SSL *s, enum WORK_STATE wst);
@@ -811,7 +811,7 @@ int statem_flush(SSL *s)
  */
 int ossl_statem_app_data_allowed(SSL *s)
 {
  */
 int ossl_statem_app_data_allowed(SSL *s)
 {
-    STATEM *st = &s->statem;
+    OSSL_STATEM *st = &s->statem;
 
     if (st->state == MSG_FLOW_UNINITED || st->state == MSG_FLOW_RENEGOTIATE)
         return 0;
 
     if (st->state == MSG_FLOW_UNINITED || st->state == MSG_FLOW_RENEGOTIATE)
         return 0;
index f65e09f..4c090dc 100644 (file)
@@ -126,7 +126,7 @@ enum WRITE_STATE {
  *                                                                           *
  *****************************************************************************/
 
  *                                                                           *
  *****************************************************************************/
 
-struct statem_st {
+struct ossl_statem_st {
     enum MSG_FLOW_STATE state;
     enum WRITE_STATE write_state;
     enum WORK_STATE write_state_work;
     enum MSG_FLOW_STATE state;
     enum WRITE_STATE write_state;
     enum WORK_STATE write_state_work;
@@ -144,7 +144,7 @@ struct statem_st {
     int in_sctp_read_sock;
 #endif
 };
     int in_sctp_read_sock;
 #endif
 };
-typedef struct statem_st STATEM;
+typedef struct ossl_statem_st OSSL_STATEM;
 
 
 /*****************************************************************************
 
 
 /*****************************************************************************
index a2bb558..4fa73ba 100644 (file)
@@ -249,7 +249,7 @@ static int key_exchange_expected(SSL *s)
  */
 int client_read_transition(SSL *s, int mt)
 {
  */
 int client_read_transition(SSL *s, int mt)
 {
-    STATEM *st = &s->statem;
+    OSSL_STATEM *st = &s->statem;
     int ske_expected;
 
     switch(st->hand_state) {
     int ske_expected;
 
     switch(st->hand_state) {
@@ -393,7 +393,7 @@ int client_read_transition(SSL *s, int mt)
  */
 enum WRITE_TRAN client_write_transition(SSL *s)
 {
  */
 enum WRITE_TRAN client_write_transition(SSL *s)
 {
-    STATEM *st = &s->statem;
+    OSSL_STATEM *st = &s->statem;
 
     switch(st->hand_state) {
         case TLS_ST_OK:
 
     switch(st->hand_state) {
         case TLS_ST_OK:
@@ -497,7 +497,7 @@ enum WRITE_TRAN client_write_transition(SSL *s)
  */
 enum WORK_STATE client_pre_work(SSL *s, enum WORK_STATE wst)
 {
  */
 enum WORK_STATE client_pre_work(SSL *s, enum WORK_STATE wst)
 {
-    STATEM *st = &s->statem;
+    OSSL_STATEM *st = &s->statem;
 
     switch(st->hand_state) {
     case TLS_ST_CW_CLNT_HELLO:
 
     switch(st->hand_state) {
     case TLS_ST_CW_CLNT_HELLO:
@@ -544,7 +544,7 @@ enum WORK_STATE client_pre_work(SSL *s, enum WORK_STATE wst)
  */
 enum WORK_STATE client_post_work(SSL *s, enum WORK_STATE wst)
 {
  */
 enum WORK_STATE client_post_work(SSL *s, enum WORK_STATE wst)
 {
-    STATEM *st = &s->statem;
+    OSSL_STATEM *st = &s->statem;
 
     s->init_num = 0;
 
 
     s->init_num = 0;
 
@@ -643,7 +643,7 @@ enum WORK_STATE client_post_work(SSL *s, enum WORK_STATE wst)
  */
 int client_construct_message(SSL *s)
 {
  */
 int client_construct_message(SSL *s)
 {
-    STATEM *st = &s->statem;
+    OSSL_STATEM *st = &s->statem;
 
     switch(st->hand_state) {
     case TLS_ST_CW_CLNT_HELLO:
 
     switch(st->hand_state) {
     case TLS_ST_CW_CLNT_HELLO:
@@ -689,7 +689,7 @@ int client_construct_message(SSL *s)
  */
 unsigned long client_max_message_size(SSL *s)
 {
  */
 unsigned long client_max_message_size(SSL *s)
 {
-    STATEM *st = &s->statem;
+    OSSL_STATEM *st = &s->statem;
 
     switch(st->hand_state) {
         case TLS_ST_CR_SRVR_HELLO:
 
     switch(st->hand_state) {
         case TLS_ST_CR_SRVR_HELLO:
@@ -735,7 +735,7 @@ unsigned long client_max_message_size(SSL *s)
  */
 enum MSG_PROCESS_RETURN client_process_message(SSL *s, PACKET *pkt)
 {
  */
 enum MSG_PROCESS_RETURN client_process_message(SSL *s, PACKET *pkt)
 {
-    STATEM *st = &s->statem;
+    OSSL_STATEM *st = &s->statem;
 
     switch(st->hand_state) {
         case TLS_ST_CR_SRVR_HELLO:
 
     switch(st->hand_state) {
         case TLS_ST_CR_SRVR_HELLO:
@@ -782,7 +782,7 @@ enum MSG_PROCESS_RETURN client_process_message(SSL *s, PACKET *pkt)
  */
 enum WORK_STATE client_post_process_message(SSL *s, enum WORK_STATE wst)
 {
  */
 enum WORK_STATE client_post_process_message(SSL *s, enum WORK_STATE wst)
 {
-    STATEM *st = &s->statem;
+    OSSL_STATEM *st = &s->statem;
 
     switch(st->hand_state) {
 #ifndef OPENSSL_NO_SCTP
 
     switch(st->hand_state) {
 #ifndef OPENSSL_NO_SCTP
index 103f3cc..571d93e 100644 (file)
@@ -182,7 +182,7 @@ static STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s,
  */
 int server_read_transition(SSL *s, int mt)
 {
  */
 int server_read_transition(SSL *s, int mt)
 {
-    STATEM *st = &s->statem;
+    OSSL_STATEM *st = &s->statem;
 
     switch(st->hand_state) {
     case TLS_ST_BEFORE:
 
     switch(st->hand_state) {
     case TLS_ST_BEFORE:
@@ -404,7 +404,7 @@ static inline int send_certificate_request(SSL *s)
  */
 enum WRITE_TRAN server_write_transition(SSL *s)
 {
  */
 enum WRITE_TRAN server_write_transition(SSL *s)
 {
-    STATEM *st = &s->statem;
+    OSSL_STATEM *st = &s->statem;
 
     switch(st->hand_state) {
         case TLS_ST_BEFORE:
 
     switch(st->hand_state) {
         case TLS_ST_BEFORE:
@@ -522,7 +522,7 @@ enum WRITE_TRAN server_write_transition(SSL *s)
  */
 enum WORK_STATE server_pre_work(SSL *s, enum WORK_STATE wst)
 {
  */
 enum WORK_STATE server_pre_work(SSL *s, enum WORK_STATE wst)
 {
-    STATEM *st = &s->statem;
+    OSSL_STATEM *st = &s->statem;
 
     switch(st->hand_state) {
     case TLS_ST_SW_HELLO_REQ:
 
     switch(st->hand_state) {
     case TLS_ST_SW_HELLO_REQ:
@@ -601,7 +601,7 @@ enum WORK_STATE server_pre_work(SSL *s, enum WORK_STATE wst)
  */
 enum WORK_STATE server_post_work(SSL *s, enum WORK_STATE wst)
 {
  */
 enum WORK_STATE server_post_work(SSL *s, enum WORK_STATE wst)
 {
-    STATEM *st = &s->statem;
+    OSSL_STATEM *st = &s->statem;
 
     s->init_num = 0;
 
 
     s->init_num = 0;
 
@@ -709,7 +709,7 @@ enum WORK_STATE server_post_work(SSL *s, enum WORK_STATE wst)
  */
 int server_construct_message(SSL *s)
 {
  */
 int server_construct_message(SSL *s)
 {
-    STATEM *st = &s->statem;
+    OSSL_STATEM *st = &s->statem;
 
     switch(st->hand_state) {
     case DTLS_ST_SW_HELLO_VERIFY_REQUEST:
 
     switch(st->hand_state) {
     case DTLS_ST_SW_HELLO_VERIFY_REQUEST:
@@ -769,7 +769,7 @@ int server_construct_message(SSL *s)
  */
 unsigned long server_max_message_size(SSL *s)
 {
  */
 unsigned long server_max_message_size(SSL *s)
 {
-    STATEM *st = &s->statem;
+    OSSL_STATEM *st = &s->statem;
 
     switch(st->hand_state) {
     case TLS_ST_SR_CLNT_HELLO:
 
     switch(st->hand_state) {
     case TLS_ST_SR_CLNT_HELLO:
@@ -808,7 +808,7 @@ unsigned long server_max_message_size(SSL *s)
  */
 enum MSG_PROCESS_RETURN server_process_message(SSL *s, PACKET *pkt)
 {
  */
 enum MSG_PROCESS_RETURN server_process_message(SSL *s, PACKET *pkt)
 {
-    STATEM *st = &s->statem;
+    OSSL_STATEM *st = &s->statem;
 
     switch(st->hand_state) {
     case TLS_ST_SR_CLNT_HELLO:
 
     switch(st->hand_state) {
     case TLS_ST_SR_CLNT_HELLO:
@@ -848,7 +848,7 @@ enum MSG_PROCESS_RETURN server_process_message(SSL *s, PACKET *pkt)
  */
 enum WORK_STATE server_post_process_message(SSL *s, enum WORK_STATE wst)
 {
  */
 enum WORK_STATE server_post_process_message(SSL *s, enum WORK_STATE wst)
 {
-    STATEM *st = &s->statem;
+    OSSL_STATEM *st = &s->statem;
 
     switch(st->hand_state) {
     case TLS_ST_SR_CLNT_HELLO:
 
     switch(st->hand_state) {
     case TLS_ST_SR_CLNT_HELLO: