Skip to content

Commit 0fea064

Browse files
committed
[fix] regression with PKey::RSA#dmq1 (negated null check)
introduced at c850425
1 parent 9afb5af commit 0fea064

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/org/jruby/ext/openssl/PKeyRSA.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ public synchronized IRubyObject set_iqmp(final ThreadContext context, IRubyObjec
641641

642642
@JRubyMethod(name="iqmp")
643643
public synchronized IRubyObject get_iqmp() {
644-
BigInteger iqmp = rsa_iqmp;
644+
BigInteger iqmp = this.rsa_iqmp;
645645
if (iqmp == null && privateKey instanceof RSAPrivateCrtKey) {
646646
iqmp = ((RSAPrivateCrtKey) privateKey).getCrtCoefficient();
647647
}
@@ -652,7 +652,7 @@ public synchronized IRubyObject get_iqmp() {
652652

653653
@JRubyMethod(name="dmp1")
654654
public synchronized IRubyObject get_dmp1() {
655-
BigInteger dmp1 = rsa_dmp1;
655+
BigInteger dmp1 = this.rsa_dmp1;
656656
if (dmp1 == null && privateKey instanceof RSAPrivateCrtKey) {
657657
dmp1 = ((RSAPrivateCrtKey) privateKey).getPrimeExponentP();
658658
}
@@ -663,8 +663,8 @@ public synchronized IRubyObject get_dmp1() {
663663

664664
@JRubyMethod(name="dmq1")
665665
public synchronized IRubyObject get_dmq1() {
666-
BigInteger dmq1 = rsa_dmq1;
667-
if (dmq1 != null && privateKey instanceof RSAPrivateCrtKey) {
666+
BigInteger dmq1 = this.rsa_dmq1;
667+
if (dmq1 == null && privateKey instanceof RSAPrivateCrtKey) {
668668
dmq1 = ((RSAPrivateCrtKey) privateKey).getPrimeExponentQ();
669669
}
670670

0 commit comments

Comments
 (0)