carbond.SslOptions

All options relating to SSL for HTTPS server creation

Instance Properties

ciphers
string
Default undefined
Description A string listing supported and unsupported ciphers (see https://www.openssl.org/docs/man1.0.2/apps/ciphers.html for ciphers and format). If omitted, the default ciphers for your version of NodeJS will be used (see tls documentation for details).
crl
string
Default undefined
Description A certificate revocation list in PEM format
dhparam
string
Default undefined
Description Diffie Hellman parameters (use openssl dhparam to generate). Note, if these are invalid, they will be silently discarded and the accompanying ciphers will be disabled. Key length must be greater than 1024 bits.
ecdhCurve
string
Default undefined
Description A string describing a named curve to use for ECDH key agreement or false to disable ECDH. See crypto.getCurves() for a list of supported curve names.
handshakeTimeout
number
Default undefined
Description Amount of time in milliseconds to wait for the handshake to complete before throwing an error. If omitted, the default value of 120 seconds will be used.
honorCipherOrder
boolean
Default true
Description Use the server’s preferred cipher instead of the client’s
NPNProtocols
string[]
Default undefined
Description An array of possible NPN protocols, listed in order of priority
rejectUnauthorized
boolean
Default false
Description Reject connections whose client certificate is not authorized by any of the CAs. This is only applicable if requestCert is true.
requestCert
boolean
Default false
Description Whether of not to request and verify the client’s certificate
secureProtocol
string
Default 'TLSv1_method'
Description The SSL method to use. The possible values depend on the version of OpenSSL installed in the environment. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_new.html for possible values.
serverKeyPassphrase
string
Default undefined
Description The server key passphrase (this will be sanitized after initialization)
serverKeyPath
string
Required
Description Path to the server private key in PEM format
sessionIdContext
string
Default undefined
Description A string containing an opaque identifier for session resumption. If requestCert is true, the default is a 128 bit truncated SHA1 hash value generated from the command-line. Otherwise, a default is not provided.
sessionTimeout
number
Default undefined
Description The number of seconds after which TLS sessions should timeout. If omitted, the default is 300 seconds.
SNICallback
function
Default undefined
Description A callback that takes the arguments servername and cb. This will be called if the client supports SNI TLS extension and should call cb with (null, ctx), where ctx is a SecureContext instance as returned by tls.createSecureContext(...). If this omitted, Node’s default callback will be used (see Node documentation for more details).
ticketKeys
Buffer
Default undefined
Description A 48 byte Buffer instance with a 16-byte prefix, a 16-byte HMAC key, and a 16-byte AES key. This can be used to accept TLS session tickets on multiple instances of the TLS server.
trustedCertsPaths
string[]
Default undefined
Description Paths to all trusted CAs. If this is omitted, well known trusted CAs will be used (e.g. Verisign). Used to authorize connections

Methods

asHttpsOptions  
Return type Object
Description Transforms the options managed by SslOptions into a format that is appropriate for https.createServer
isEnabled  
Return type boolean
Description Tests if this options instance is valid for use