Remove the old state defines
authorMatt Caswell <matt@openssl.org>
Mon, 5 Oct 2015 10:17:08 +0000 (11:17 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 30 Oct 2015 08:39:47 +0000 (08:39 +0000)
Remove all the defines for the old state machines states. Mapping old to new
is probably going to cause more problems than it solves so it is probably
better to just remove them.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
CHANGES
include/openssl/ssl.h
include/openssl/ssl3.h

diff --git a/CHANGES b/CHANGES
index 46f058a4b8434c5187e11a4ee5913dec21a56520..a8629d87bbd84298d1ef1e9766e9a92f718ff218 100644 (file)
--- a/CHANGES
+++ b/CHANGES
      has been removed and replaced by SSL_get_state which now returns an
      "OSSL_HANDSHAKE_STATE" instead of an int. SSL_set_state() has been removed
      altogether. The previous handshake states defined in ssl.h and ssl3.h have
-     been redefined to be the nearest equivalent OSS_HANDSHAKE_STATE value. Not
-     all states have an equivalent value, (e.g. SSL_ST_CW_FLUSH). New
-     application code should not use the old handshake state values, but should
-     instead use OSSL_HANDSHAKE_STATE.
+     also been removed.
      [Matt Caswell]
 
   *) The demo files in crypto/threads were moved to demo/threads.
index eb8e599ae3516a17f3e5a37b880a70d3c1dae62e..185c3cb885b4c7d46d8de0c826d125d2885ca40c 100644 (file)
@@ -985,11 +985,6 @@ typedef enum {
 # define SSL_ST_ACCEPT                   0x2000
 
 # define SSL_ST_MASK                     0x0FFF
-# define SSL_ST_INIT                     (-1)
-# define SSL_ST_BEFORE                   TLS_ST_BEFORE
-# define SSL_ST_OK                       TLS_ST_OK
-# define SSL_ST_RENEGOTIATE              (-1)
-# define SSL_ST_ERR                      (-1)
 
 # define SSL_CB_LOOP                     0x01
 # define SSL_CB_EXIT                     0x02
index bfb2c2dbd6cd143da0881b6a9fd0c9ca497a291d..ef93c085a639cc954ef8acc31cb07589a31a25c9 100644 (file)
@@ -370,118 +370,6 @@ extern "C" {
 # define TLS1_FLAGS_ENCRYPT_THEN_MAC             0x0100
 
 
-/* SSLv3 */
-/*
- * The following states are no longer used and are defined to be the closest
- * equivalent value in the current state machine code. Not all defines have an
- * equivalent and are set to a dummy value (-1).
- */
-/*
- * client
- */
-/* extra state */
-# define SSL3_ST_CW_FLUSH                   (-1)
-# ifndef OPENSSL_NO_SCTP
-#  define DTLS1_SCTP_ST_CW_WRITE_SOCK       (-1)
-#  define DTLS1_SCTP_ST_CR_READ_SOCK        (-1)
-# endif
-/* write to server */
-# define SSL3_ST_CW_CLNT_HELLO_A            TLS_ST_CW_CLNT_HELLO
-# define SSL3_ST_CW_CLNT_HELLO_B            TLS_ST_CW_CLNT_HELLO
-/* read from server */
-# define SSL3_ST_CR_SRVR_HELLO_A            TLS_ST_CR_SRVR_HELLO
-# define SSL3_ST_CR_SRVR_HELLO_B            TLS_ST_CR_SRVR_HELLO
-# define DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A DTLS_ST_CR_HELLO_VERIFY_REQUEST
-# define DTLS1_ST_CR_HELLO_VERIFY_REQUEST_B DTLS_ST_CR_HELLO_VERIFY_REQUEST
-# define SSL3_ST_CR_CERT_A                  TLS_ST_CR_CERT
-# define SSL3_ST_CR_CERT_B                  TLS_ST_CR_CERT
-# define SSL3_ST_CR_KEY_EXCH_A              TLS_ST_CR_KEY_EXCH
-# define SSL3_ST_CR_KEY_EXCH_B              TLS_ST_CR_KEY_EXCH
-# define SSL3_ST_CR_CERT_REQ_A              TLS_ST_CR_CERT_REQ
-# define SSL3_ST_CR_CERT_REQ_B              TLS_ST_CR_CERT_REQ
-# define SSL3_ST_CR_SRVR_DONE_A             TLS_ST_CR_SRVR_DONE
-# define SSL3_ST_CR_SRVR_DONE_B             TLS_ST_CR_SRVR_DONE
-/* write to server */
-# define SSL3_ST_CW_CERT_A                  TLS_ST_CW_CERT
-# define SSL3_ST_CW_CERT_B                  TLS_ST_CW_CERT
-# define SSL3_ST_CW_CERT_C                  TLS_ST_CW_CERT
-# define SSL3_ST_CW_CERT_D                  TLS_ST_CW_CERT
-# define SSL3_ST_CW_KEY_EXCH_A              TLS_ST_CW_KEY_EXCH
-# define SSL3_ST_CW_KEY_EXCH_B              TLS_ST_CW_KEY_EXCH
-# define SSL3_ST_CW_CERT_VRFY_A             TLS_ST_CW_CERT_VRFY
-# define SSL3_ST_CW_CERT_VRFY_B             TLS_ST_CW_CERT_VRFY
-# define SSL3_ST_CW_CHANGE_A                TLS_ST_CW_CHANGE
-# define SSL3_ST_CW_CHANGE_B                TLS_ST_CW_CHANGE
-# ifndef OPENSSL_NO_NEXTPROTONEG
-#  define SSL3_ST_CW_NEXT_PROTO_A           TLS_ST_CW_NEXT_PROTO
-#  define SSL3_ST_CW_NEXT_PROTO_B           TLS_ST_CW_NEXT_PROTO
-# endif
-# define SSL3_ST_CW_FINISHED_A              TLS_ST_CW_FINISHED
-# define SSL3_ST_CW_FINISHED_B              TLS_ST_CW_FINISHED
-/* read from server */
-# define SSL3_ST_CR_CHANGE_A                TLS_ST_CR_CHANGE
-# define SSL3_ST_CR_CHANGE_B                TLS_ST_CR_CHANGE
-# define SSL3_ST_CR_FINISHED_A              TLS_ST_CR_FINISHED
-# define SSL3_ST_CR_FINISHED_B              TLS_ST_CR_FINISHED
-# define SSL3_ST_CR_SESSION_TICKET_A        TLS_ST_CR_SESSION_TICKET
-# define SSL3_ST_CR_SESSION_TICKET_B        TLS_ST_CR_SESSION_TICKET
-# define SSL3_ST_CR_CERT_STATUS_A           TLS_ST_CR_CERT_STATUS
-# define SSL3_ST_CR_CERT_STATUS_B           TLS_ST_CR_CERT_STATUS
-
-/* server */
-/* extra state */
-# define SSL3_ST_SW_FLUSH                   (-1)
-# ifndef OPENSSL_NO_SCTP
-#  define DTLS1_SCTP_ST_SW_WRITE_SOCK       (-1)
-#  define DTLS1_SCTP_ST_SR_READ_SOCK        (-1)
-# endif
-/* read from client */
-/* Do not change the number values, they do matter */
-# define SSL3_ST_SR_CLNT_HELLO_A            TLS_ST_SR_CLNT_HELLO
-# define SSL3_ST_SR_CLNT_HELLO_B            TLS_ST_SR_CLNT_HELLO
-# define SSL3_ST_SR_CLNT_HELLO_C            TLS_ST_SR_CLNT_HELLO
-# define SSL3_ST_SR_CLNT_HELLO_D            TLS_ST_SR_CLNT_HELLO
-/* write to client */
-# define DTLS1_ST_SW_HELLO_VERIFY_REQUEST_A DTLS_ST_SW_HELLO_VERIFY_REQUEST
-# define DTLS1_ST_SW_HELLO_VERIFY_REQUEST_B DTLS_ST_SW_HELLO_VERIFY_REQUEST
-# define SSL3_ST_SW_HELLO_REQ_A             TLS_ST_SW_HELLO_REQ
-# define SSL3_ST_SW_HELLO_REQ_B             TLS_ST_SW_HELLO_REQ
-# define SSL3_ST_SW_HELLO_REQ_C             TLS_ST_SW_HELLO_REQ
-# define SSL3_ST_SW_SRVR_HELLO_A            TLS_ST_SW_SRVR_HELLO
-# define SSL3_ST_SW_SRVR_HELLO_B            TLS_ST_SW_SRVR_HELLO
-# define SSL3_ST_SW_CERT_A                  TLS_ST_SW_CERT
-# define SSL3_ST_SW_CERT_B                  TLS_ST_SW_CERT
-# define SSL3_ST_SW_KEY_EXCH_A              TLS_ST_SW_KEY_EXCH
-# define SSL3_ST_SW_KEY_EXCH_B              TLS_ST_SW_KEY_EXCH
-# define SSL3_ST_SW_CERT_REQ_A              TLS_ST_SW_CERT_REQ
-# define SSL3_ST_SW_CERT_REQ_B              TLS_ST_SW_CERT_REQ
-# define SSL3_ST_SW_SRVR_DONE_A             TLS_ST_SW_SRVR_DONE
-# define SSL3_ST_SW_SRVR_DONE_B             TLS_ST_SW_SRVR_DONE
-/* read from client */
-# define SSL3_ST_SR_CERT_A                  TLS_ST_SR_CERT
-# define SSL3_ST_SR_CERT_B                  TLS_ST_SR_CERT
-# define SSL3_ST_SR_KEY_EXCH_A              TLS_ST_SR_KEY_EXCH
-# define SSL3_ST_SR_KEY_EXCH_B              TLS_ST_SR_KEY_EXCH
-# define SSL3_ST_SR_CERT_VRFY_A             TLS_ST_SR_CERT_VRFY
-# define SSL3_ST_SR_CERT_VRFY_B             TLS_ST_SR_CERT_VRFY
-# define SSL3_ST_SR_CHANGE_A                TLS_ST_SR_CHANGE
-# define SSL3_ST_SR_CHANGE_B                TLS_ST_SR_CHANGE
-# ifndef OPENSSL_NO_NEXTPROTONEG
-#  define SSL3_ST_SR_NEXT_PROTO_A           TLS_ST_SR_NEXT_PROTO
-#  define SSL3_ST_SR_NEXT_PROTO_B           TLS_ST_SR_NEXT_PROTO
-# endif
-# define SSL3_ST_SR_FINISHED_A              TLS_ST_SR_FINISHED
-# define SSL3_ST_SR_FINISHED_B              TLS_ST_SR_FINISHED
-/* write to client */
-# define SSL3_ST_SW_CHANGE_A                TLS_ST_SW_CHANGE
-# define SSL3_ST_SW_CHANGE_B                TLS_ST_SW_CHANGE
-# define SSL3_ST_SW_FINISHED_A              TLS_ST_SW_FINISHED
-# define SSL3_ST_SW_FINISHED_B              TLS_ST_SW_FINISHED
-# define SSL3_ST_SW_SESSION_TICKET_A        TLS_ST_SW_SESSION_TICKET
-# define SSL3_ST_SW_SESSION_TICKET_B        TLS_ST_SW_SESSION_TICKET
-# define SSL3_ST_SW_CERT_STATUS_A           TLS_ST_SW_CERT_STATUS
-# define SSL3_ST_SW_CERT_STATUS_B           TLS_ST_SW_CERT_STATUS
-
 # define SSL3_MT_HELLO_REQUEST                   0
 # define SSL3_MT_CLIENT_HELLO                    1
 # define SSL3_MT_SERVER_HELLO                    2