Problems with ssl in nodejs

1

Hi, I'm new to nodejs, I'm doing a project with socket.io and I need to connect securely with https, but I can not make the SSL certificate work.

this is what I have:

var fs =    require('fs');
    var socket  = require('socket.io' );//forma de conectarse
    var options = {
        key: fs.readFileSync('ssl/servidor.key'),
        cert: fs.readFileSync('ssl/servidor.crt'),
        ca: fs.readFileSync('ssl/sca.server1.crt')
    };
    var express = require( 'express');
    var app= express();
    var server  = require( 'https' ).createServer(options ,app );///tipo de conexion
    var io      = socket.listen( server );//establecer canal

The certificate was obtained from StarCom, but the label says "This server could not prove it is Domain_name; The operating system of your computer does not trust your security certificate. I checked with link and it shows me that the certificate is well installed. I hope you have explained me well and I would greatly appreciate your help!

    
asked by german Garcia Gutierrez 04.03.2017 в 01:22
source

1 answer

1

Well everything indicates that the problem was the certificate, I got a certificate for a month (free) and the same configuration and it ALREADY WORKS !!. Now it only remains to buy a certificate for more time.

    
answered by 04.03.2017 в 21:20