🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssl-certs

load ssl certs for https

1.0.0
latest
Version published
Weekly downloads
1
-80%
Maintainers
1
Weekly downloads
 
Created

ssl-certs

load ssl certs for https

install ca

opensuse

https://github.com/openSUSE/ca-certificates

  • /usr/share/pki/trust/anchors放CA文件
  • update-ca-certificates

other linux

  • 在 /usr/share/ca-certificates/ 目录下创建单独的目录来保存您的CA证书文件
  • 在 /etc/ca-certificates.conf文件中添加一行
  • update-ca-certificates

not support windows

use

var https = require('https');
require('ssl-certs');

//process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";

var url = require('url')
this.parsed = url.parse('https://YOUSERVER');


var get = https.get({
    host: this.parsed.hostname,
    port: this.parsed.port,
    path: url.format({
        pathname: this.parsed.pathname + '/serviceValidate',
        query: {
            ticket: 'ST-AAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBB',
            service: 'https://TESTHOSTSERVER/cas_login'
        }
    })
}, function() {
    return console.log(this.parsed.pathname + ' ok');
});

get.on('error', function(e) {
    return console.log(e);
});

options

NODE_SSL_CERTS_DISABLED : default false NODE_SSL_CERTS_GLOB : default /etc/ssl/certs/*.pem

Keywords

FAQs

Package last updated on 26 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts