refactored in order to remove much duplication of code and solve issues
with the old code (see ssl/statem/README for further details). This change
does have some associated API changes. Notably SSL_get_state/SSL_state now
- returns an "enum HANDSHAKE_STATE" instead of an int. The previous handshake
+ returns an "OSSL_HANDSHAKE_STATE" instead of an int. The previous handshake
states defined in ssl.h and ssl3.h have been redefined to be the nearest
- equivalent 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 HANDSHAKE_STATE.
+ 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.
[Matt Caswell]
*) The demo files in crypto/threads were moved to demo/threads.
=item int B<SSL_shutdown>(SSL *ssl);
-=item enum HANDSHAKE_STATE B<SSL_state>(const SSL *ssl);
+=item OSSL_HANDSHAKE_STATE B<SSL_state>(const SSL *ssl);
Returns the current handshake state.
* TLS_ST_BEFORE = No handshake has been initiated yet
* TLS_ST_OK = A handshake has been successfully completed
*/
-enum HANDSHAKE_STATE {
+typedef enum {
TLS_ST_BEFORE,
TLS_ST_OK,
DTLS_ST_CR_HELLO_VERIFY_REQUEST,
TLS_ST_SW_CERT_STATUS,
TLS_ST_SW_CHANGE,
TLS_ST_SW_FINISHED
-};
+} OSSL_HANDSHAKE_STATE;
/*
* Most of the following state values are no longer used and are defined to be
void (*cb) (const SSL *ssl, int type, int val));
void (*SSL_get_info_callback(const SSL *ssl)) (const SSL *ssl, int type,
int val);
-__owur enum HANDSHAKE_STATE SSL_state(const SSL *ssl);
-void SSL_set_state(SSL *ssl, enum HANDSHAKE_STATE state);
+__owur OSSL_HANDSHAKE_STATE SSL_state(const SSL *ssl);
+void SSL_set_state(SSL *ssl, OSSL_HANDSHAKE_STATE state);
void SSL_set_verify_result(SSL *ssl, long v);
__owur long SSL_get_verify_result(const SSL *ssl);
static void init_write_state_machine(SSL *s);
static enum SUB_STATE_RETURN write_state_machine(SSL *s);
-enum HANDSHAKE_STATE SSL_state(const SSL *ssl)
+OSSL_HANDSHAKE_STATE SSL_state(const SSL *ssl)
{
return ssl->statem.hand_state;
}
-void SSL_set_state(SSL *ssl, enum HANDSHAKE_STATE state)
+void SSL_set_state(SSL *ssl, OSSL_HANDSHAKE_STATE state)
{
/*
* This function seems like a really bad idea. Should we remove it
enum WORK_STATE write_state_work;
enum READ_STATE read_state;
enum WORK_STATE read_state_work;
- enum HANDSHAKE_STATE hand_state;
+ OSSL_HANDSHAKE_STATE hand_state;
int in_init;
int read_state_first_init;
int use_timer;