Skip to content

Commit 3b8c7ee

Browse files
committed
fix readKeyAndCert errors
1 parent 4ea8301 commit 3b8c7ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/keystore.reader.fs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ export class KeystoreReaderFs {
6262
* @return {Promise} A promise which is resolved when both the certificate and the
6363
* private key is loaded for the given key id
6464
*/
65-
public async readKeyAndCert(newKeys: Map<string, KeyAndCert>, keyId: string) {
65+
public async readKeyAndCert(newKeys: Map<string, KeyAndCert>, keyId: string): Promise<void> {
6666
const privKeyPem = fs.readFileSync(path.join(this.baseDir, `${keyId}.privkey.pem`))
6767
const certPem = fs.readFileSync(path.join(this.baseDir, `${keyId}.cert.pem`))
6868

6969
this.debug(`Key id ${keyId}, privkey and cert read`)
7070
const cert = new X509()
7171
cert.readCertPEM(certPem.toString())
72-
const verifiedCert = this.verifyCertAsync(keyId, certPem.toString())
72+
const verifiedCert = await this.verifyCertAsync(keyId, certPem.toString())
7373
const certStr = verifiedCert.toString()
7474
const publicKey = KEYUTIL.getKey(certStr)
7575
const pubkeyJwk = KEYUTIL.getJWKFromKey(publicKey)

0 commit comments

Comments
 (0)