tschwecke / harvey

Easy and fast integration testing of RESTful web services
21 stars 9 forks source link

SSLv3 Issue #79

Closed delynn closed 9 years ago

delynn commented 9 years ago

I see the following error when attempting to run any tests that have the protocol set to HTTPS:

_tls_common.js:69
      this.context.init(secureProtocol);
                   ^
Error: SSLv3 methods disabled
    at Error (native)
    at new SecureContext (_tls_common.js:69:20)
    at Object.createSecureContext (_tls_common.js:90:11)
    at Object.exports.connect (_tls_wrap.js:852:21)
    at Agent.createConnection (https.js:82:14)
    at Agent.createSocket (_http_agent.js:194:16)
    at Agent.addRequest (_http_agent.js:166:23)
    at new ClientRequest (_http_client.js:154:16)
    at Object.exports.request (http.js:49:10)
    at Object.exports.request (https.js:136:15)

I chatted with @mac- and he seemed to think it was probably related to the Node version since there was a lot of changes for the Poodle virus a while ago. Any thoughts on which version of Node I should be using (currently 0.12.2), or if there is something that can be done with Harvey to correct this issue?

tschwecke commented 9 years ago

Hi DeLynn. I suspect Mac is right, that this is due to a change with node 0.12. I haven't come across this but I'm not running 12 anywhere yet. I'll try to take a look tonight or tomorrow.

tschwecke commented 9 years ago

I installed the latest node, v0.12.3, on Ubuntu 14.04 tonight and tried a simple test against an https endpoint, and it seemed to work. If your endpoint happens to be public can you send me a failing test that I can try to reproduce with. Also try running the test I used to see what happens:

{
    "tests": [{
        "id": "ssl_test",
        "request": {
            "method": "GET",
            "protocol": "https",
            "host": "google.com",
            "resource": "/"
        },
        "expectedResponse": {
            "statusCode": 200
        }
    }]
}
delynn commented 9 years ago

I was using the same basic test on 0.12.2 and it was failing. I just tried 0.12.3 and it's working for me as well. I have heard of other issues with 0.12.2, so I'm gonna chalk up this issue to the old version and close for now. Thanks for looking into this!