You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @returns {Promise<Uint8Array>} The generated signature.
146
+
* Generates a signature from the provided handshake messages and an RSA private key.
147
+
*
148
+
* @param clientHelloMsg - The ClientHello message as a Uint8Array.
149
+
* @param serverHelloMsg - The ServerHello message as a Uint8Array.
150
+
* @param encryptedExtensionsMsg - The EncryptedExtensions message as a Uint8Array.
151
+
* @param certificateMsg - The Certificate message as a Uint8Array.
152
+
* @param RSAprivateKey - The RSA private key used for signing.
153
+
* @param sha - The hash algorithm to use (256, 384, or 512). Defaults to 256.
154
+
* @returns A promise that resolves to a Uint8Array containing the signature. The resulting object also includes the `transcriptHash` property.
152
155
*/
153
-
exportfunctionsignatureFrom(
156
+
exportdeclarefunctionsignatureFrom(
154
157
clientHelloMsg: Uint8Array,
155
158
serverHelloMsg: Uint8Array,
156
159
encryptedExtensionsMsg: Uint8Array,
157
160
certificateMsg: Uint8Array,
158
-
RSAprivateKey: CryptoKey
161
+
RSAprivateKey: CryptoKey,
162
+
sha?: 256|384|512
159
163
): Promise<Uint8Array>;
160
164
161
165
/**
162
-
* Verifies and generates the HMAC for the given data.
166
+
* Computes the Finished message verify_data using the provided finished key and handshake messages.
163
167
*
164
-
* @param{Uint8Array} finishedKey - The key used to compute the finished message..
165
-
* @param{object} certificateVerifyMsg - The certificate verify message object.
166
-
* @param{Uint8Array} certificateVerifyMsg.message.transcriptHash - The transcript hash from the message.
167
-
* @returns{Promise<Uint8Array>} A promise that resolves to the verify_data HMAC value as a Uint8Array.
168
+
* @param finishedKey - The finished key as a Uint8Array.
169
+
* @paramsha - The hash algorithm to use (256 or 384). Defaults to 256.
170
+
* @parammessages - A variable number of handshake messages to include in the transcript hash.
171
+
* @returns A promise that resolves to a Finished instance containing the verify_data. The resulting object also includes the `transcriptHash` property.
168
172
*/
169
173
exportdeclarefunctionfinished(
170
174
finishedKey: Uint8Array,
171
-
certificateVerifyMsg: {
172
-
message: {
173
-
transcriptHash: Uint8Array;
174
-
};
175
-
}
176
-
): Promise<Uint8Array>;
175
+
sha?: 256|384,
176
+
...messages: Uint8Array[]
177
+
): Promise<Finished>;
178
+
177
179
178
180
/**
179
181
* Represents the output of the `finished` function.
0 commit comments