tlsSocket.getEphemeralKeyInfo()


返回一个对象,描述在客户端连接上 完美前向保密 的临时密钥协商。当密钥协商不是临时的时,它会返回一个空对象。由于这只在客户端套接字上支持;如果在服务器套接字上调用,会返回 null。支持的类型有 'DH''ECDH''TLSGroup'。对于 'DH''ECDH',对象描述对等方临时密钥参数。对于 'TLSGroup',当没有可用的对等方临时密钥对象时,对象会标识用于密钥协商的协商 TLS 支持组。

🌐 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.

name 属性仅在类型为 'ECDH''TLSGroup' 时可用。size 属性在类型为 'TLSGroup' 时不可用。对于 'TLSGroup'name 是协商的 TLS 支持组名称。标准化的 TLS 组名称和代码点列在 IANA TLS 支持的组注册表 中。

🌐 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.

例如:{ type: 'ECDH', name: 'prime256v1', size: 256 }

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