diff options
| author | Michael Brown | 2007-07-30 03:48:38 +0200 |
|---|---|---|
| committer | Michael Brown | 2007-07-30 03:48:38 +0200 |
| commit | 6fc9ed167e3f8bd3fc94cd2e21bd108f90a736d6 (patch) | |
| tree | c0149a39b80eac0f931a0ac9dff383e37efbc408 /src/net/tcp | |
| parent | Upgrade AXTLS import to version 1.1.5-a (diff) | |
| download | ipxe-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.c | 17 |
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 ); |
