diff options
author | Joe Shaw <joe@ximian.com> | 2002-07-24 18:40:48 +0000 |
---|---|---|
committer | Joe Shaw <joeshaw@src.gnome.org> | 2002-07-24 18:40:48 +0000 |
commit | a7834a0529ad849f993ab2f528172ce7d982f76b (patch) | |
tree | 39828e06e3b9f43f43ad3955a8b652024bbca522 /libsoup/soup-nss.h | |
parent | c35996871a030a442f66ba3da5451ea237f64bb2 (diff) | |
download | libsoup-a7834a0529ad849f993ab2f528172ce7d982f76b.tar.gz |
Check the server mode and set up a client or server handshake
2002-07-24 Joe Shaw <joe@ximian.com>
* src/libsoup/soup-nss.c: Check the server mode and set up a
client or server handshake appropriately.
* src/libsoup/soup-server.c (destroy_message): If we're supposed
to close the connection, go ahead and close it.
(message_new): Set the method to NULL, or else we'll segfault
later.
(conn_accept): Call soup_ssl_get_server_iochannel() instead.
* src/libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Added.
Does all of the heavy lifting from soup_ssl_get_iochannel().
Takes an argument for the SSL handshake type (client or server).
Set IS_SERVER env var for the proxy if we are in server mode.
When checking for the HUP, also get G_IO_ERR and G_IO_NVAL.
Remove an extraneous ref.
(soup_ssl_get_iochannel): Just a wrapper around the above for the
client.
(soup_ssl_get_server_iochannel): Added. A server-mode wrapper
around the above.
* src/soup-ssl-proxy/soup-openssl.c: Add a server mode global.
(soup_openssl_write): if result is 0, return a G_IO_STATUS_EOF.
(soup_openssl_get_iochannel): If we're in server mode, call
SSL_accept() and SSL_connect() if we're in client mode.
(soup_openssl_init): If we're in server mode, set it on the SSL
context.
* src/soup-ssl-proxy/soup-ssl-proxy.c (main): If SOUP_PROXY_DELAY
is set, sleep for 20 seconds so we can attach gdb to it. Listen
for G_IO_PRI messages as well.
Diffstat (limited to 'libsoup/soup-nss.h')
-rw-r--r-- | libsoup/soup-nss.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libsoup/soup-nss.h b/libsoup/soup-nss.h index 1aaa0a45..2288144d 100644 --- a/libsoup/soup-nss.h +++ b/libsoup/soup-nss.h @@ -13,8 +13,9 @@ #include <glib.h> #include <libsoup/soup-misc.h> +#include <libsoup/soup-ssl.h> -GIOChannel *soup_nss_get_iochannel (GIOChannel *sock); +GIOChannel *soup_nss_get_iochannel (GIOChannel *sock, SoupSSLType type); void soup_nss_set_security_policy (SoupSecurityPolicy policy); |