Changeset 6181
- Timestamp:
- 05/22/10 10:00:53 (3 years ago)
- Location:
- luci2/libustream
- Files:
-
- 2 modified
-
protocol/http.c (modified) (2 diffs)
-
tls.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
luci2/libustream/protocol/http.c
r6180 r6181 121 121 ustream_uhtbl_set(&http->header, "Connection", "close", 5); 122 122 123 if (stream->handler == &handler_https 124 && !(http->ssl = ustream_tls_new())) { 125 return -errno; 126 } 127 123 128 return 0; 124 129 } … … 147 152 148 153 if (stream->handler == &handler_https) { 149 if (!http->ssl) { 150 if (!(http->ssl = ustream_tls_new(http->socket))) { 151 close(http->socket); 152 goto error; 153 } 154 } 154 SSL_set_fd(http->ssl, http->socket); 155 155 int stat; 156 156 if ((stat = SSL_connect(http->ssl)) <= 0) { -
luci2/libustream/tls.c
r6160 r6181 78 78 } 79 79 80 USTREAM_LOCAL SSL* ustream_tls_new(int fd) { 81 SSL *ssl = SSL_new(ctx); 82 if (ssl) { 83 SSL_set_fd(ssl, fd); 84 } 85 return ssl; 80 USTREAM_LOCAL SSL* ustream_tls_new() { 81 return SSL_new(ctx); 86 82 }
