Skip to content

Commit a2b4ce1

Browse files
committed
[refactor] ASN.1 decode cleanup (dead code by now)
1 parent 9773db5 commit a2b4ce1

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

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

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,14 +1040,6 @@ else if ( obj instanceof DERBMPString ) {
10401040
final RubyTime time = RubyTime.newTime(runtime, adjustedTime.getTime());
10411041
return ASN1.getClass("UTCTime").newInstance(context, time, Block.NULL_BLOCK);
10421042
}
1043-
// NOTE: keep for BC versions compatibility ... extends ASN1UTCTime (since BC 1.51)
1044-
if ( obj instanceof DERUTCTime ) {
1045-
final Date adjustedTime;
1046-
try { adjustedTime = ((DERUTCTime) obj).getAdjustedDate(); }
1047-
catch (ParseException e) { throw new IOException(e); }
1048-
final RubyTime time = RubyTime.newTime(runtime, adjustedTime.getTime());
1049-
return ASN1.getClass("UTCTime").newInstance(context, time, Block.NULL_BLOCK);
1050-
}
10511043

10521044
if ( obj instanceof ASN1GeneralizedTime ) {
10531045
final Date generalTime;
@@ -1056,16 +1048,6 @@ else if ( obj instanceof DERBMPString ) {
10561048
final RubyTime time = RubyTime.newTime(runtime, generalTime.getTime());
10571049
return ASN1.getClass("GeneralizedTime").newInstance(context, time, Block.NULL_BLOCK);
10581050
}
1059-
// NOTE: keep for BC versions compatibility ... extends ASN1GeneralizedTime (since BC 1.51)
1060-
//if ( obj instanceof DERGeneralizedTime ) {
1061-
// final Date generalTime;
1062-
// try {
1063-
// generalTime = ((DERGeneralizedTime) obj).getDate();
1064-
// }
1065-
// catch (ParseException e) { throw new IOException(e); }
1066-
// final RubyTime time = RubyTime.newTime(runtime, generalTime.getTime());
1067-
// return ASN1.getClass("GeneralizedTime").newInstance(context, time, Block.NULL_BLOCK);
1068-
//}
10691051

10701052
if ( obj instanceof ASN1ObjectIdentifier ) {
10711053
final String objId = ((ASN1ObjectIdentifier) obj).getId();

0 commit comments

Comments
 (0)