Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to read keys from strings? #9

Closed
OlafvdSpek opened this issue Apr 6, 2018 · 2 comments
Closed

How to read keys from strings? #9

OlafvdSpek opened this issue Apr 6, 2018 · 2 comments

Comments

@OlafvdSpek
Copy link
Contributor

How does one read private and public keys from strings / files?
I saw jose::rsa::gen(1024) in the tests but couldn't find how to supply my own keys.

@troian
Copy link
Owner

troian commented Apr 6, 2018

Refer to tests.cpp:247 static sp_rsa_key gen(int size)
You can read your key from file/string using OpenSSL methods and wrap it into sp_rsa_key.

It's actually good point to handle such by josepp. I'll think about

troian added a commit that referenced this issue Apr 29, 2018
Change-Id: I16c2c234c4abbb5c778bffaee8f2bb46fbd01133
Signed-off-by: Artur Troian <[email protected]>
@troian
Copy link
Owner

troian commented Apr 29, 2018

@OlafvdSpek You can check referenced commit.

troian added a commit that referenced this issue Apr 29, 2018
Change-Id: I1242bfe4992b5da17eec0faedef2ae9871111613
Signed-off-by: Artur Troian <[email protected]>
troian added a commit that referenced this issue Apr 29, 2018
Change-Id: Ib8317f6d0fdd88de6413228beeabd3799ba207e4
Signed-off-by: Artur Troian <[email protected]>
@troian troian closed this as completed Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants