When calling sign, an exception was thrown about atob being called with invalid text.
After debugging, I narrowed it down to the pemToArrayBuffer call and it turns out my private key didn't begin with:
"-----BEGIN PRIVATE KEY-----"
but began with
"-----BEGIN RSA PRIVATE KEY-----"
I was able to resolve this by converting the private key to the correct format with:
openssl pkcs8 -topk8 -nocrypt -in private.pem -out private2.pem
Maybe you could put something in the FAQ in case someone encounters this.
When calling
sign, an exception was thrown aboutatobbeing called with invalid text.After debugging, I narrowed it down to the
pemToArrayBuffercall and it turns out my private key didn't begin with:"-----BEGIN PRIVATE KEY-----"
but began with
"-----BEGIN RSA PRIVATE KEY-----"
I was able to resolve this by converting the private key to the correct format with:
openssl pkcs8 -topk8 -nocrypt -in private.pem -out private2.pemMaybe you could put something in the FAQ in case someone encounters this.