We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 491f1eb commit 589bcd0Copy full SHA for 589bcd0
src/main/java/org/jruby/ext/openssl/ASN1.java
@@ -1695,13 +1695,13 @@ ASN1Encodable toASN1(final ThreadContext context) {
1695
}
1696
1697
if ( type == DERGeneralString.class ) {
1698
- return new DERGeneralString( val.asString().toString() );
+ return ASN1GeneralString.getInstance( val.asString().getBytes() );
1699
1700
if ( type == DERVisibleString.class ) {
1701
- return new DERVisibleString( val.asString().toString() );
+ return ASN1VisibleString.getInstance( val.asString().getBytes() );
1702
1703
if ( type == DERNumericString.class ) {
1704
- return new DERNumericString( val.asString().toString() );
+ return ASN1NumericString.getInstance( val.asString().getBytes() );
1705
1706
1707
if ( val instanceof RubyString ) {
0 commit comments