Skip to content

Commit 0c018f1

Browse files
committed
handle X.509 extension to_text formatting regression due prev. commit
1 parent 62b7d75 commit 0c018f1

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,9 +397,8 @@ static void extensions_to_text(final ThreadContext context,
397397
text.append('\n');
398398
final String value = ext.value(context).toString();
399399
for ( String val : value.split("\n") ) {
400-
text.append(S20, 0, 16).append(val).append('\n');
400+
text.append(S20,0,16).append( val ).append('\n');
401401
}
402-
if ( value.charAt(value.length() - 1) != '\n' ) text.append('\n');
403402
}
404403
}
405404

src/test/ruby/x509/test_x509crl.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def test_revoked_to_text
5555
crl_data = File.read(File.expand_path('../revoked.crl', __FILE__))
5656
crl = OpenSSL::X509::CRL.new crl_data
5757

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

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

0 commit comments

Comments
 (0)