Software / code / prosody
Comparison
net/http.lua @ 5354:18ebc3874364
net.http: Disable SSLv2 support for HTTPS connections
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Wed, 20 Mar 2013 20:31:52 +0000 |
| parent | 5353:8c3f28f5c1c1 |
| child | 5448:cbe9fa2d3787 |
comparison
equal
deleted
inserted
replaced
| 5353:8c3f28f5c1c1 | 5354:18ebc3874364 |
|---|---|
| 188 return nil, err; | 188 return nil, err; |
| 189 end | 189 end |
| 190 | 190 |
| 191 local sslctx = false; | 191 local sslctx = false; |
| 192 if using_https then | 192 if using_https then |
| 193 sslctx = ex and ex.sslctx or { mode = "client", protocol = "sslv23" }; | 193 sslctx = ex and ex.sslctx or { mode = "client", protocol = "sslv23", options = { "no_sslv2" } }; |
| 194 end | 194 end |
| 195 | 195 |
| 196 req.handler, req.conn = server.wrapclient(conn, req.host, port, listener, "*a", sslctx); | 196 req.handler, req.conn = server.wrapclient(conn, req.host, port, listener, "*a", sslctx); |
| 197 req.write = function (...) return req.handler:write(...); end | 197 req.write = function (...) return req.handler:write(...); end |
| 198 | 198 |