@@ -138,26 +138,15 @@ public Object call() throws GeneralSecurityException {
138
138
}
139
139
ASN1Set in_attrs = req .getCertificationRequestInfo ().getAttributes ();
140
140
for (Enumeration enm = in_attrs .getObjects ();enm .hasMoreElements ();) {
141
- Object o = enm .nextElement ();
142
- System .out .println ("enm: " + o .getClass ());
143
- if (o instanceof DERSequence ) {
144
- DERSequence val = (DERSequence )o ;
145
- DERObjectIdentifier v0 = (DERObjectIdentifier )val .getObjectAt (0 );
146
- DERObject v1 = (DERObject )val .getObjectAt (1 );
147
- IRubyObject a1 = getRuntime ().newString (ASN1 .getSymLookup (getRuntime ()).get (v0 ));
148
- IRubyObject a2 = ASN1 .decode (getRuntime ().getClassFromPath ("OpenSSL::ASN1" ), RubyString .newString (getRuntime (), v1 .getDEREncoded ()));
149
- add_attribute (Utils .newRubyInstance (getRuntime (), "OpenSSL::X509::Attribute" , new IRubyObject [] { a1 , a2 }));
150
- } else {
151
- DERSet obj = (DERSet )o ;
152
- for (Enumeration enm2 = obj .getObjects ();enm2 .hasMoreElements ();) {
153
- DERSequence val = (DERSequence )enm2 .nextElement ();
154
- DERObjectIdentifier v0 = (DERObjectIdentifier )val .getObjectAt (0 );
155
- DERObject v1 = (DERObject )val .getObjectAt (1 );
156
- IRubyObject a1 = getRuntime ().newString (ASN1 .getSymLookup (getRuntime ()).get (v0 ));
157
- IRubyObject a2 = ASN1 .decode (getRuntime ().getClassFromPath ("OpenSSL::ASN1" ), RubyString .newString (getRuntime (), v1 .getDEREncoded ()));
158
- add_attribute (Utils .newRubyInstance (getRuntime (), "OpenSSL::X509::Attribute" , new IRubyObject [] { a1 , a2 }));
159
- }
160
- }
141
+ DERSet obj = (DERSet )enm .nextElement ();
142
+ for (Enumeration enm2 = obj .getObjects ();enm2 .hasMoreElements ();) {
143
+ DERSequence val = (DERSequence )enm2 .nextElement ();
144
+ DERObjectIdentifier v0 = (DERObjectIdentifier )val .getObjectAt (0 );
145
+ DERObject v1 = (DERObject )val .getObjectAt (1 );
146
+ IRubyObject a1 = getRuntime ().newString (ASN1 .getSymLookup (getRuntime ()).get (v0 ));
147
+ IRubyObject a2 = ASN1 .decode (getRuntime ().getClassFromPath ("OpenSSL::ASN1" ), RubyString .newString (getRuntime (), v1 .getDEREncoded ()));
148
+ add_attribute (Utils .newRubyInstance (getRuntime (), "OpenSSL::X509::Attribute" , new IRubyObject [] { a1 , a2 }));
149
+ }
161
150
}
162
151
this .valid = true ;
163
152
return this ;
0 commit comments