jfcote87 / esign

DocuSign REST API
BSD 3-Clause "New" or "Revised" License
23 stars 27 forks source link

"create credential error: private key should be a PEM or plain PKSC1" #4

Open zmajew opened 4 years ago

zmajew commented 4 years ago

Thanks for the library. I am trying to run your examples_test.go ExampleJWTConfig() function and have an error:

create credential error: private key should be a PEM or plain PKSC1 or PKCS8; parse error: asn1: structure error: tags don't match (16 vs {class:0 tag:13 length:45 isCompound:true}) {optional:false explicit:false application:false private:false defaultValue:<nil> tag:<nil> stringType:0 timeType:0 set:false omitEmpty:false} pkcs1PrivateKey @2 exit status 1

Z-a-r-a-k-i commented 3 years ago

Same here, is this project dead ?

Z-a-r-a-k-i commented 3 years ago

Okay found out where the issue comes from: when you copy paste your RSA key into, make sure that you don't have any space in the start of each line or it will be detected as invalid.