From 6a0bc28d804cb96f88c4938a6320a73c0a9e554a Mon Sep 17 00:00:00 2001 From: kares Date: Fri, 6 Dec 2024 12:02:22 +0100 Subject: [PATCH] [compat] add private? and public? methods on PKey::EC --- src/main/java/org/jruby/ext/openssl/PKeyEC.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/jruby/ext/openssl/PKeyEC.java b/src/main/java/org/jruby/ext/openssl/PKeyEC.java index 0d1d2aa5..e64aeef8 100644 --- a/src/main/java/org/jruby/ext/openssl/PKeyEC.java +++ b/src/main/java/org/jruby/ext/openssl/PKeyEC.java @@ -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(); }