cloudhead/cradle — Issue #151: SSL error on secure connection
Author: jlporter
Created: 2012-02-26 15:11:38+00:00
State: open

I recently tried to update to cradle 0.6.1 from 0.5.8 and am getting SSL errors when attempting to connect to my Cloudant hosted DB. Here is the test program I am using.

```javascript
var http = require('http');
var cradle = require('cradle');

var cradleService = new(cradle.Connection)('app1234567.heroku.cloudant.com', 443, {
secure: true,
auth: {username: 'app1234567.heroku', password: 'notreallymypassword'}
});

cradleService.info(function (info) {
console.log('callback');
console.log(info);
});

http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World');
}).listen(5000, '127.0.0.1');
```

When I run this, the callback from info (or any of the other cradle API function) has the following error message
```[Error: 140735330154848:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:683:
]```