tlsSocket.exportKeyingMaterial(length, label[, context])
添加於:v13.10.0、v12.17.0
-
length
<number> 要從 key 材料中檢索的字節數 -
label
<string> 應用程序特定標簽,通常這將是來自 IANA Exporter Label Registry 的值。 -
context
<Buffer> 可選擇提供上下文。 -
返回: <Buffer> 請求的 key 材料字節
key 材料用於驗證以防止網絡協議中的不同類型的攻擊,例如 IEEE 802.1X 規範中的攻擊。
示例
const keyingMaterial = tlsSocket.exportKeyingMaterial(
128,
'client finished');
/*
Example return value of keyingMaterial:
<Buffer 76 26 af 99 c5 56 8e 42 09 91 ef 9f 93 cb ad 6c 7b 65 f8 53 f1 d8 d9
12 5a 33 b8 b5 25 df 7b 37 9f e0 e2 4f b8 67 83 a3 2f cd 5d 41 42 4c 91
74 ef 2c ... 78 more bytes>
*/
有關詳細信息,請參閱 OpenSSL
文檔。SSL_export_keying_material
相關用法
- Node.js tls.TLSSocket.getPeerCertificate([detailed])用法及代碼示例
- Node.js tls.DEFAULT_MAX_VERSION用法及代碼示例
- Node.js tls.DEFAULT_ECDH_CURVE用法及代碼示例
- Node.js tls.getCiphers()用法及代碼示例
- Node.js tls.connect(options[, callback])用法及代碼示例
- Node.js tls.connect()用法及代碼示例
- Node.js tls.createServer([options][, secureConnectionListener])用法及代碼示例
- Node.js tls.DEFAULT_MIN_VERSION用法及代碼示例
- Node.js tls.createServer()用法及代碼示例
- Node.js tls.createSecurePair([context][, isServer][, requestCert][, rejectUnauthorized][, options])用法及代碼示例
- Node.js tls.rootCertificates()用法及代碼示例
- Node.js tlsSocket.authorized用法及代碼示例
- Node.js tlsSocket.disableRenegotiation()用法及代碼示例
- Node.js tlsSocket.address()用法及代碼示例
- Node.js tlsSocket.remoteAddress用法及代碼示例
- Node.js tlsSocket.setMaxSendFragment()用法及代碼示例
- Node.js tlsSocket.getProtocol()用法及代碼示例
- Node.js tlsSocket.exportKeyingMaterial()用法及代碼示例
- Node.js tlsSocket.getPeerFinished()用法及代碼示例
- Node.js tlsSocket.getFinished()用法及代碼示例
- Node.js tlsSocket.authorizationError用法及代碼示例
- Node.js tlsSocket.getPeerCertificate()用法及代碼示例
- Node.js tlsSocket.localAddress用法及代碼示例
- Node.js tlsSocket.getSession()用法及代碼示例
- Node.js tlsSocket.remoteFamily用法及代碼示例
注:本文由純淨天空篩選整理自nodejs.org大神的英文原創作品 tls.TLSSocket.exportKeyingMaterial(length, label[, context])。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。