summaryrefslogtreecommitdiffstats
path: root/src/net/tcp
diff options
context:
space:
mode:
authorMichael Brown2007-07-30 03:48:38 +0200
committerMichael Brown2007-07-30 03:48:38 +0200
commit6fc9ed167e3f8bd3fc94cd2e21bd108f90a736d6 (patch)
treec0149a39b80eac0f931a0ac9dff383e37efbc408 /src/net/tcp
parentUpgrade AXTLS import to version 1.1.5-a (diff)
downloadipxe-6fc9ed167e3f8bd3fc94cd2e21bd108f90a736d6.tar.gz
ipxe-6fc9ed167e3f8bd3fc94cd2e21bd108f90a736d6.tar.xz
ipxe-6fc9ed167e3f8bd3fc94cd2e21bd108f90a736d6.zip
TLS now working again.
Diffstat (limited to 'src/net/tcp')
-rw-r--r--src/net/tcp/http.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/net/tcp/http.c b/src/net/tcp/http.c
index 9c2436816..bdd791ebb 100644
--- a/src/net/tcp/http.c
+++ b/src/net/tcp/http.c
@@ -468,6 +468,7 @@ static struct xfer_interface_operations http_xfer_operations = {
static int http_open ( struct xfer_interface *xfer, struct uri *uri ) {
struct http_request *http;
struct sockaddr_tcpip server;
+ struct xfer_interface *socket;
int rc;
/* Sanity checks */
@@ -487,18 +488,16 @@ static int http_open ( struct xfer_interface *xfer, struct uri *uri ) {
/* Open socket */
memset ( &server, 0, sizeof ( server ) );
server.st_port = htons ( uri_port ( http->uri, HTTP_PORT ) );
- if ( ( rc = xfer_open_named_socket ( &http->socket, SOCK_STREAM,
- ( struct sockaddr * ) &server,
- uri->host, NULL ) ) != 0 )
- goto err;
-
-#if 0
+ socket = &http->socket;
if ( strcmp ( http->uri->scheme, "https" ) == 0 ) {
- st->st_port = htons ( uri_port ( http->uri, HTTPS_PORT ) );
- if ( ( rc = add_tls ( &http->stream ) ) != 0 )
+ server.st_port = htons ( uri_port ( http->uri, HTTPS_PORT ) );
+ if ( ( rc = add_tls ( socket, &socket ) ) != 0 )
goto err;
}
-#endif
+ if ( ( rc = xfer_open_named_socket ( socket, SOCK_STREAM,
+ ( struct sockaddr * ) &server,
+ uri->host, NULL ) ) != 0 )
+ goto err;
/* Attach to parent interface, mortalise self, and return */
xfer_plug_plug ( &http->xfer, xfer );