Skip to content

Commit 00cadb6

Browse files
authored
Use proper order of 2 when generating RSA (#736)
with Java crypto providers generating primes with sizes that aren't 2^x isn't really supported
1 parent 7297701 commit 00cadb6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

spec/jwt/jwa/ps_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
end
4949

5050
context 'with a key length less than 2048 bits' do
51-
let(:rsa_key) { OpenSSL::PKey::RSA.generate(2047) }
51+
let(:rsa_key) { OpenSSL::PKey::RSA.generate(1536) }
5252

5353
it 'raises an error' do
5454
expect do

spec/jwt/jwa/rsa_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
end
2222

2323
context 'with a key length less than 2048 bits' do
24-
let(:rsa_key) { OpenSSL::PKey::RSA.generate(2047) }
24+
let(:rsa_key) { OpenSSL::PKey::RSA.generate(1024) }
2525

2626
it 'raises an error' do
2727
expect do

0 commit comments

Comments
 (0)