Skip to content

Commit b75c2bc

Browse files
committed
chore: wip
1 parent dade46f commit b75c2bc

24 files changed

Lines changed: 47 additions & 6 deletions

src/x509.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2821,12 +2821,12 @@ export function createCaStore(certs: Certificate[]): CAStore {
28212821
},
28222822
}
28232823

2824-
function getBySubject(subject: RDNAttribute) {
2824+
function getBySubject(subject: { hash: string | null }) {
28252825
ensureSubjectHasHash(subject)
2826-
return caStore.certs[subject.hash] || null
2826+
return caStore.certs[subject.hash || ''] || null
28272827
}
28282828

2829-
function ensureSubjectHasHash(subject: RDNAttribute) {
2829+
function ensureSubjectHasHash(subject: { hash: string | null, attributes?: RDNAttribute[] }) {
28302830
// produce subject hash if it doesn't exist
28312831
if (!subject.hash) {
28322832
const sha = sha1.create()

test/unit/aes.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { describe, it } from 'bun:test'
2+
13
const ASSERT = require('node:assert')
24
const AES = require('../../lib/aes')
35
const CIPHER = require('../../lib/cipher')

test/unit/asn1.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { describe, it } from 'bun:test'
2+
13
const ASSERT = require('node:assert')
24
const ASN1 = require('../../lib/asn1')
35
const UTIL = require('../../lib/util');

test/unit/csr.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { describe, it } from 'bun:test'
2+
13
const ASSERT = require('node:assert')
24
const PKI = require('../../lib/pki');
35

test/unit/des.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { describe, it } from 'bun:test'
2+
13
const ASSERT = require('node:assert')
24
const CIPHER = require('../../lib/cipher')
35
const DES = require('../../lib/des')

test/unit/forge.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

test/unit/hmac.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { describe, it } from 'bun:test'
2+
13
const ASSERT = require('node:assert')
24
const HMAC = require('../../lib/hmac')
35
const UTIL = require('../../lib/util');

test/unit/kem.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { describe, it } from 'bun:test'
2+
13
const ASSERT = require('node:assert')
24
const JSBN = require('../../lib/jsbn')
35
const KEM = require('../../lib/kem')

test/unit/md5.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { describe, it } from 'bun:test'
2+
13
const ASSERT = require('node:assert')
24
const MD5 = require('../../lib/md5')
35
const UTIL = require('../../lib/util');

test/unit/mgf1.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { describe, it } from 'bun:test'
2+
13
const ASSERT = require('node:assert')
24
const MD = require('../../lib/md.all')
35
const MGF = require('../../lib/mgf')

0 commit comments

Comments
 (0)