mirror of
https://github.com/danbulant/jose
synced 2026-05-25 04:51:47 +00:00
fix: importing x5c in electron requires the input split
This commit is contained in:
parent
60efc06a93
commit
181fd0954e
1 changed files with 1 additions and 1 deletions
|
|
@ -56,7 +56,7 @@ class Key {
|
|||
let publicKey
|
||||
try {
|
||||
publicKey = createPublicKey({
|
||||
key: `-----BEGIN CERTIFICATE-----\n${cert}\n-----END CERTIFICATE-----`, format: 'pem'
|
||||
key: `-----BEGIN CERTIFICATE-----\n${cert.match(/.{1,64}/g).join('\n')}\n-----END CERTIFICATE-----`, format: 'pem'
|
||||
})
|
||||
} catch (err) {
|
||||
throw new errors.JWKInvalid(`\`x5c\` member at index ${i} is not a valid base64-encoded DER PKIX certificate`)
|
||||
|
|
|
|||
Loading…
Reference in a new issue