X Tutup
{ "type": "module", "source": "doc/api/https.md", "modules": [ { "textRaw": "HTTPS", "name": "https", "introduced_in": "v0.10.0", "type": "module", "stability": 2, "stabilityText": "Stable", "desc": "

HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a\nseparate module.

", "modules": [ { "textRaw": "Determining if crypto support is unavailable", "name": "determining_if_crypto_support_is_unavailable", "type": "module", "desc": "

It is possible for Node.js to be built without including support for the\nnode:crypto module. In such cases, attempting to import from https or\ncalling require('node:https') will result in an error being thrown.

\n

When using CommonJS, the error thrown can be caught using try/catch:

\n
let https;\ntry {\n  https = require('node:https');\n} catch (err) {\n  console.error('https support is disabled!');\n}\n
\n

When using the lexical ESM import keyword, the error can only be\ncaught if a handler for process.on('uncaughtException') is registered\nbefore any attempt to load the module is made (using, for instance,\na preload module).

\n

When using ESM, if there is a chance that the code may be run on a build\nof Node.js where crypto support is not enabled, consider using the\nimport() function instead of the lexical import keyword:

\n
let https;\ntry {\n  https = await import('node:https');\n} catch (err) {\n  console.error('https support is disabled!');\n}\n
", "displayName": "Determining if crypto support is unavailable" } ], "classes": [ { "textRaw": "Class: `https.Agent`", "name": "https.Agent", "type": "class", "meta": { "added": [ "v0.4.5" ], "changes": [ { "version": "v5.3.0", "pr-url": "https://github.com/nodejs/node/pull/4252", "description": "support `0` `maxCachedSessions` to disable TLS session caching." }, { "version": "v2.5.0", "pr-url": "https://github.com/nodejs/node/pull/2228", "description": "parameter `maxCachedSessions` added to `options` for TLS sessions reuse." } ] }, "desc": "

An Agent object for HTTPS similar to http.Agent. See\nhttps.request() for more information.

\n

Like http.Agent, the createConnection(options[, callback]) method can be overridden\nto customize how TLS connections are established.

\n
\n

See agent.createConnection() for details on overriding this method,\nincluding asynchronous socket creation with a callback.

\n
", "signatures": [ { "textRaw": "`new Agent([options])`", "name": "Agent", "type": "ctor", "meta": { "changes": [ { "version": [ "v24.5.0" ], "pr-url": "https://github.com/nodejs/node/pull/58980", "description": "Add support for `proxyEnv`." }, { "version": [ "v24.5.0" ], "pr-url": "https://github.com/nodejs/node/pull/58980", "description": "Add support for `defaultPort` and `protocol`." }, { "version": "v12.5.0", "pr-url": "https://github.com/nodejs/node/pull/28209", "description": "do not automatically set servername if the target host was specified using an IP address." } ] }, "params": [ { "textRaw": "`options` {Object} Set of configurable options to set on the agent. Can have the same fields as for `http.Agent(options)`, and", "name": "options", "type": "Object", "desc": "Set of configurable options to set on the agent. Can have the same fields as for `http.Agent(options)`, and", "options": [ { "textRaw": "`maxCachedSessions` {number} maximum number of TLS cached sessions. Use `0` to disable TLS session caching. **Default:** `100`.", "name": "maxCachedSessions", "type": "number", "default": "`100`", "desc": "maximum number of TLS cached sessions. Use `0` to disable TLS session caching." }, { "textRaw": "`servername` {string} the value of Server Name Indication extension to be sent to the server. Use empty string `''` to disable sending the extension. **Default:** host name of the target server, unless the target server is specified using an IP address, in which case the default is `''` (no extension).See `Session Resumption` for information about TLS session reuse.", "name": "servername", "type": "string", "default": "host name of the target server, unless the target server is specified using an IP address, in which case the default is `''` (no extension).See `Session Resumption` for information about TLS session reuse", "desc": "the value of Server Name Indication extension to be sent to the server. Use empty string `''` to disable sending the extension." } ], "optional": true } ], "events": [ { "textRaw": "Event: `'keylog'`", "name": "keylog", "type": "event", "meta": { "added": [ "v13.2.0", "v12.16.0" ], "changes": [] }, "params": [ { "textRaw": "`line` {Buffer} Line of ASCII text, in NSS `SSLKEYLOGFILE` format.", "name": "line", "type": "Buffer", "desc": "Line of ASCII text, in NSS `SSLKEYLOGFILE` format." }, { "textRaw": "`tlsSocket` {tls.TLSSocket} The `tls.TLSSocket` instance on which it was generated.", "name": "tlsSocket", "type": "tls.TLSSocket", "desc": "The `tls.TLSSocket` instance on which it was generated." } ], "desc": "

The keylog event is emitted when key material is generated or received by a\nconnection managed by this agent (typically before handshake has completed, but\nnot necessarily). This keying material can be stored for debugging, as it\nallows captured TLS traffic to be decrypted. It may be emitted multiple times\nfor each socket.

\n

A typical use case is to append received lines to a common text file, which is\nlater used by software (such as Wireshark) to decrypt the traffic:

\n
// ...\nhttps.globalAgent.on('keylog', (line, tlsSocket) => {\n  fs.appendFileSync('/tmp/ssl-keys.log', line, { mode: 0o600 });\n});\n
" } ] } ] }, { "textRaw": "Class: `https.Server`", "name": "https.Server", "type": "class", "meta": { "added": [ "v0.3.4" ], "changes": [] }, "desc": "\n

See http.Server for more information.

", "methods": [ { "textRaw": "`server.close([callback])`", "name": "close", "type": "method", "meta": { "added": [ "v0.1.90" ], "changes": [] }, "signatures": [ { "params": [ { "textRaw": "`callback` {Function}", "name": "callback", "type": "Function", "optional": true } ], "return": { "textRaw": "Returns: {https.Server}", "name": "return", "type": "https.Server" } } ], "desc": "

See server.close() in the node:http module.

" }, { "textRaw": "`server[Symbol.asyncDispose]()`", "name": "[Symbol.asyncDispose]", "type": "method", "meta": { "added": [ "v20.4.0" ], "changes": [ { "version": "v24.2.0", "pr-url": "https://github.com/nodejs/node/pull/58467", "description": "No longer experimental." } ] }, "signatures": [ { "params": [] } ], "desc": "

Calls server.close() and returns a promise that\nfulfills when the server has closed.

" }, { "textRaw": "`server.closeAllConnections()`", "name": "closeAllConnections", "type": "method", "meta": { "added": [ "v18.2.0" ], "changes": [] }, "signatures": [ { "params": [] } ], "desc": "

See server.closeAllConnections() in the node:http module.

" }, { "textRaw": "`server.closeIdleConnections()`", "name": "closeIdleConnections", "type": "method", "meta": { "added": [ "v18.2.0" ], "changes": [] }, "signatures": [ { "params": [] } ], "desc": "

See server.closeIdleConnections() in the node:http module.

" }, { "textRaw": "`server.listen()`", "name": "listen", "type": "method", "signatures": [ { "params": [] } ], "desc": "

Starts the HTTPS server listening for encrypted connections.\nThis method is identical to server.listen() from net.Server.

" }, { "textRaw": "`server.setTimeout([msecs][, callback])`", "name": "setTimeout", "type": "method", "meta": { "added": [ "v0.11.2" ], "changes": [] }, "signatures": [ { "params": [ { "textRaw": "`msecs` {number} **Default:** `120000` (2 minutes)", "name": "msecs", "type": "number", "default": "`120000` (2 minutes)", "optional": true }, { "textRaw": "`callback` {Function}", "name": "callback", "type": "Function", "optional": true } ], "return": { "textRaw": "Returns: {https.Server}", "name": "return", "type": "https.Server" } } ], "desc": "

See server.setTimeout() in the node:http module.

" } ], "properties": [ { "textRaw": "Type: {number} **Default:** `60000`", "name": "headersTimeout", "type": "number", "meta": { "added": [ "v11.3.0" ], "changes": [] }, "default": "`60000`", "desc": "

See server.headersTimeout in the node:http module.

" }, { "textRaw": "Type: {number} **Default:** `2000`", "name": "maxHeadersCount", "type": "number", "default": "`2000`", "desc": "

See server.maxHeadersCount in the node:http module.

" }, { "textRaw": "Type: {number} **Default:** `300000`", "name": "requestTimeout", "type": "number", "meta": { "added": [ "v14.11.0" ], "changes": [ { "version": "v18.0.0", "pr-url": "https://github.com/nodejs/node/pull/41263", "description": "The default request timeout changed from no timeout to 300s (5 minutes)." } ] }, "default": "`300000`", "desc": "

See server.requestTimeout in the node:http module.

" }, { "textRaw": "Type: {number} **Default:** 0 (no timeout)", "name": "timeout", "type": "number", "meta": { "added": [ "v0.11.2" ], "changes": [ { "version": "v13.0.0", "pr-url": "https://github.com/nodejs/node/pull/27558", "description": "The default timeout changed from 120s to 0 (no timeout)." } ] }, "default": "0 (no timeout)", "desc": "

See server.timeout in the node:http module.

" }, { "textRaw": "Type: {number} **Default:** `5000` (5 seconds)", "name": "keepAliveTimeout", "type": "number", "meta": { "added": [ "v8.0.0" ], "changes": [] }, "default": "`5000` (5 seconds)", "desc": "

See server.keepAliveTimeout in the node:http module.

" } ] } ], "methods": [ { "textRaw": "`https.createServer([options][, requestListener])`", "name": "createServer", "type": "method", "meta": { "added": [ "v0.3.4" ], "changes": [] }, "signatures": [ { "params": [ { "textRaw": "`options` {Object} Accepts `options` from `tls.createServer()`, `tls.createSecureContext()` and `http.createServer()`.", "name": "options", "type": "Object", "desc": "Accepts `options` from `tls.createServer()`, `tls.createSecureContext()` and `http.createServer()`.", "optional": true }, { "textRaw": "`requestListener` {Function} A listener to be added to the `'request'` event.", "name": "requestListener", "type": "Function", "desc": "A listener to be added to the `'request'` event.", "optional": true } ], "return": { "textRaw": "Returns: {https.Server}", "name": "return", "type": "https.Server" } } ], "desc": "
// curl -k https://localhost:8000/\nimport { createServer } from 'node:https';\nimport { readFileSync } from 'node:fs';\n\nconst options = {\n  key: readFileSync('private-key.pem'),\n  cert: readFileSync('certificate.pem'),\n};\n\ncreateServer(options, (req, res) => {\n  res.writeHead(200);\n  res.end('hello world\\n');\n}).listen(8000);\n
\n
// curl -k https://localhost:8000/\nconst https = require('node:https');\nconst fs = require('node:fs');\n\nconst options = {\n  key: fs.readFileSync('private-key.pem'),\n  cert: fs.readFileSync('certificate.pem'),\n};\n\nhttps.createServer(options, (req, res) => {\n  res.writeHead(200);\n  res.end('hello world\\n');\n}).listen(8000);\n
\n

Or

\n
import { createServer } from 'node:https';\nimport { readFileSync } from 'node:fs';\n\nconst options = {\n  pfx: readFileSync('test_cert.pfx'),\n  passphrase: 'sample',\n};\n\ncreateServer(options, (req, res) => {\n  res.writeHead(200);\n  res.end('hello world\\n');\n}).listen(8000);\n
\n
const https = require('node:https');\nconst fs = require('node:fs');\n\nconst options = {\n  pfx: fs.readFileSync('test_cert.pfx'),\n  passphrase: 'sample',\n};\n\nhttps.createServer(options, (req, res) => {\n  res.writeHead(200);\n  res.end('hello world\\n');\n}).listen(8000);\n
\n

To generate the certificate and key for this example, run:

\n
openssl req -x509 -newkey rsa:2048 -nodes -sha256 -subj '/CN=localhost' \\\n  -keyout private-key.pem -out certificate.pem\n
\n

Then, to generate the pfx certificate for this example, run:

\n
openssl pkcs12 -certpbe AES-256-CBC -export -out test_cert.pfx \\\n  -inkey private-key.pem -in certificate.pem -passout pass:sample\n
" }, { "textRaw": "`https.get(options[, callback])`", "name": "get", "type": "method", "signatures": [ { "params": [ { "name": "options" }, { "name": "callback", "optional": true } ] } ] }, { "textRaw": "`https.get(url[, options][, callback])`", "name": "get", "type": "method", "meta": { "added": [ "v0.3.6" ], "changes": [ { "version": "v10.9.0", "pr-url": "https://github.com/nodejs/node/pull/21616", "description": "The `url` parameter can now be passed along with a separate `options` object." }, { "version": "v7.5.0", "pr-url": "https://github.com/nodejs/node/pull/10638", "description": "The `options` parameter can be a WHATWG `URL` object." } ] }, "signatures": [ { "params": [ { "textRaw": "`url` {string|URL}", "name": "url", "type": "string|URL" }, { "textRaw": "`options` {Object|string|URL} Accepts the same `options` as `https.request()`, with the method set to GET by default.", "name": "options", "type": "Object|string|URL", "desc": "Accepts the same `options` as `https.request()`, with the method set to GET by default.", "optional": true }, { "textRaw": "`callback` {Function}", "name": "callback", "type": "Function", "optional": true } ], "return": { "textRaw": "Returns: {http.ClientRequest}", "name": "return", "type": "http.ClientRequest" } } ], "desc": "

Like http.get() but for HTTPS.

\n

options can be an object, a string, or a URL object. If options is a\nstring, it is automatically parsed with new URL(). If it is a URL\nobject, it will be automatically converted to an ordinary options object.

\n
import { get } from 'node:https';\nimport process from 'node:process';\n\nget('https://encrypted.google.com/', (res) => {\n  console.log('statusCode:', res.statusCode);\n  console.log('headers:', res.headers);\n\n  res.on('data', (d) => {\n    process.stdout.write(d);\n  });\n\n}).on('error', (e) => {\n  console.error(e);\n});\n
\n
const https = require('node:https');\n\nhttps.get('https://encrypted.google.com/', (res) => {\n  console.log('statusCode:', res.statusCode);\n  console.log('headers:', res.headers);\n\n  res.on('data', (d) => {\n    process.stdout.write(d);\n  });\n\n}).on('error', (e) => {\n  console.error(e);\n});\n
" }, { "textRaw": "`https.request(options[, callback])`", "name": "request", "type": "method", "signatures": [ { "params": [ { "name": "options" }, { "name": "callback", "optional": true } ] } ] }, { "textRaw": "`https.request(url[, options][, callback])`", "name": "request", "type": "method", "meta": { "added": [ "v0.3.6" ], "changes": [ { "version": [ "v22.4.0", "v20.16.0" ], "pr-url": "https://github.com/nodejs/node/pull/53329", "description": "The `clientCertEngine` option depends on custom engine support in OpenSSL which is deprecated in OpenSSL 3." }, { "version": [ "v16.7.0", "v14.18.0" ], "pr-url": "https://github.com/nodejs/node/pull/39310", "description": "When using a `URL` object parsed username and password will now be properly URI decoded." }, { "version": [ "v14.1.0", "v13.14.0" ], "pr-url": "https://github.com/nodejs/node/pull/32786", "description": "The `highWaterMark` option is accepted now." }, { "version": "v10.9.0", "pr-url": "https://github.com/nodejs/node/pull/21616", "description": "The `url` parameter can now be passed along with a separate `options` object." }, { "version": "v9.3.0", "pr-url": "https://github.com/nodejs/node/pull/14903", "description": "The `options` parameter can now include `clientCertEngine`." }, { "version": "v7.5.0", "pr-url": "https://github.com/nodejs/node/pull/10638", "description": "The `options` parameter can be a WHATWG `URL` object." } ] }, "signatures": [ { "params": [ { "textRaw": "`url` {string|URL}", "name": "url", "type": "string|URL" }, { "textRaw": "`options` {Object|string|URL} Accepts all `options` from `http.request()`, with some differences in default values:", "name": "options", "type": "Object|string|URL", "desc": "Accepts all `options` from `http.request()`, with some differences in default values:", "options": [ { "textRaw": "`protocol` **Default:** `'https:'`", "name": "protocol", "default": "`'https:'`" }, { "textRaw": "`port` **Default:** `443`", "name": "port", "default": "`443`" }, { "textRaw": "`agent` **Default:** `https.globalAgent`", "name": "agent", "default": "`https.globalAgent`" } ], "optional": true }, { "textRaw": "`callback` {Function}", "name": "callback", "type": "Function", "optional": true } ], "return": { "textRaw": "Returns: {http.ClientRequest}", "name": "return", "type": "http.ClientRequest" } } ], "desc": "

Makes a request to a secure web server.

\n

The following additional options from tls.connect() are also accepted:\nca, cert, ciphers, clientCertEngine (deprecated), crl, dhparam, ecdhCurve,\nhonorCipherOrder, key, passphrase, pfx, rejectUnauthorized,\nsecureOptions, secureProtocol, servername, sessionIdContext,\nhighWaterMark.

\n

options can be an object, a string, or a URL object. If options is a\nstring, it is automatically parsed with new URL(). If it is a URL\nobject, it will be automatically converted to an ordinary options object.

\n

https.request() returns an instance of the http.ClientRequest\nclass. The ClientRequest instance is a writable stream. If one needs to\nupload a file with a POST request, then write to the ClientRequest object.

\n
import { request } from 'node:https';\nimport process from 'node:process';\n\nconst options = {\n  hostname: 'encrypted.google.com',\n  port: 443,\n  path: '/',\n  method: 'GET',\n};\n\nconst req = request(options, (res) => {\n  console.log('statusCode:', res.statusCode);\n  console.log('headers:', res.headers);\n\n  res.on('data', (d) => {\n    process.stdout.write(d);\n  });\n});\n\nreq.on('error', (e) => {\n  console.error(e);\n});\nreq.end();\n
\n
const https = require('node:https');\n\nconst options = {\n  hostname: 'encrypted.google.com',\n  port: 443,\n  path: '/',\n  method: 'GET',\n};\n\nconst req = https.request(options, (res) => {\n  console.log('statusCode:', res.statusCode);\n  console.log('headers:', res.headers);\n\n  res.on('data', (d) => {\n    process.stdout.write(d);\n  });\n});\n\nreq.on('error', (e) => {\n  console.error(e);\n});\nreq.end();\n
\n

Example using options from tls.connect():

\n
const options = {\n  hostname: 'encrypted.google.com',\n  port: 443,\n  path: '/',\n  method: 'GET',\n  key: fs.readFileSync('private-key.pem'),\n  cert: fs.readFileSync('certificate.pem'),\n};\noptions.agent = new https.Agent(options);\n\nconst req = https.request(options, (res) => {\n  // ...\n});\n
\n

Alternatively, opt out of connection pooling by not using an Agent.

\n
const options = {\n  hostname: 'encrypted.google.com',\n  port: 443,\n  path: '/',\n  method: 'GET',\n  key: fs.readFileSync('private-key.pem'),\n  cert: fs.readFileSync('certificate.pem'),\n  agent: false,\n};\n\nconst req = https.request(options, (res) => {\n  // ...\n});\n
\n

Example using a URL as options:

\n
const options = new URL('https://abc:xyz@example.com');\n\nconst req = https.request(options, (res) => {\n  // ...\n});\n
\n

Example pinning on certificate fingerprint, or the public key (similar to\npin-sha256):

\n
import { checkServerIdentity } from 'node:tls';\nimport { Agent, request } from 'node:https';\nimport { createHash } from 'node:crypto';\n\nfunction sha256(s) {\n  return createHash('sha256').update(s).digest('base64');\n}\nconst options = {\n  hostname: 'github.com',\n  port: 443,\n  path: '/',\n  method: 'GET',\n  checkServerIdentity: function(host, cert) {\n    // Make sure the certificate is issued to the host we are connected to\n    const err = checkServerIdentity(host, cert);\n    if (err) {\n      return err;\n    }\n\n    // Pin the public key, similar to HPKP pin-sha256 pinning\n    const pubkey256 = 'SIXvRyDmBJSgatgTQRGbInBaAK+hZOQ18UmrSwnDlK8=';\n    if (sha256(cert.pubkey) !== pubkey256) {\n      const msg = 'Certificate verification error: ' +\n        `The public key of '${cert.subject.CN}' ` +\n        'does not match our pinned fingerprint';\n      return new Error(msg);\n    }\n\n    // Pin the exact certificate, rather than the pub key\n    const cert256 = 'FD:6E:9B:0E:F3:98:BC:D9:04:C3:B2:EC:16:7A:7B:' +\n      '0F:DA:72:01:C9:03:C5:3A:6A:6A:E5:D0:41:43:63:EF:65';\n    if (cert.fingerprint256 !== cert256) {\n      const msg = 'Certificate verification error: ' +\n        `The certificate of '${cert.subject.CN}' ` +\n        'does not match our pinned fingerprint';\n      return new Error(msg);\n    }\n\n    // This loop is informational only.\n    // Print the certificate and public key fingerprints of all certs in the\n    // chain. Its common to pin the public key of the issuer on the public\n    // internet, while pinning the public key of the service in sensitive\n    // environments.\n    let lastprint256;\n    do {\n      console.log('Subject Common Name:', cert.subject.CN);\n      console.log('  Certificate SHA256 fingerprint:', cert.fingerprint256);\n\n      const hash = createHash('sha256');\n      console.log('  Public key ping-sha256:', sha256(cert.pubkey));\n\n      lastprint256 = cert.fingerprint256;\n      cert = cert.issuerCertificate;\n    } while (cert.fingerprint256 !== lastprint256);\n\n  },\n};\n\noptions.agent = new Agent(options);\nconst req = request(options, (res) => {\n  console.log('All OK. Server matched our pinned cert or public key');\n  console.log('statusCode:', res.statusCode);\n\n  res.on('data', (d) => {});\n});\n\nreq.on('error', (e) => {\n  console.error(e.message);\n});\nreq.end();\n
\n
const tls = require('node:tls');\nconst https = require('node:https');\nconst crypto = require('node:crypto');\n\nfunction sha256(s) {\n  return crypto.createHash('sha256').update(s).digest('base64');\n}\nconst options = {\n  hostname: 'github.com',\n  port: 443,\n  path: '/',\n  method: 'GET',\n  checkServerIdentity: function(host, cert) {\n    // Make sure the certificate is issued to the host we are connected to\n    const err = tls.checkServerIdentity(host, cert);\n    if (err) {\n      return err;\n    }\n\n    // Pin the public key, similar to HPKP pin-sha256 pinning\n    const pubkey256 = 'SIXvRyDmBJSgatgTQRGbInBaAK+hZOQ18UmrSwnDlK8=';\n    if (sha256(cert.pubkey) !== pubkey256) {\n      const msg = 'Certificate verification error: ' +\n        `The public key of '${cert.subject.CN}' ` +\n        'does not match our pinned fingerprint';\n      return new Error(msg);\n    }\n\n    // Pin the exact certificate, rather than the pub key\n    const cert256 = 'FD:6E:9B:0E:F3:98:BC:D9:04:C3:B2:EC:16:7A:7B:' +\n      '0F:DA:72:01:C9:03:C5:3A:6A:6A:E5:D0:41:43:63:EF:65';\n    if (cert.fingerprint256 !== cert256) {\n      const msg = 'Certificate verification error: ' +\n        `The certificate of '${cert.subject.CN}' ` +\n        'does not match our pinned fingerprint';\n      return new Error(msg);\n    }\n\n    // This loop is informational only.\n    // Print the certificate and public key fingerprints of all certs in the\n    // chain. Its common to pin the public key of the issuer on the public\n    // internet, while pinning the public key of the service in sensitive\n    // environments.\n    do {\n      console.log('Subject Common Name:', cert.subject.CN);\n      console.log('  Certificate SHA256 fingerprint:', cert.fingerprint256);\n\n      hash = crypto.createHash('sha256');\n      console.log('  Public key ping-sha256:', sha256(cert.pubkey));\n\n      lastprint256 = cert.fingerprint256;\n      cert = cert.issuerCertificate;\n    } while (cert.fingerprint256 !== lastprint256);\n\n  },\n};\n\noptions.agent = new https.Agent(options);\nconst req = https.request(options, (res) => {\n  console.log('All OK. Server matched our pinned cert or public key');\n  console.log('statusCode:', res.statusCode);\n\n  res.on('data', (d) => {});\n});\n\nreq.on('error', (e) => {\n  console.error(e.message);\n});\nreq.end();\n
\n

Outputs for example:

\n
Subject Common Name: github.com\n  Certificate SHA256 fingerprint: FD:6E:9B:0E:F3:98:BC:D9:04:C3:B2:EC:16:7A:7B:0F:DA:72:01:C9:03:C5:3A:6A:6A:E5:D0:41:43:63:EF:65\n  Public key ping-sha256: SIXvRyDmBJSgatgTQRGbInBaAK+hZOQ18UmrSwnDlK8=\nSubject Common Name: Sectigo ECC Domain Validation Secure Server CA\n  Certificate SHA256 fingerprint: 61:E9:73:75:E9:F6:DA:98:2F:F5:C1:9E:2F:94:E6:6C:4E:35:B6:83:7C:E3:B9:14:D2:24:5C:7F:5F:65:82:5F\n  Public key ping-sha256: Eep0p/AsSa9lFUH6KT2UY+9s1Z8v7voAPkQ4fGknZ2g=\nSubject Common Name: USERTrust ECC Certification Authority\n  Certificate SHA256 fingerprint: A6:CF:64:DB:B4:C8:D5:FD:19:CE:48:89:60:68:DB:03:B5:33:A8:D1:33:6C:62:56:A8:7D:00:CB:B3:DE:F3:EA\n  Public key ping-sha256: UJM2FOhG9aTNY0Pg4hgqjNzZ/lQBiMGRxPD5Y2/e0bw=\nSubject Common Name: AAA Certificate Services\n  Certificate SHA256 fingerprint: D7:A7:A0:FB:5D:7E:27:31:D7:71:E9:48:4E:BC:DE:F7:1D:5F:0C:3E:0A:29:48:78:2B:C8:3E:E0:EA:69:9E:F4\n  Public key ping-sha256: vRU+17BDT2iGsXvOi76E7TQMcTLXAqj0+jGPdW7L1vM=\nAll OK. Server matched our pinned cert or public key\nstatusCode: 200\n
" } ], "properties": [ { "textRaw": "`https.globalAgent`", "name": "globalAgent", "type": "property", "meta": { "added": [ "v0.5.9" ], "changes": [ { "version": [ "v19.0.0" ], "pr-url": "https://github.com/nodejs/node/pull/43522", "description": "The agent now uses HTTP Keep-Alive and a 5 second timeout by default." } ] }, "desc": "

Global instance of https.Agent for all HTTPS client requests. Diverges\nfrom a default https.Agent configuration by having keepAlive enabled and\na timeout of 5 seconds.

" } ], "displayName": "HTTPS" } ] }
X Tutup