Mercurial > pidgin.yaz
diff libpurple/sslconn.h @ 27631:bff61dad9a6b
Add purple_ssl_connect_with_ssl_cn, which takes a host to connect to
in addition to a string with which to validate the SSL certificate.
Useful for OSCAR (and XMPP BOSH soon), where we have an IP to connect
to, but need to validate the SSL cert.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Wed, 15 Jul 2009 16:57:33 +0000 |
parents | 4b8c4870b13a |
children | 12f5a7916131 |
line wrap: on
line diff
--- a/libpurple/sslconn.h Wed Jul 15 15:32:11 2009 +0000 +++ b/libpurple/sslconn.h Wed Jul 15 16:57:33 2009 +0000 @@ -186,6 +186,30 @@ PurpleSslErrorFunction error_func, void *data); +/** + * Makes a SSL connection to the specified host and port, using the separate + * name to verify with the certificate. The caller should keep track of the + * returned value and use it to cancel the connection, if needed. + * + * @param account The account making the connection. + * @param host The destination host. + * @param port The destination port. + * @param func The SSL input handler function. + * @param error_func The SSL error handler function. This function + * should <strong>NOT</strong> call purple_ssl_close(). In + * the event of an error the #PurpleSslConnection will be + * destroyed for you. + * @param ssl_host The hostname of the other peer (to verify the CN) + * @param data User-defined data. + * + * @return The SSL connection handle. + */ +PurpleSslConnection *purple_ssl_connect_with_ssl_cn(PurpleAccount *account, const char *host, + int port, PurpleSslInputFunction func, + PurpleSslErrorFunction error_func, + const char *ssl_host, + void *data); + #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_SSLCONN_C_) /** * Makes a SSL connection using an already open file descriptor.