Skip to content

Commit

Permalink
add test for tlsa and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
buffrr committed Apr 9, 2023
1 parent 0a46e2a commit 7f05a64
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,17 @@ The options `PADDING`, `CLIENT_SUBNET`, `TCP_KEEPALIVE` and `KEY_TAG` support en
}
```

#### `TLSA`

``` js
{
usage: 3,
selector: 1,
matchingType: 1,
certificate: Buffer
}
```

#### `TXT`

``` js
Expand Down
10 changes: 10 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,16 @@ tape('naptr', function (t) {
t.end()
})

tape('tlsa', function (t) {
testEncoder(t, packet.tlsa, {
usage: 3,
selector: 1,
matchingType: 1,
certificate: Buffer.from([0, 1, 2, 3, 4, 5])
})
t.end()
})

tape('unpack', function (t) {
const buf = Buffer.from([
0x00, 0x79,
Expand Down

0 comments on commit 7f05a64

Please sign in to comment.