Skip to content

SigningKey example in Readme #9

Description

Hi,

Thanks for creating this library!

I am also trying to consume JIRA APIs. I am stuck with the following issue. In GetRSASignature method on line 378 (the following line) the process either crashes or returns null .

AsymmetricCipherKeyPair kp = (AsymmetricCipherKeyPair)new PemReader(reader).ReadObject();

Can you add some info about what kind of value is expected for SigningKey?

After diving into the RSA signature and the PemReader.ReadObject implementation from Org.BouncyCastle.OpenSsl, I thought it should be set to the file content of the .pem file for private key. Though, it still doesn't work.

Just to give you a clearer idea about which private key I used, hereby more info about my case..
The jira_privatekey.pem is the file I generated by running the openssl commands as described on this page from JIRA tutorials. Namely following lines:

openssl genrsa -out jira_privatekey.pem 1024
openssl req -newkey rsa:1024 -x509 -key jira_privatekey.pem -out jira_publickey.cer -days 365
openssl pkcs8 -topk8 -nocrypt -in jira_privatekey.pem -out jira_privatekey.pcks8
openssl x509 -pubkey -noout -in jira_publickey.cer  > jira_publickey.pem

Would be great if there is more info on what is expected by SigningKey, for example in Readme. Given this library adds RSA implementation on top of TinyOauth1 library, I believe an example for RSA would be more significant anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions