Supertest: Supertest failing on SSL/HTTPS

Created on 14 Mar 2014  路  3Comments  路  Source: visionmedia/supertest

this is what I'm getting when I'm trying to hit a box with a self signed certificate for testing

Error: 140735125684608:error:140773F2:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert unexpected message:../deps/openssl/openssl/ssl/s23_clnt.c:741:

Most helpful comment

All 3 comments

Please add example and reopen.

var should = require('should'),
request = require('supertest'),
express = require('express');
describe('login', function() {
it('should login', function(done) {
var user = {"username":"test","password":"test"};
request('https://localhost')
.post('/login')
.set('Content-Type', 'application/json')
.send(user)
.expect(200, done);
});
})

//error
1) login should login:
Error: DEPTH_ZERO_SELF_SIGNED_CERT
at SecurePair. (tls.js:1370:32)
at SecurePair.EventEmitter.emit (events.js:92:17)
at SecurePair.maybeInitFinished (tls.js:982:10)
at CleartextStream.read as _read
at CleartextStream.Readable.read (_stream_readable.js:320:10)
at EncryptedStream.write as _write
at doWrite (_stream_writable.js:226:10)
at writeOrBuffer (_stream_writable.js:216:5)
at EncryptedStream.Writable.write (_stream_writable.js:183:11)
at write (_stream_readable.js:582:24)
at flow (_stream_readable.js:591:7)
at Socket.pipeOnReadable (_stream_readable.js:623:5)
at Socket.EventEmitter.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:407:10)
at emitReadable (_stream_readable.js:403:5)
at readableAddChunk (_stream_readable.js:165:9)
at Socket.Readable.push (_stream_readable.js:127:10)
at TCP.onread (net.js:528:21)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nitrocode picture nitrocode  路  4Comments

DeaconDesperado picture DeaconDesperado  路  6Comments

mickaeltr picture mickaeltr  路  3Comments

jonathanong picture jonathanong  路  4Comments

lovelydreamer picture lovelydreamer  路  4Comments