Skip to content

Commit

Permalink
fix pkijs crypto engine typing
Browse files Browse the repository at this point in the history
Signed-off-by: Brian DeHamer <bdehamer@github.com>
  • Loading branch information
bdehamer committed Nov 28, 2023
1 parent cd56bff commit ad75492
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .changeset/ninety-cheetahs-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 1 addition & 1 deletion packages/mock-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"clean": "shx rm -rf dist",
"prebuild": "npm run clean",
"build": "tsc -b",
"start": "./bin/dev"
"start": "./bin/run"
},
"dependencies": {
"@oclif/color": "^1.0.13",
Expand Down
4 changes: 3 additions & 1 deletion packages/mock/src/fulcio/ca.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ import { initializeCTLog } from './ctlog';
describe('CA', () => {
const rootKeyPair = generateKeyPair();
const clock = new Date();
const crypto = new pkijs.CryptoEngine({ crypto: new Crypto() });
const crypto = new pkijs.CryptoEngine({
crypto: new Crypto(),
}) as pkijs.ICryptoEngine;

beforeEach(() => {
pkijs.setEngine('test', crypto);
Expand Down
4 changes: 3 additions & 1 deletion packages/mock/src/timestamp/tsa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ class TSAImpl implements TSA {
this.rootCert = options.rootCertificate;
this.keyPair = options.keyPair;
this.getCurrentTime = () => options.clock || new Date();
this.crypto = new pkijs.CryptoEngine({ crypto: new Crypto() });
this.crypto = new pkijs.CryptoEngine({
crypto: new Crypto(),
}) as pkijs.ICryptoEngine;
}

public get rootCertificate(): Buffer {
Expand Down

0 comments on commit ad75492

Please sign in to comment.