# HG changeset patch # User Timo Sirainen # Date 1241023248 14400 # Node ID d475e17d01a38d98b47de782427b3fa16709f1ce # Parent f43bebab3dac1b7433d7d5e2b8c3444ee0d783ea ssl-proxy: Crashfix to previous commit. diff -r f43bebab3dac -r d475e17d01a3 src/login-common/ssl-proxy-openssl.c --- a/src/login-common/ssl-proxy-openssl.c Tue Apr 28 22:31:40 2009 -0400 +++ b/src/login-common/ssl-proxy-openssl.c Wed Apr 29 12:40:48 2009 -0400 @@ -50,7 +50,7 @@ unsigned int sslout_size; ssl_handshake_callback_t *handshake_callback; - void *handshake_callback_context; + void *handshake_context; char *last_error; unsigned int handshaked:1; @@ -420,8 +420,10 @@ ssl_set_io(proxy, SSL_ADD_INPUT); plain_block_input(proxy, FALSE); - if (proxy->handshake_callback(proxy->handshake_callback_context) < 0) - ssl_proxy_destroy(proxy); + if (proxy->handshake_callback != NULL) { + if (proxy->handshake_callback(proxy->handshake_context) < 0) + ssl_proxy_destroy(proxy); + } } static void ssl_read(struct ssl_proxy *proxy) @@ -567,7 +569,7 @@ return -1; (*proxy_r)->handshake_callback = callback; - (*proxy_r)->handshake_callback_context = context; + (*proxy_r)->handshake_context = context; (*proxy_r)->client = TRUE; ssl_step(*proxy_r); return ret;