Skip to content

Commit 61ded78

Browse files
committed
refactor: createPublicKey is not a constructor
1 parent 6274d5a commit 61ded78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/asn1.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ function getSPKI(x509: string): string {
261261

262262
if (createPublicKey) {
263263
try {
264-
return new createPublicKey(x509).export({ format: 'pem', type: 'spki' })
264+
return createPublicKey(x509).export({ format: 'pem', type: 'spki' })
265265
} catch {}
266266
}
267267
const pem = x509.replace(/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g, '')

0 commit comments

Comments
 (0)