Skip to content

Commit

Permalink
Merge pull request #258 from Alex-Vol-Amz/fix-KeyPairRSA-size
Browse files Browse the repository at this point in the history
Fix missing keySize set when loading V1 RSA keys
  • Loading branch information
mwiede authored Jan 3, 2023
2 parents 4353541 + 46c8d88 commit bb09e96
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/com/jcraft/jsch/KeyPairRSA.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ boolean parse(byte [] plain){
c_array= prvKEyBuffer.getMPInt(); // iqmp (q^-1 mod p)
p_array=prvKEyBuffer.getMPInt(); // p (Prime 1)
q_array=prvKEyBuffer.getMPInt(); // q (Prime 2)
if(n_array!=null){
key_size = (new BigInteger(n_array)).bitLength();
}

getEPArray();
getEQArray();
Expand Down

0 comments on commit bb09e96

Please sign in to comment.