From: jsing Date: Fri, 2 May 2014 17:05:41 +0000 (+0000) Subject: Nuke OPENSSL_NO_SOCK since any half sane operating system has sockets. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=640e48e745e125bb63038bf3a9da5e271f23a6e4;p=openbsd Nuke OPENSSL_NO_SOCK since any half sane operating system has sockets. ok beck@ --- diff --git a/lib/libssl/bio_ssl.c b/lib/libssl/bio_ssl.c index 4c5c5ac3de9..96ba1ad09c0 100644 --- a/lib/libssl/bio_ssl.c +++ b/lib/libssl/bio_ssl.c @@ -509,7 +509,6 @@ ssl_puts(BIO *bp, const char *str) BIO * BIO_new_buffer_ssl_connect(SSL_CTX *ctx) { -#ifndef OPENSSL_NO_SOCK BIO *ret = NULL, *buf = NULL, *ssl = NULL; if ((buf = BIO_new(BIO_f_buffer())) == NULL) @@ -524,14 +523,12 @@ err: BIO_free(buf); if (ssl != NULL) BIO_free(ssl); -#endif return (NULL); } BIO * BIO_new_ssl_connect(SSL_CTX *ctx) { -#ifndef OPENSSL_NO_SOCK BIO *ret = NULL, *con = NULL, *ssl = NULL; if ((con = BIO_new(BIO_s_connect())) == NULL) @@ -544,7 +541,6 @@ BIO_new_ssl_connect(SSL_CTX *ctx) err: if (con != NULL) BIO_free(con); -#endif return (NULL); } diff --git a/lib/libssl/src/apps/ocsp.c b/lib/libssl/src/apps/ocsp.c index 5b296a96b71..461f21d6eb8 100644 --- a/lib/libssl/src/apps/ocsp.c +++ b/lib/libssl/src/apps/ocsp.c @@ -627,15 +627,10 @@ redo_accept: if (cbio) send_ocsp_response(cbio, resp); } else if (host) { -#ifndef OPENSSL_NO_SOCK resp = process_responder(bio_err, req, host, path, port, use_ssl, headers, req_timeout); if (!resp) goto end; -#else - BIO_printf(bio_err, "Error creating connect BIO - sockets not supported.\n"); - goto end; -#endif } else if (respin) { derbio = BIO_new_file(respin, "rb"); if (!derbio) { @@ -1019,11 +1014,7 @@ init_responder(char *port) bufbio = BIO_new(BIO_f_buffer()); if (!bufbio) goto err; -#ifndef OPENSSL_NO_SOCK acbio = BIO_new_accept(port); -#else - BIO_printf(bio_err, "Error setting up accept BIO - sockets not supported.\n"); -#endif if (!acbio) goto err; BIO_set_accept_bios(acbio, bufbio); diff --git a/lib/libssl/src/apps/progs.h b/lib/libssl/src/apps/progs.h index cbed562a4a0..59a7b787126 100644 --- a/lib/libssl/src/apps/progs.h +++ b/lib/libssl/src/apps/progs.h @@ -66,9 +66,7 @@ FUNCTION functions[] = { /* General functions. */ { FUNC_TYPE_GENERAL, "asn1parse", asn1parse_main }, { FUNC_TYPE_GENERAL, "ca", ca_main }, -#if !defined(OPENSSL_NO_SOCK) && !defined(OPENSSL_NO_SSL3) { FUNC_TYPE_GENERAL, "ciphers", ciphers_main }, -#endif #ifndef OPENSSL_NO_CMS { FUNC_TYPE_GENERAL, "cms", cms_main }, #endif @@ -97,15 +95,9 @@ FUNCTION functions[] = { { FUNC_TYPE_GENERAL, "prime", prime_main }, { FUNC_TYPE_GENERAL, "rand", rand_main }, { FUNC_TYPE_GENERAL, "req", req_main }, -#if !defined(OPENSSL_NO_SOCK) && !defined(OPENSSL_NO_SSL3) { FUNC_TYPE_GENERAL, "s_client", s_client_main }, -#endif -#if !defined(OPENSSL_NO_SOCK) && !defined(OPENSSL_NO_SSL3) { FUNC_TYPE_GENERAL, "s_server", s_server_main }, -#endif -#if !defined(OPENSSL_NO_SOCK) && !defined(OPENSSL_NO_SSL3) { FUNC_TYPE_GENERAL, "s_time", s_time_main }, -#endif { FUNC_TYPE_GENERAL, "sess_id", sess_id_main }, { FUNC_TYPE_GENERAL, "smime", smime_main }, #ifndef OPENSSL_NO_SPEED diff --git a/lib/libssl/src/apps/s_socket.c b/lib/libssl/src/apps/s_socket.c index a7336d60dcd..919ab40cd5b 100644 --- a/lib/libssl/src/apps/s_socket.c +++ b/lib/libssl/src/apps/s_socket.c @@ -72,7 +72,6 @@ #include "s_apps.h" #include -#ifndef OPENSSL_NO_SOCK static int ssl_sock_init(void); @@ -348,4 +347,3 @@ extract_port(char *str, short *port_ptr) } return (1); } -#endif diff --git a/lib/libssl/src/ssl/bio_ssl.c b/lib/libssl/src/ssl/bio_ssl.c index 4c5c5ac3de9..96ba1ad09c0 100644 --- a/lib/libssl/src/ssl/bio_ssl.c +++ b/lib/libssl/src/ssl/bio_ssl.c @@ -509,7 +509,6 @@ ssl_puts(BIO *bp, const char *str) BIO * BIO_new_buffer_ssl_connect(SSL_CTX *ctx) { -#ifndef OPENSSL_NO_SOCK BIO *ret = NULL, *buf = NULL, *ssl = NULL; if ((buf = BIO_new(BIO_f_buffer())) == NULL) @@ -524,14 +523,12 @@ err: BIO_free(buf); if (ssl != NULL) BIO_free(ssl); -#endif return (NULL); } BIO * BIO_new_ssl_connect(SSL_CTX *ctx) { -#ifndef OPENSSL_NO_SOCK BIO *ret = NULL, *con = NULL, *ssl = NULL; if ((con = BIO_new(BIO_s_connect())) == NULL) @@ -544,7 +541,6 @@ BIO_new_ssl_connect(SSL_CTX *ctx) err: if (con != NULL) BIO_free(con); -#endif return (NULL); } diff --git a/lib/libssl/src/ssl/ssl.h b/lib/libssl/src/ssl/ssl.h index 2325996f656..0e117dbca47 100644 --- a/lib/libssl/src/ssl/ssl.h +++ b/lib/libssl/src/ssl/ssl.h @@ -1657,11 +1657,9 @@ const char * SSL_get_cipher_list(const SSL *s, int n); char * SSL_get_shared_ciphers(const SSL *s, char *buf, int len); int SSL_get_read_ahead(const SSL * s); int SSL_pending(const SSL *s); -#ifndef OPENSSL_NO_SOCK int SSL_set_fd(SSL *s, int fd); int SSL_set_rfd(SSL *s, int fd); int SSL_set_wfd(SSL *s, int fd); -#endif #ifndef OPENSSL_NO_BIO void SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio); BIO * SSL_get_rbio(const SSL *s); diff --git a/lib/libssl/src/ssl/ssl_lib.c b/lib/libssl/src/ssl/ssl_lib.c index 21a48da182a..195271a554f 100644 --- a/lib/libssl/src/ssl/ssl_lib.c +++ b/lib/libssl/src/ssl/ssl_lib.c @@ -660,7 +660,6 @@ SSL_get_wfd(const SSL *s) return (ret); } -#ifndef OPENSSL_NO_SOCK int SSL_set_fd(SSL *s, int fd) { @@ -728,7 +727,6 @@ SSL_set_rfd(SSL *s, int fd) err: return (ret); } -#endif /* return length of latest Finished message we sent, copy to 'buf' */ diff --git a/lib/libssl/ssl.h b/lib/libssl/ssl.h index 2325996f656..0e117dbca47 100644 --- a/lib/libssl/ssl.h +++ b/lib/libssl/ssl.h @@ -1657,11 +1657,9 @@ const char * SSL_get_cipher_list(const SSL *s, int n); char * SSL_get_shared_ciphers(const SSL *s, char *buf, int len); int SSL_get_read_ahead(const SSL * s); int SSL_pending(const SSL *s); -#ifndef OPENSSL_NO_SOCK int SSL_set_fd(SSL *s, int fd); int SSL_set_rfd(SSL *s, int fd); int SSL_set_wfd(SSL *s, int fd); -#endif #ifndef OPENSSL_NO_BIO void SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio); BIO * SSL_get_rbio(const SSL *s); diff --git a/lib/libssl/ssl_lib.c b/lib/libssl/ssl_lib.c index 21a48da182a..195271a554f 100644 --- a/lib/libssl/ssl_lib.c +++ b/lib/libssl/ssl_lib.c @@ -660,7 +660,6 @@ SSL_get_wfd(const SSL *s) return (ret); } -#ifndef OPENSSL_NO_SOCK int SSL_set_fd(SSL *s, int fd) { @@ -728,7 +727,6 @@ SSL_set_rfd(SSL *s, int fd) err: return (ret); } -#endif /* return length of latest Finished message we sent, copy to 'buf' */