@@ -1072,16 +1072,7 @@ else if ( obj instanceof DERBMPString ) {
1072
1072
return ASN1 .getClass ("ObjectId" ).newInstance (context , runtime .newString (objId ), Block .NULL_BLOCK );
1073
1073
}
1074
1074
1075
- if ( obj instanceof ASN1TaggedObject ) {
1076
- final ASN1TaggedObject taggedObj = (ASN1TaggedObject ) obj ;
1077
- IRubyObject val = decodeObject (context , ASN1 , taggedObj .getBaseObject ());
1078
- IRubyObject tag = runtime .newFixnum ( taggedObj .getTagNo () );
1079
- IRubyObject tag_class = runtime .newSymbol ("CONTEXT_SPECIFIC" );
1080
- final RubyArray valArr = runtime .newArray (val );
1081
- return ASN1 .getClass ("ASN1Data" ).newInstance (context , new IRubyObject [] { valArr , tag , tag_class }, Block .NULL_BLOCK );
1082
- }
1083
-
1084
- if ( obj instanceof ASN1ApplicationSpecific ) {
1075
+ if ( obj instanceof ASN1ApplicationSpecific ) { // TODO this will likely break in BC version > 1.71
1085
1076
final ASN1ApplicationSpecific appSpecific = (ASN1ApplicationSpecific ) obj ;
1086
1077
IRubyObject tag = runtime .newFixnum ( appSpecific .getApplicationTag () );
1087
1078
IRubyObject tag_class = runtime .newSymbol ("APPLICATION" );
@@ -1091,6 +1082,15 @@ else if ( obj instanceof DERBMPString ) {
1091
1082
return ASN1 .getClass ("ASN1Data" ).newInstance (context , new IRubyObject [] { valArr , tag , tag_class }, Block .NULL_BLOCK );
1092
1083
}
1093
1084
1085
+ if ( obj instanceof ASN1TaggedObject ) {
1086
+ final ASN1TaggedObject taggedObj = (ASN1TaggedObject ) obj ;
1087
+ IRubyObject val = decodeObject (context , ASN1 , taggedObj .getBaseObject ());
1088
+ IRubyObject tag = runtime .newFixnum ( taggedObj .getTagNo () );
1089
+ IRubyObject tag_class = runtime .newSymbol ("CONTEXT_SPECIFIC" );
1090
+ final RubyArray valArr = runtime .newArray (val );
1091
+ return ASN1 .getClass ("ASN1Data" ).newInstance (context , new IRubyObject [] { valArr , tag , tag_class }, Block .NULL_BLOCK );
1092
+ }
1093
+
1094
1094
if ( obj instanceof ASN1Sequence ) {
1095
1095
@ SuppressWarnings ("unchecked" )
1096
1096
RubyArray arr = decodeObjects (context , ASN1 , ((ASN1Sequence ) obj ).getObjects ());
0 commit comments