--- SSLeay.xs.orig 2006-12-08 16:12:28.000000000 -0800 +++ SSLeay.xs 2006-12-08 16:19:51.000000000 -0800 @@ -107,7 +107,7 @@ int rand_bytes_read; if(!bNotFirstTime) { - SSLeay_add_all_algorithms(); + SSLeay_add_ssl_algorithms(); SSL_load_error_strings(); ERR_load_crypto_strings(); bNotFirstTime = 1; @@ -130,6 +130,12 @@ /* v2 is the default */ ctx = SSL_CTX_new(SSLv2_client_method()); } + + if(!ctx) { + ERR_error_string_n(ERR_get_error(),buf,sizeof(buf)/sizeof(*buf)); + croak(buf); + } + SSL_CTX_set_options(ctx,SSL_OP_ALL|0); SSL_CTX_set_default_verify_paths(ctx);