Skip to content

Commit 5a40855

Browse files
committed
add CertificateVerify from method
1 parent 6d4b9f0 commit 5a40855

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tls/enum",
3-
"version": "0.6.6",
3+
"version": "0.6.7",
44
"exports": "./src/mod.ts",
55
"publish": {
66
"exclude": ["dist/"]

src/signaturescheme.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ export class CertificateVerify extends Uint8Array {
126126
const signature = Signature.from(copy.subarray(6))
127127
return new CertificateVerify(algorithm, signature.opaque)
128128
}
129+
static from = CertificateVerify.fromMsg
129130
constructor(signatureScheme, signature) {
130131
const signatureConstrained = new Signature(signature);
131132
const struct = new Struct(

type/signaturescheme.d.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ export declare class SignatureScheme extends Enum {
4242
*/
4343
get bit(): number;
4444
/**
45-
* Returns the byte length
46-
* @returns {number} The byte length, which is always 2.
47-
*/
45+
* Returns the byte length
46+
* @returns {number} The byte length, which is always 2.
47+
*/
4848
get length(): number;
4949

5050
/**
@@ -74,12 +74,13 @@ export declare class SignatureScheme extends Enum {
7474
serverHelloMsg: Uint8Array,
7575
encryptedExtensionsMsg: Uint8Array,
7676
certificateMsg: Uint8Array,
77-
RSAprivateKey: CryptoKey
77+
RSAprivateKey: CryptoKey,
7878
): Promise<CertificateVerify>;
7979
}
8080

8181
export declare class CertificateVerify extends Uint8Array {
8282
static fromMsg(array: Uint8Array): CertificateVerify;
83+
static from(array: Uint8Array): CertificateVerify;
8384
constructor(signatureScheme: SignatureScheme, signature: Uint8Array);
8485
algorithm: SignatureScheme;
8586
signature: Uint8Array;
@@ -107,7 +108,7 @@ export declare function signatureFrom(
107108
encryptedExtensionsMsg: Uint8Array,
108109
certificateMsg: Uint8Array,
109110
RSAprivateKey: CryptoKey,
110-
algo: { name: string; hash?: string; saltLength?: number }
111+
algo: { name: string; hash?: string; saltLength?: number },
111112
): Promise<Uint8Array>;
112113

113114
/**
@@ -116,8 +117,10 @@ export declare function signatureFrom(
116117
* @returns The appropriate hash instance.
117118
*/
118119
export declare function hashFromAlgo(
119-
algo: { hash?: string; saltLength?: number }
120-
): ReturnType<typeof sha256.create | typeof sha384.create | typeof sha512.create>;
120+
algo: { hash?: string; saltLength?: number },
121+
): ReturnType<
122+
typeof sha256.create | typeof sha384.create | typeof sha512.create
123+
>;
121124

122125
/**
123126
* Creates a Finished instance from the provided key and messages.

0 commit comments

Comments
 (0)