Skip to content

EVPPKey constructor for modulus/exponent#4025

Merged
aleks-f merged 5 commits intopocoproject:develfrom
micheleselea:devel
Jun 21, 2023
Merged

EVPPKey constructor for modulus/exponent#4025
aleks-f merged 5 commits intopocoproject:develfrom
micheleselea:devel

Conversation

@micheleselea
Copy link
Copy Markdown
Contributor

Add EVPPKey constructor to let creating RSA Key using modulus and exponent. Useful when you use the .well-known/jwks.json paradigm so you have to recreate a public key to verify a jwt using just modulus and exponent. modulus usually is base64 URI encoded without padding

Add constructor for creating EVPPkey (RSA) using modulus and exponent
@aleks-f
Copy link
Copy Markdown
Member

aleks-f commented May 5, 2023

@micheleselea please add a test

@micheleselea
Copy link
Copy Markdown
Contributor Author

@aleks-f I don't know if I did it right, it's the first time, let me know

@aleks-f
Copy link
Copy Markdown
Member

aleks-f commented May 10, 2023

@micheleselea there are compile problems on some platforms:

src/EVPTest.cpp: In member function ‘void EVPTest::testEVPKeyByModulus()’:
src/EVPTest.cpp:706:45: error: ‘sN’ was not declared in this scope
  706 |                 Poco::MemoryInputStream cIn(sN.data(), sN.length());

@aleks-f aleks-f added this to the Release 1.13.0 milestone Jun 10, 2023
@aleks-f aleks-f merged commit ead93ba into pocoproject:devel Jun 21, 2023
@aleks-f
Copy link
Copy Markdown
Member

aleks-f commented Oct 16, 2023

@micheleselea next time, please spend some more time before submitting contributions.
This code was full of bugs, I have just spent a day fixing this for the upcoming releases:
92b3bb5
83a9289
1e0fbb8

@micheleselea
Copy link
Copy Markdown
Contributor Author

ok @aleks-f sorry

aleks-f pushed a commit that referenced this pull request Nov 27, 2023
* Create EVPPkey from modulus and exponent

Add constructor for creating EVPPkey (RSA) using modulus and exponent

* Add EVPPKey constructor for modulus/exponent

* Add testEVPKeyByModulus

* fix test for mudulus

* Update EVPTest.cpp
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

Successfully merging this pull request may close these issues.

2 participants