Skip to content

Commit

Permalink
Merge pull request #8 from wonism/master
Browse files Browse the repository at this point in the history
fix: trim certificate wrong
  • Loading branch information
invisal authored Sep 7, 2020
2 parents f3dbd0f + 592a0a2 commit 83468d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rsa/import_key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function rsa_import_jwk(key: JSONWebKey): RSAKey {
* @param key
*/
function rsa_import_pem_cert(key: string): RSAKey {
const trimmedKey = key.substr(27, key.length - 52);
const trimmedKey = key.substr(27, key.length - 53);
const parseKey = ber_simple(
ber_decode(base64_to_binary(trimmedKey)),
) as RSACertKeyFormat;
Expand Down

0 comments on commit 83468d9

Please sign in to comment.