Cert parsing issue

Cantor, Scott cantor.2 at osu.edu
Mon Nov 17 22:51:45 EST 2014


On 11/18/14, 3:35 AM, "Cantor, Scott" <cantor.2 at osu.edu> wrote:


>
>From my tracing, it's throwing the exception in Bouncy Castle's code that 
>cryptacular is calling, rather than cryptacular itself.

Correction, it's in cryptacular.

AttributeType.class:

public static AttributeType fromOid(final String oid)
  {
  for (AttributeType t : AttributeType.values()) {
     if (t.getOid().equals(oid)) {
        return t;
     }
   }
   throw new IllegalArgumentException("Unknown AttributeType for OID " + 
oid);
  }

That seems to be limiting the possible OIDs to a fixed set, which is, I 
think, not practical.


I think the normal practice, such as it is, is to just return the OID 
string as the "name" of the attribute, if it's not recognized. Maybe 
Daniel/Marvin could patch that?

-- Scott



More information about the dev mailing list