Genese complexity report

<- tls.d.ts
Methods : 104
Complexity index : 78.5
Cyclomatic complexity : 103
Cognitive complexity
100 % Correct 104/104
0 % Warning 0/104 (threshold : 10)
0 % Error 0/104 (threshold : 20)
Cyclomatic complexity
100 % Correct 104/104
0 % Warning 0/104 (threshold : 5)
0 % Error 0/104 (threshold : 10)
Methods of tls.d.ts
Complexity Index 0.5 Cyclomatic complexity 0
                            
                                
                
                    /**
                     * Construct a new tls.TLSSocket object from an existing TCP socket.
                     */
                    constructor(socket: net.Socket, options?: TLSSocketOptions); // --------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
getCertificate Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
            
                    /**
                     * Returns an object representing the local certificate. The returned
                     * object has some properties corresponding to the fields of the
                     * certificate.
                     *
                     * See tls.TLSSocket.getPeerCertificate() for an example of the
                     * certificate structure.
                     *
                     * If there is no local certificate, an empty object will be returned.
                     * If the socket has been destroyed, null will be returned.
                     */
                    getCertificate(): PeerCertificate | object | null; // --------------------------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
getCipher Complexity Index 0.2 Cyclomatic complexity 1
                            
                                
                    
                    /**
                     * Returns an object representing the cipher name and the SSL/TLS protocol version of the current connection.
                     * @returns Returns an object representing the cipher name
                     * and the SSL/TLS protocol version of the current connection.
                     */
                    getCipher(): CipherNameAndProtocol; // --------------------------------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
            
                            
                        
getEphemeralKeyInfo Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    /**
                     * Returns an object representing the type, name, and size of parameter
                     * of an ephemeral key exchange in Perfect Forward Secrecy on a client
                     * connection. It returns an empty object when the key exchange is not
                     * ephemeral. As this is only supported on a client socket; null is
                     * returned if called on a server socket. The supported types are 'DH'
                     * and 'ECDH'. The name property is available only when type is 'ECDH'.
                     *
                     * For example: { type: 'ECDH', name: 'prime256v1', size: 256 }.
                     */
                    getEphemeralKeyInfo(): EphemeralKeyInfo | object | null; // ---------------------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
getFinished Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    /**
                     * Returns the latest Finished message that has
                     * been sent to the socket as part of a SSL/TLS handshake, or undefined
                     * if no Finished message has been sent yet.
                     *
                     * As the Finished messages are message digests of the complete
                     * handshake (with a total of 192 bits for TLS 1.0 and more for SSL
                     * 3.0), they can be used for external authentication procedures when
                     * the authentication provided by SSL/TLS is not desired or is not
                     * enough.
                     *
                     * Corresponds to the SSL_get_finished routine in OpenSSL and may be
                     * used to implement the tls-unique channel binding from RFC 5929.
                     */
                    getFinished(): Buffer | undefined; // -------------------------------------------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
getPeerCertificate Complexity Index 0.4 Cyclomatic complexity 1
                            
                                
                    
                    /**
                     * Returns an object representing the peer's certificate.
                     * The returned object has some properties corresponding to the field of the certificate.
                     * If detailed argument is true the full chain with issuer property will be returned,
                     * if false only the top certificate without issuer property.
                     * If the peer does not provide a certificate, it returns null or an empty object.
                     * @param detailed - If true; the full chain with issuer property will be returned.
                     * @returns An object representing the peer's certificate.
                     */
                    getPeerCertificate(detailed: true): DetailedPeerCertificate; // ------------------------------------ +0.4 Complexity index (+0.4 atomic)
            
                            
                        
getPeerCertificate Complexity Index 0.4 Cyclomatic complexity 1
                            
                                
                    
                    getPeerCertificate(detailed?: false): PeerCertificate; // ------------- +0.4 Complexity index (+0.4 atomic)
            
                            
                        
getPeerCertificate Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate; // ------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
getPeerFinished Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    /**
                     * Returns the latest Finished message that is expected or has actually
                     * been received from the socket as part of a SSL/TLS handshake, or
                     * undefined if there is no Finished message so far.
                     *
                     * As the Finished messages are message digests of the complete
                     * handshake (with a total of 192 bits for TLS 1.0 and more for SSL
                     * 3.0), they can be used for external authentication procedures when
                     * the authentication provided by SSL/TLS is not desired or is not
                     * enough.
                     *
                     * Corresponds to the SSL_get_peer_finished routine in OpenSSL and may
                     * be used to implement the tls-unique channel binding from RFC 5929.
                     */
                    getPeerFinished(): Buffer | undefined; // --------------------------------------------------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
getProtocol Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    /**
                     * Returns a string containing the negotiated SSL/TLS protocol version of the current connection.
                     * The value `'unknown'` will be returned for connected sockets that have not completed the handshaking process.
                     * The value `null` will be returned for server sockets or disconnected client sockets.
                     * See https://www.openssl.org/docs/man1.0.2/ssl/SSL_get_version.html for more information.
                     * @returns negotiated SSL/TLS protocol version of the current connection
                     */
                    getProtocol(): string | null; // ------------------------------------------------------------------------------------------ +0.3 Complexity index (+0.3 atomic)
            
                            
                        
getSession Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    /**
                     * Could be used to speed up handshake establishment when reconnecting to the server.
                     * @returns ASN.1 encoded TLS session or undefined if none was negotiated.
                     */
                    getSession(): Buffer | undefined; // ----------------------------------------------------------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
getSharedSigalgs Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    /**
                     * Returns a list of signature algorithms shared between the server and
                     * the client in the order of decreasing preference.
                     */
                    getSharedSigalgs(): string[]; // ------------------------------------------------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
getTLSTicket Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    /**
                     * NOTE: Works only with client TLS sockets.
                     * Useful only for debugging, for session reuse provide session option to tls.connect().
                     * @returns TLS session ticket or undefined if none was negotiated.
                     */
                    getTLSTicket(): Buffer | undefined; // ------------------------------------------------------------ +0.3 Complexity index (+0.3 atomic)
            
                            
                        
isSessionReused Complexity Index 0.1 Cyclomatic complexity 1
                            
                                
                    
                    /**
                     * Returns true if the session was reused, false otherwise.
                     */
                    isSessionReused(): boolean; // --------------------------------------- +0.1 Complexity index (+0.1 atomic)
            
                            
                        
renegotiate Complexity Index 1 Cyclomatic complexity 1
                            
                                
                    
                    /**
                     * Initiate TLS renegotiation process.
                     *
                     * NOTE: Can be used to request peer's certificate after the secure connection has been established.
                     * ANOTHER NOTE: When running as the server, socket will be destroyed with an error after handshakeTimeout timeout.
                     * @param options - The options may contain the following fields: rejectUnauthorized,
                     * requestCert (See tls.createServer() for details).
                     * @param callback - callback(err) will be executed with null as err, once the renegotiation
                     * is successfully completed.
                     * @return `undefined` when socket is destroy, `false` if negotiaion can't be initiated.
                     */
                    renegotiate(options: { rejectUnauthorized?: boolean, requestCert?: boolean }, callback: (err: Error | null) => void): undefined | boolean; // ------- +1.0 Complexity index (+1.0 atomic)
            
                            
                        
setMaxSendFragment Complexity Index 0.2 Cyclomatic complexity 1
                            
                                
                    
                    /**
                     * Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512).
                     * Smaller fragment size decreases buffering latency on the client: large fragments are buffered by
                     * the TLS layer until the entire fragment is received and its integrity is verified;
                     * large fragments can span multiple roundtrips, and their processing can be delayed due to packet
                     * loss or reordering. However, smaller fragments add extra TLS framing bytes and CPU overhead,
                     * which may decrease overall server throughput.
                     * @param size - TLS fragment size (default and maximum value is: 16384, minimum is: 512).
                     * @returns Returns true on success, false otherwise.
                     */
                    setMaxSendFragment(size: number): boolean; // ------------------------------------------------------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
            
                            
                        
disableRenegotiation Complexity Index 0.2 Cyclomatic complexity 1
                            
                                
                    
            
                    /**
                     * Disables TLS renegotiation for this TLSSocket instance. Once called,
                     * attempts to renegotiate will trigger an 'error' event on the
                     * TLSSocket.
                     */
                    disableRenegotiation(): void; // ------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
            
                            
                        
enableTrace Complexity Index 0.2 Cyclomatic complexity 1
                            
                                
                    
            
                    /**
                     * When enabled, TLS packet trace information is written to `stderr`. This can be
                     * used to debug TLS connection problems.
                     *
                     * Note: The format of the output is identical to the output of `openssl s_client
                     * -trace` or `openssl s_server -trace`. While it is produced by OpenSSL's
                     * `SSL_trace()` function, the format is undocumented, can change without notice,
                     * and should not be relied on.
                     */
                    enableTrace(): void; // -------------------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
            
                            
                        
exportKeyingMaterial Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
            
                    /**
                     * @param length number of bytes to retrieve from keying material
                     * @param label an application specific label, typically this will be a value from the
                     * [IANA Exporter Label Registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels).
                     * @param context optionally provide a context.
                     */
                    exportKeyingMaterial(length: number, label: string, context: Buffer): Buffer; // -------------------------------------------------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
addListener Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
            
                    addListener(event: string, listener: (...args: any[]) => void): this; // --------------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
addListener Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    addListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
addListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    addListener(event: "secureConnect", listener: () => void): this; // ---------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
addListener Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    addListener(event: "session", listener: (session: Buffer) => void): this; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
addListener Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    addListener(event: "keylog", listener: (line: Buffer) => void): this; // ----------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
emit Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
            
                    emit(event: string | symbol, ...args: any[]): boolean; // ---------------------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
emit Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    emit(event: "OCSPResponse", response: Buffer): boolean; // ------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
emit Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                    
                    emit(event: "secureConnect"): boolean; // ------------------------ +0.3 Complexity index (+0.3 atomic)
            
                            
                        
emit Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    emit(event: "session", session: Buffer): boolean; // ------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
emit Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    emit(event: "keylog", line: Buffer): boolean; // ----------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
on Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
            
                    on(event: string, listener: (...args: any[]) => void): this; // ------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
on Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    on(event: "OCSPResponse", listener: (response: Buffer) => void): this; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
on Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    on(event: "secureConnect", listener: () => void): this; // ---------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
on Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    on(event: "session", listener: (session: Buffer) => void): this; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
on Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    on(event: "keylog", listener: (line: Buffer) => void): this; // ----------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
once Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
            
                    once(event: string, listener: (...args: any[]) => void): this; // ------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
once Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    once(event: "OCSPResponse", listener: (response: Buffer) => void): this; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
once Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    once(event: "secureConnect", listener: () => void): this; // ---------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
once Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    once(event: "session", listener: (session: Buffer) => void): this; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
once Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    once(event: "keylog", listener: (line: Buffer) => void): this; // ----------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
prependListener Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
            
                    prependListener(event: string, listener: (...args: any[]) => void): this; // ------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
prependListener Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    prependListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
prependListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    prependListener(event: "secureConnect", listener: () => void): this; // ---------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
prependListener Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    prependListener(event: "session", listener: (session: Buffer) => void): this; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
prependListener Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    prependListener(event: "keylog", listener: (line: Buffer) => void): this; // ----------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
prependOnceListener Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
            
                    prependOnceListener(event: string, listener: (...args: any[]) => void): this; // ------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
prependOnceListener Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    prependOnceListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
prependOnceListener Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    prependOnceListener(event: "secureConnect", listener: () => void): this; // ---------------------- +0.5 Complexity index (+0.5 atomic)
            
                            
                        
prependOnceListener Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    prependOnceListener(event: "session", listener: (session: Buffer) => void): this; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
prependOnceListener Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    prependOnceListener(event: "keylog", listener: (line: Buffer) => void): this; // ----------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
addContext Complexity Index 0.6 Cyclomatic complexity 1
                            
                                
                
                    /**
                     * The server.addContext() method adds a secure context that will be
                     * used if the client request's SNI name matches the supplied hostname
                     * (or wildcard).
                     */
                    addContext(hostName: string, credentials: SecureContextOptions): void; // ------- +0.6 Complexity index (+0.6 atomic)
            
                            
                        
getTicketKeys Complexity Index 0.2 Cyclomatic complexity 1
                            
                                
                    
                    /**
                     * Returns the session ticket keys.
                     */
                    getTicketKeys(): Buffer; // ----------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
            
                            
                        
setSecureContext Complexity Index 0.4 Cyclomatic complexity 1
                            
                                
                    
                    /**
                     *
                     * The server.setSecureContext() method replaces the
                     * secure context of an existing server. Existing connections to the
                     * server are not interrupted.
                     */
                    setSecureContext(details: SecureContextOptions): void; // --------------------- +0.4 Complexity index (+0.4 atomic)
            
                            
                        
setTicketKeys Complexity Index 0.4 Cyclomatic complexity 1
                            
                                
                    
                    /**
                     * The server.setSecureContext() method replaces the secure context of
                     * an existing server. Existing connections to the server are not
                     * interrupted.
                     */
                    setTicketKeys(keys: Buffer): void; // ------------------------------------------- +0.4 Complexity index (+0.4 atomic)
            
                            
                        
addListener Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
            
                    /**
                     * events.EventEmitter
                     * 1. tlsClientError
                     * 2. newSession
                     * 3. OCSPRequest
                     * 4. resumeSession
                     * 5. secureConnection
                     * 6. keylog
                     */
                    addListener(event: string, listener: (...args: any[]) => void): this; // ------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
addListener Complexity Index 0.9 Cyclomatic complexity 1
                            
                                
                    
                    addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; // ------- +0.9 Complexity index (+0.9 atomic)
            
                            
                        
addListener Complexity Index 1.5 Cyclomatic complexity 1
                            
                                
                    
                    addListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; // ------- +1.5 Complexity index (+1.5 atomic)
            
                            
                        
addListener Complexity Index 1.6 Cyclomatic complexity 1
                            
                                
                    
                    addListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; // ------- +1.6 Complexity index (+1.6 atomic)
            
                            
                        
addListener Complexity Index 1.3 Cyclomatic complexity 1
                            
                                
                    
                    addListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; // ----------------------- +1.3 Complexity index (+1.3 atomic)
            
                            
                        
addListener Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; // ------------------------------------------------------ +0.7 Complexity index (+0.7 atomic)
            
                            
                        
addListener Complexity Index 0.9 Cyclomatic complexity 1
                            
                                
                    
                    addListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; // ------- +0.9 Complexity index (+0.9 atomic)
            
                            
                        
emit Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
            
                    emit(event: string | symbol, ...args: any[]): boolean; // -------------------------------------------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
emit Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
emit Complexity Index 1.3 Cyclomatic complexity 1
                            
                                
                    
                    emit(event: "newSession", sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void): boolean; // ------- +1.3 Complexity index (+1.3 atomic)
            
                            
                        
emit Complexity Index 1.4 Cyclomatic complexity 1
                            
                                
                    
                    emit(event: "OCSPRequest", certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean; // ------- +1.4 Complexity index (+1.4 atomic)
            
                            
                        
emit Complexity Index 1.1 Cyclomatic complexity 1
                            
                                
                    
                    emit(event: "resumeSession", sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean; // ----------------------- +1.1 Complexity index (+1.1 atomic)
            
                            
                        
emit Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                    
                    emit(event: "secureConnection", tlsSocket: TLSSocket): boolean; // ------------------------------------------------------ +0.5 Complexity index (+0.5 atomic)
            
                            
                        
emit Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    emit(event: "keylog", line: Buffer, tlsSocket: TLSSocket): boolean; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
on Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
            
                    on(event: string, listener: (...args: any[]) => void): this; // -------------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
on Complexity Index 0.9 Cyclomatic complexity 1
                            
                                
                    
                    on(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; // ------- +0.9 Complexity index (+0.9 atomic)
            
                            
                        
on Complexity Index 1.5 Cyclomatic complexity 1
                            
                                
                    
                    on(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; // ------- +1.5 Complexity index (+1.5 atomic)
            
                            
                        
on Complexity Index 1.6 Cyclomatic complexity 1
                            
                                
                    
                    on(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; // ------- +1.6 Complexity index (+1.6 atomic)
            
                            
                        
on Complexity Index 1.3 Cyclomatic complexity 1
                            
                                
                    
                    on(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; // ----------------------- +1.3 Complexity index (+1.3 atomic)
            
                            
                        
on Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; // ------------------------------------------------------ +0.7 Complexity index (+0.7 atomic)
            
                            
                        
on Complexity Index 0.9 Cyclomatic complexity 1
                            
                                
                    
                    on(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; // ------- +0.9 Complexity index (+0.9 atomic)
            
                            
                        
once Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
            
                    once(event: string, listener: (...args: any[]) => void): this; // --------------------------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
once Complexity Index 0.9 Cyclomatic complexity 1
                            
                                
                    
                    once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; // ------- +0.9 Complexity index (+0.9 atomic)
            
                            
                        
once Complexity Index 1.5 Cyclomatic complexity 1
                            
                                
                    
                    once(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; // ------- +1.5 Complexity index (+1.5 atomic)
            
                            
                        
once Complexity Index 1.6 Cyclomatic complexity 1
                            
                                
                    
                    once(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; // ------- +1.6 Complexity index (+1.6 atomic)
            
                            
                        
once Complexity Index 1.3 Cyclomatic complexity 1
                            
                                
                    
                    once(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; // ----------------------- +1.3 Complexity index (+1.3 atomic)
            
                            
                        
once Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; // ------------------------------------------------------ +0.7 Complexity index (+0.7 atomic)
            
                            
                        
once Complexity Index 0.9 Cyclomatic complexity 1
                            
                                
                    
                    once(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; // ------- +0.9 Complexity index (+0.9 atomic)
            
                            
                        
prependListener Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
            
                    prependListener(event: string, listener: (...args: any[]) => void): this; // ------------------ +0.8 Complexity index (+0.8 atomic)
            
                            
                        
prependListener Complexity Index 0.9 Cyclomatic complexity 1
                            
                                
                    
                    prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; // ------- +0.9 Complexity index (+0.9 atomic)
            
                            
                        
prependListener Complexity Index 1.5 Cyclomatic complexity 1
                            
                                
                    
                    prependListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; // ------- +1.5 Complexity index (+1.5 atomic)
            
                            
                        
prependListener Complexity Index 1.6 Cyclomatic complexity 1
                            
                                
                    
                    prependListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; // ------- +1.6 Complexity index (+1.6 atomic)
            
                            
                        
prependListener Complexity Index 1.3 Cyclomatic complexity 1
                            
                                
                    
                    prependListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; // ----------------------- +1.3 Complexity index (+1.3 atomic)
            
                            
                        
prependListener Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; // ------------------------------------------------------ +0.7 Complexity index (+0.7 atomic)
            
                            
                        
prependListener Complexity Index 0.9 Cyclomatic complexity 1
                            
                                
                    
                    prependListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; // ------- +0.9 Complexity index (+0.9 atomic)
            
                            
                        
prependOnceListener Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                    
            
                    prependOnceListener(event: string, listener: (...args: any[]) => void): this; // ------------------------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
prependOnceListener Complexity Index 0.9 Cyclomatic complexity 1
                            
                                
                    
                    prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; // ------- +0.9 Complexity index (+0.9 atomic)
            
                            
                        
prependOnceListener Complexity Index 1.5 Cyclomatic complexity 1
                            
                                
                    
                    prependOnceListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; // ------- +1.5 Complexity index (+1.5 atomic)
            
                            
                        
prependOnceListener Complexity Index 1.6 Cyclomatic complexity 1
                            
                                
                    
                    prependOnceListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; // ------- +1.6 Complexity index (+1.6 atomic)
            
                            
                        
prependOnceListener Complexity Index 1.3 Cyclomatic complexity 1
                            
                                
                    
                    prependOnceListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; // ----------------------- +1.3 Complexity index (+1.3 atomic)
            
                            
                        
prependOnceListener Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                    
                    prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; // ------------------------------------------------------ +0.7 Complexity index (+0.7 atomic)
            
                            
                        
prependOnceListener Complexity Index 0.9 Cyclomatic complexity 1
                            
                                
                    
                    prependOnceListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; // ------- +0.9 Complexity index (+0.9 atomic)
            
                            
                        
checkServerIdentity Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                
            
                /*
                 * Verifies the certificate `cert` is issued to host `host`.
                 * @host The hostname to verify the certificate against
                 * @cert PeerCertificate representing the peer's certificate
                 *
                 * Returns Error object, populating it with the reason, host and cert on failure.  On success, returns undefined.
                 */
                function checkServerIdentity(host: string, cert: PeerCertificate): Error | undefined; // ----------------------------------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
createServer Complexity Index 0.6 Cyclomatic complexity 1
                            
                                
                
                function createServer(secureConnectionListener?: (socket: TLSSocket) => void): Server; // ------- +0.6 Complexity index (+0.6 atomic)
            
                            
                        
createServer Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                
                function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server; // ------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
connect Complexity Index 0.6 Cyclomatic complexity 1
                            
                                
                
                function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; // ---------------------- +0.6 Complexity index (+0.6 atomic)
            
                            
                        
connect Complexity Index 0.9 Cyclomatic complexity 1
                            
                                
                
                function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; // ------- +0.9 Complexity index (+0.9 atomic)
            
                            
                        
connect Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                
                function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; // ---------------------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
createSecurePair Complexity Index 0.7 Cyclomatic complexity 1
                            
                                
                
                /**
                 * @deprecated since v0.11.3 Use `tls.TLSSocket` instead.
                 */
                function createSecurePair(credentials?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair; // ------- +0.7 Complexity index (+0.7 atomic)
            
                            
                        
createSecureContext Complexity Index 0.4 Cyclomatic complexity 1
                            
                                
                
                function createSecureContext(options?: SecureContextOptions): SecureContext; // ----------------------------------------------------------------------- +0.4 Complexity index (+0.4 atomic)
            
                            
                        
getCiphers Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                
                function getCiphers(): string[]; // --------------------------------------------------- +0.3 Complexity index (+0.3 atomic)