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")); }