• 3

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Node.js SSL: Invalid Certificate

I am trying to apply SSL layer to a node.js server.

Following are the steps I have done

  1. Created all the ssl resources using this blog
  2. Followed the instructions given in here to start my node.js server without entering the pem passphrase
  3. My node.js code is

    var app = express();

    var options = { key: fs.readFileSync('./sslCA/server.key'), cert: fs.readFileSync('./sslCA/server.crt'), ca: fs.readFileSync('./sslCA/ca.crt'), requestCert: true, rejectUnauthorized: false };

    app.set('port', process.env.PORT || 3000); app.set('views', __dirname + '/views'); app.set('view engine', 'jade'); app.set('view options', { layout: false}); app.use(express.favicon()); app.use(express.logger('dev')); app.use(express.bodyParser()); app.use(express.methodOverride());

    app.use(express.static(path.join(__dirname, 'public')));

    https.createServer(options,app).listen(app.get('port'), function(){ console.log('Express server listening on port ' + app.get('port')); });

When I point my IE10 browser to localhost I get the error

There is a problem with this website's security certificate.

The security certificate presented by this website is not secure.

Security certificate problems may indicate an attempt to fool you or intercept any data you send to the server.  

We recommend that you close this webpage and do not continue to this website.  

When I point my chrome browser to localhost I get the error

Invalid Server Certificate
You attempted to reach localhost, but the server presented an invalid certificate

Please help me understand what I have done wrong.

Trending Tags