Skip to content

Commit

Permalink
[compat] add private? and public? methods on PKey::EC
Browse files Browse the repository at this point in the history
  • Loading branch information
kares committed Dec 6, 2024
1 parent 2ab6b3a commit 6a0bc28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/jruby/ext/openssl/PKeyEC.java
Original file line number Diff line number Diff line change
Expand Up @@ -616,12 +616,12 @@ public IRubyObject set_private_key(final ThreadContext context, final IRubyObjec
}
}

@JRubyMethod(name = "public_key?")
@JRubyMethod(name = "public?", alias = "public_key?")
public RubyBoolean public_p() {
return publicKey != null ? getRuntime().getTrue() : getRuntime().getFalse();
}

@JRubyMethod(name = "private_key?")
@JRubyMethod(name = "private?", alias = "private_key?")
public RubyBoolean private_p() {
return privateKey != null ? getRuntime().getTrue() : getRuntime().getFalse();
}
Expand Down

0 comments on commit 6a0bc28

Please sign in to comment.