#include <openssl/ssl.h>
- int SSL_in_init(SSL *s);
- int SSL_in_before(SSL *s);
- int SSL_is_init_finished(SSL *s);
+ int SSL_in_init(const SSL *s);
+ int SSL_in_before(const SSL *s);
+ int SSL_is_init_finished(const SSL *s);
int SSL_in_connect_init(SSL *s);
int SSL_in_accept_init(SSL *s);
/* Is the SSL_connection established? */
# define SSL_in_connect_init(a) (SSL_in_init(a) && !SSL_is_server(a))
# define SSL_in_accept_init(a) (SSL_in_init(a) && SSL_is_server(a))
-int SSL_in_init(SSL *s);
-int SSL_in_before(SSL *s);
-int SSL_is_init_finished(SSL *s);
+int SSL_in_init(const SSL *s);
+int SSL_in_before(const SSL *s);
+int SSL_is_init_finished(const SSL *s);
/*
* The following 3 states are kept in ssl->rlayer.rstate when reads fail, you
return ssl->statem.hand_state;
}
-int SSL_in_init(SSL *s)
+int SSL_in_init(const SSL *s)
{
return s->statem.in_init;
}
-int SSL_is_init_finished(SSL *s)
+int SSL_is_init_finished(const SSL *s)
{
return !(s->statem.in_init) && (s->statem.hand_state == TLS_ST_OK);
}
-int SSL_in_before(SSL *s)
+int SSL_in_before(const SSL *s)
{
/*
* Historically being "in before" meant before anything had happened. In the