return ssl_io->state;
}
-static bool openssl_iostream_is_handshaked(const struct ssl_iostream *ssl_io)
-{
- return ssl_io->handshaked;
-}
-
static bool
openssl_iostream_has_handshake_failed(const struct ssl_iostream *ssl_io)
{
.set_log_prefix = openssl_iostream_set_log_prefix,
.get_state = openssl_iostream_get_state,
- .is_handshaked = openssl_iostream_is_handshaked,
.has_handshake_failed = openssl_iostream_has_handshake_failed,
.has_valid_client_cert = openssl_iostream_has_valid_client_cert,
.has_client_cert = openssl_iostream_has_client_cert,
void (*set_log_prefix)(struct ssl_iostream *ssl_io, const char *prefix);
enum ssl_iostream_state (*get_state)(const struct ssl_iostream *ssl_io);
- bool (*is_handshaked)(const struct ssl_iostream *ssl_io);
bool (*has_handshake_failed)(const struct ssl_iostream *ssl_io);
bool (*has_valid_client_cert)(const struct ssl_iostream *ssl_io);
bool (*has_client_cert)(struct ssl_iostream *ssl_io);
bool ssl_iostream_is_handshaked(const struct ssl_iostream *ssl_io)
{
- return ssl_vfuncs->is_handshaked(ssl_io);
+ return ssl_iostream_get_state(ssl_io) == SSL_IOSTREAM_STATE_OK;
}
bool ssl_iostream_has_handshake_failed(const struct ssl_iostream *ssl_io)
enum ssl_iostream_state
ssl_iostream_get_state(const struct ssl_iostream *ssl_io);
+/* Returns TRUE if SSL iostream handshake is finished and certificate is valid.
+ This is the same as state being SSL_IOSTREAM_STATE_OK. */
bool ssl_iostream_is_handshaked(const struct ssl_iostream *ssl_io);
/* Returns TRUE if the remote cert is invalid, or handshake callback returned
failure. */