Skip to content

Commit 3ef9fd7

Browse files
committed
ver 0.2.2
1 parent 9f2c3f9 commit 3ef9fd7

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@aicone/byte": "jsr:@aicone/byte@^0.5.0",
1717
"@noble/curves": "npm:@noble/curves@^1.6.0",
1818
"@std/assert": "jsr:@std/assert@^1.0.2",
19-
"@tls/extension": "jsr:@tls/extension@^0.1.3",
19+
"@tls/extension": "jsr:@tls/extension@^0.1.2",
2020
"@tls/struct": "jsr:@tls/struct@^0.2.6"
2121
}
2222
}

src/version.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export class Version extends Enum {
8383
* Represents a Protocol Version as a 16-bit unsigned integer.
8484
* Extends Uint16 to handle 2-byte representations of protocol versions.
8585
*/
86-
export class ProtocolVersion extends Uint16 {
86+
export class ProtocolVersion extends Uint8Array {
8787
/**
8888
* The `Version` instance associated with this `ProtocolVersion`.
8989
* @type {Version}
@@ -95,7 +95,7 @@ export class ProtocolVersion extends Uint16 {
9595
* @param {Version|number} version - A `Version` instance or a version number (as a 16-bit integer).
9696
*/
9797
constructor(version){
98-
const uint16 = ProtocolVersion.fromValue(+version);
98+
const uint16 = Uint16.fromValue(+version);
9999
super(uint16);
100100
this.version = version
101101
}

test/version_test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,4 @@ Deno.test("ProtocolVersion Class - Constructor", () => {
6161
assertEquals(protocolVersion.version, Version.TLS13, "Expected ProtocolVersion to match Version.TLS13");
6262
});
6363

64+
const protocolVersion = ProtocolVersion.fromVersion(Version.TLS12);

0 commit comments

Comments
 (0)