private GeneralName createGeneralName(String t,String v) throws Exception {
  GeneralNameInterface gn;
  int p=oneOf(t,"EMAIL","URI","DNS","IP","OID");
  if (p < 0) {
    throw new Exception(rb.getString("Unrecognized.GeneralName.type.") + t);
  }
switch (p) {
case 0:
    gn=new RFC822Name(v);
  break;
case 1:
gn=new URIName(v);
break;
case 2:
gn=new DNSName(v);
break;
case 3:
gn=new IPAddressName(v);
break;
default :
gn=new OIDName(v);
break;
}
return new GeneralName(gn);
}

private GeneralName createGeneralName ( String t , String v ) throws Exception { GeneralNameInterface gn ; int p = oneOf ( t , "EMAIL" , "URI" , "DNS" , "IP" , "OID" ) ; if ( p < 0 ) { throw new Exception ( rb . getString ( "Unrecognized.GeneralName.type." ) + t ) ; } switch ( p ) { case 0 : gn = new RFC822Name ( v ) ; break ; case 1 : gn = new URIName ( v ) ; break ; case 2 : gn = new DNSName ( v ) ; break ; case 3 : gn = new IPAddressName ( v ) ; break ; default : gn = new OIDName ( v ) ; break ; } return new GeneralName ( gn ) ; }
create a generalname object from known types
