method

tls.TLSSocket.getEphemeralKeyInfo

Returns an object describing ephemeral key agreement in perfect forward secrecy on a client connection. It returns an empty object when the key agreement 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', 'ECDH', and 'TLSGroup'. For 'DH' and 'ECDH', the object describes peer temporary key parameters. For 'TLSGroup', the object identifies the negotiated TLS Supported Group used for key agreement when a peer temporary key object is not available.

The name property is available only when type is 'ECDH' or 'TLSGroup'. The size property is not available when type is 'TLSGroup'. For 'TLSGroup', name is the negotiated TLS Supported Group name. Standardized TLS group names and code points are listed in the IANA TLS Supported Groups registry.

For example: { type: 'ECDH', name: 'prime256v1', size: 256 }.

Referenced types

interface EphemeralKeyInfo

  • name?: string

    The name property is available only when type is 'ECDH'.

  • size: number

    The size of parameter of an ephemeral key exchange.

  • type: string

    The supported types are 'DH' and 'ECDH'.