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 27, 2023
1 parent e71db24 commit a878c02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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 a878c02

Please sign in to comment.