From 50fb847efc4f4a8914e987f43fc73638f9d0fdb5 Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Mon, 17 Jun 2024 11:50:50 -0500 Subject: [PATCH] Get generator point from Group's paramSpec --- src/main/java/org/jruby/ext/openssl/PKeyEC.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jruby/ext/openssl/PKeyEC.java b/src/main/java/org/jruby/ext/openssl/PKeyEC.java index 68203906..5e4a8624 100644 --- a/src/main/java/org/jruby/ext/openssl/PKeyEC.java +++ b/src/main/java/org/jruby/ext/openssl/PKeyEC.java @@ -976,7 +976,7 @@ private boolean getPointAndGroup(ThreadContext context, IRubyObject groupOrPoint if ( groupOrPoint instanceof Group) { this.group = (Group) groupOrPoint; - this.point = (ECPoint) ((Group) groupOrPoint).generator(context); + this.point = this.group.getParamSpec().getGenerator(); } else { throw runtime.newTypeError(groupOrPoint, _EC(runtime).getClass("Group")); }