We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb3d906 commit 64cadf0Copy full SHA for 64cadf0
1 file changed
src/main/java/org/jruby/ext/openssl/ASN1.java
@@ -1697,13 +1697,13 @@ ASN1Encodable toASN1(final ThreadContext context) {
1697
}
1698
1699
if ( type == DERGeneralString.class ) {
1700
- return new DERGeneralString( val.asString().toString() );
+ return ASN1GeneralString.getInstance( val.asString().getBytes() );
1701
1702
if ( type == DERVisibleString.class ) {
1703
- return new DERVisibleString( val.asString().toString() );
+ return ASN1VisibleString.getInstance( val.asString().getBytes() );
1704
1705
if ( type == DERNumericString.class ) {
1706
- return new DERNumericString( val.asString().toString() );
+ return ASN1NumericString.getInstance( val.asString().getBytes() );
1707
1708
1709
if ( val instanceof RubyString ) {
0 commit comments