Skip to content

Commit

Permalink
imrpve certificate's to_text formatting to handle multi-line extensions
Browse files Browse the repository at this point in the history
... like MRI OpenSSL does
  • Loading branch information
kares committed Nov 5, 2016
1 parent b209d97 commit 62b7d75
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/org/jruby/ext/openssl/X509CRL.java
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,9 @@ static void extensions_to_text(final ThreadContext context,
if ( ext.isRealCritical() ) text.append("critical");
text.append('\n');
final String value = ext.value(context).toString();
text.append(S20,0,16).append( value );
for ( String val : value.split("\n") ) {
text.append(S20, 0, 16).append(val).append('\n');
}
if ( value.charAt(value.length() - 1) != '\n' ) text.append('\n');
}
}
Expand Down

0 comments on commit 62b7d75

Please sign in to comment.