15aa67e8a9dd7fc631d58ce13c54fe004bb4d0c1Timo Sirainen int (*global_init)(const struct ssl_iostream_settings *set,
15aa67e8a9dd7fc631d58ce13c54fe004bb4d0c1Timo Sirainen const char **error_r);
ba1c847d0af4afe4787ed470d0c818e948e184e2Timo Sirainen int (*context_init_client)(const struct ssl_iostream_settings *set,
ba1c847d0af4afe4787ed470d0c818e948e184e2Timo Sirainen const char **error_r);
ba1c847d0af4afe4787ed470d0c818e948e184e2Timo Sirainen int (*context_init_server)(const struct ssl_iostream_settings *set,
ba1c847d0af4afe4787ed470d0c818e948e184e2Timo Sirainen const char **error_r);
96359599bbd4a2d704c3f343ff4c2fcd03f0dd02Timo Sirainen void (*context_ref)(struct ssl_iostream_context *ctx);
96359599bbd4a2d704c3f343ff4c2fcd03f0dd02Timo Sirainen void (*context_unref)(struct ssl_iostream_context *ctx);
3b4bd183cc469f70eb91d82a7f01f60ffc24ca5bTimo Sirainen int (*create)(struct ssl_iostream_context *ctx, const char *host,
3faa1040e5a3f9f35ffad29110216094ab2f5880Timo Sirainen struct istream **input, struct ostream **output,
ba1c847d0af4afe4787ed470d0c818e948e184e2Timo Sirainen struct ssl_iostream **iostream_r, const char **error_r);
3faa1040e5a3f9f35ffad29110216094ab2f5880Timo Sirainen int (*handshake)(struct ssl_iostream *ssl_io);
3faa1040e5a3f9f35ffad29110216094ab2f5880Timo Sirainen void (*set_handshake_callback)(struct ssl_iostream *ssl_io,
14a07d2bb34f1d52fce3e3218799f271f118d501Timo Sirainen void (*set_sni_callback)(struct ssl_iostream *ssl_io,
14a07d2bb34f1d52fce3e3218799f271f118d501Timo Sirainen void (*change_context)(struct ssl_iostream *ssl_io,
3b4bd183cc469f70eb91d82a7f01f60ffc24ca5bTimo Sirainen void (*set_log_prefix)(struct ssl_iostream *ssl_io, const char *prefix);
3faa1040e5a3f9f35ffad29110216094ab2f5880Timo Sirainen bool (*is_handshaked)(const struct ssl_iostream *ssl_io);
71b60849a773dd68bdc015cb6a8ea1664d16b359Timo Sirainen bool (*has_handshake_failed)(const struct ssl_iostream *ssl_io);
3faa1040e5a3f9f35ffad29110216094ab2f5880Timo Sirainen bool (*has_valid_client_cert)(const struct ssl_iostream *ssl_io);
3faa1040e5a3f9f35ffad29110216094ab2f5880Timo Sirainen bool (*has_broken_client_cert)(struct ssl_iostream *ssl_io);
6315f87da1b28578d2deb4d51aa624dc178efb0aTimo Sirainen bool (*cert_match_name)(struct ssl_iostream *ssl_io, const char *name,
6315f87da1b28578d2deb4d51aa624dc178efb0aTimo Sirainen const char **reason_r);
3faa1040e5a3f9f35ffad29110216094ab2f5880Timo Sirainen const char *(*get_peer_name)(struct ssl_iostream *ssl_io);
3b4bd183cc469f70eb91d82a7f01f60ffc24ca5bTimo Sirainen const char *(*get_server_name)(struct ssl_iostream *ssl_io);
48e243933060ae3e77abbdc9c0fd0bc2143be26eAki Tuomi const char *(*get_compression)(struct ssl_iostream *ssl_io);
3faa1040e5a3f9f35ffad29110216094ab2f5880Timo Sirainen const char *(*get_security_string)(struct ssl_iostream *ssl_io);
3faa1040e5a3f9f35ffad29110216094ab2f5880Timo Sirainen const char *(*get_last_error)(struct ssl_iostream *ssl_io);
33631b9b711b95ee47bd4ddbdb419f46a12cebe4Aki Tuomi const char *(*get_cipher)(struct ssl_iostream *ssl_io, unsigned int *bits_r);
33631b9b711b95ee47bd4ddbdb419f46a12cebe4Aki Tuomi const char *(*get_pfs)(struct ssl_iostream *ssl_io);
33631b9b711b95ee47bd4ddbdb419f46a12cebe4Aki Tuomi const char *(*get_protocol_name)(struct ssl_iostream *ssl_io);
fe4058e6f01bf0e104c44815b6df7cfefb80634cTimo Sirainenvoid iostream_ssl_module_init(const struct iostream_ssl_vfuncs *vfuncs);
1c1896564144f487fa5be3bd3ac5d7f1826311f7Timo Sirainen/* Returns TRUE if both settings are equal. Note that NULL and "" aren't
1c1896564144f487fa5be3bd3ac5d7f1826311f7Timo Sirainen treated equal. */
1c1896564144f487fa5be3bd3ac5d7f1826311f7Timo Sirainenbool ssl_iostream_settings_equals(const struct ssl_iostream_settings *set1,
85a594cdf83ecff5c1e37aee5a704e0b3599a3f9Timo Sirainen/* Clear out all stream-only settings, so only settings useful for a context