private Object[] getNames() { GeneralNames name; if (form instanceof V2Form) { name = ((V2Form)form).getIssuerName(); } else { name = (GeneralNames)form; } GeneralName[] names = name.getNames(); List l = new ArrayList(names.length); for (int i = 0; i != names.length; i++) { if (names[i].getTagNo() == GeneralName.directoryName) { try { l.add(new X500Principal( ((ASN1Encodable)names[i].getName()).getEncoded())); } catch (IOException e) { throw new RuntimeException("badly formed Name object"); } } } return l.toArray(new Object[l.size()]); }
private Object[] getNames() { GeneralNames name; if (form instanceof V2Form) { name = ((V2Form)form).getIssuerName(); } else { name = (GeneralNames)form; } GeneralName[] names = name.getNames(); List l = new ArrayList(names.length); for (int i = 0; i != names.length; i++) { if (names[i].getTagNo() == GeneralName.directoryName) { try { l.add(new X500Principal( ((ASN1Encodable)names[i].getName()).toASN1Primitive().getEncoded())); } catch (IOException e) { throw new RuntimeException("badly formed Name object"); } } } return l.toArray(new Object[l.size()]); }
public X500Name[] getNames() { GeneralNames name; if (form instanceof V2Form) { name = ((V2Form)form).getIssuerName(); } else { name = (GeneralNames)form; } GeneralName[] names = name.getNames(); List l = new ArrayList(names.length); for (int i = 0; i != names.length; i++) { if (names[i].getTagNo() == GeneralName.directoryName) { l.add(X500Name.getInstance(names[i].getName())); } } return (X500Name[])l.toArray(new X500Name[l.size()]); }
private Object[] getNames() { GeneralNames name; if (form instanceof V2Form) { name = ((V2Form)form).getIssuerName(); } else { name = (GeneralNames)form; } GeneralName[] names = name.getNames(); List l = new ArrayList(names.length); for (int i = 0; i != names.length; i++) { if (names[i].getTagNo() == GeneralName.directoryName) { try { l.add(new X509Principal(((ASN1Encodable)names[i].getName()).toASN1Primitive().getEncoded())); } catch (IOException e) { throw new RuntimeException("badly formed Name object"); } } } return l.toArray(new Object[l.size()]); }
public String getIssuer() throws Exception { //---------------------------------------------------------------------------- // return the issuer's DN as a String String issuerDN = "" ; try { V2Form v2form = (V2Form) this.issuer.getIssuer() ; if( v2form != null ) { GeneralName[] issuer_name_array = v2form.getIssuerName().getNames() ; DERSequence issuer_name_sequence = (DERSequence) issuer_name_array[0].getName() ; issuerDN = this.DERSequencetoDN( issuer_name_sequence ) ; } } catch(Exception e) { throw e ; } return issuerDN ; }
public void setIssuer( String issuerDN ) throws Exception { try { DERSequence issuer_name_sequence = DNtoDERSequence( issuerDN ) ; V2Form v2form = new V2Form( new GeneralNames( new GeneralName( 4 , issuer_name_sequence ) ) ) ; this.issuer = new AttCertIssuer( v2form ) ; } catch(Exception e) { throw e ; } }
public AttributeCertificateIssuer(X509Principal principal) { form = new V2Form(GeneralNames.getInstance(new DERSequence(new GeneralName(principal)))); }
public AttributeCertificateIssuer(X500Name principal) { form = new V2Form(new GeneralNames(new GeneralName(principal))); }
public AttributeCertificateIssuer(X509Principal principal) { form = new V2Form(new GeneralNames(new DERSequence(new GeneralName(principal)))); }
public AttributeCertificateIssuer( X509Principal principal) { form = new V2Form(new GeneralNames(new GeneralName(principal))); }