Skip to content

Commit aedd91a

Browse files
committed
Merge pull request #3 from dina/patch-1
Throw error when chain certs are *not* OpenSSL::X509::Certificate
2 parents 1d99c7e + f35d746 commit aedd91a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ private X509Cert[] convertToX509Certs(final ThreadContext context, IRubyObject v
570570

571571
public IRubyObject call(ThreadContext context, IRubyObject[] args, Block block) {
572572
final IRubyObject cert = args[0];
573-
if ( _Certificate.isInstance(cert) ) {
573+
if ( ! ( _Certificate.isInstance(cert) ) ) {
574574
throw context.runtime.newTypeError("wrong argument : " + cert.inspect() + " is not a " + _Certificate.getName());
575575
}
576576
result.add((X509Cert) cert);

0 commit comments

Comments
 (0)