Skip to content

Commit

Permalink
handle X.509 extension to_text formatting regression due prev. commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kares committed Nov 6, 2016
1 parent 62b7d75 commit 0c018f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/main/java/org/jruby/ext/openssl/X509CRL.java
Expand Up @@ -397,9 +397,8 @@ static void extensions_to_text(final ThreadContext context,
text.append('\n');
final String value = ext.value(context).toString();
for ( String val : value.split("\n") ) {
text.append(S20, 0, 16).append(val).append('\n');
text.append(S20,0,16).append( val ).append('\n');
}
if ( value.charAt(value.length() - 1) != '\n' ) text.append('\n');
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/ruby/x509/test_x509crl.rb
Expand Up @@ -55,7 +55,7 @@ def test_revoked_to_text
crl_data = File.read(File.expand_path('../revoked.crl', __FILE__))
crl = OpenSSL::X509::CRL.new crl_data

#puts "CRL (revoked) text = \n#{crl.to_text}"
puts "CRL (revoked) text = \n#{crl.to_text}" if $VERBOSE

expected_text = REVOKED_TEXT.split("\n")[0, 12]

Expand Down

0 comments on commit 0c018f1

Please sign in to comment.