Java 类org.bouncycastle.asn1.x509.V2Form 实例源码

项目:AcademicTorrents-Downloader    文件:AttributeCertificateIssuer.java   
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()]);
}
项目:CryptMeme    文件:AttributeCertificateIssuer.java   
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()]);
}
项目:irma_future_id    文件:AttributeCertificateIssuer.java   
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()]);
}
项目:irma_future_id    文件:AttributeCertificateIssuer.java   
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()]);
}
项目:irma_future_id    文件:AttributeCertificateIssuer.java   
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()]);
}
项目:irma_future_id    文件:AttributeCertificateIssuer.java   
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()]);
}
项目:bc-java    文件:AttributeCertificateIssuer.java   
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()]);
}
项目:bc-java    文件:AttributeCertificateIssuer.java   
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()]);
}
项目:bc-java    文件:AttributeCertificateIssuer.java   
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()]);
}
项目:bc-java    文件:AttributeCertificateIssuer.java   
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()]);
}
项目:vbrowser    文件:VOMSAttributeCertificate.java   
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 ;
}
项目:vbrowser    文件:VOMSAttributeCertificate.java   
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 ;
    }
}
项目:ipack    文件:AttributeCertificateIssuer.java   
public AttributeCertificateIssuer(X509Principal principal)
{
    form = new V2Form(GeneralNames.getInstance(new DERSequence(new GeneralName(principal))));
}
项目:ipack    文件:AttributeCertificateIssuer.java   
public AttributeCertificateIssuer(X500Name principal)
{
    form = new V2Form(new GeneralNames(new GeneralName(principal)));
}
项目:Direct-File-Downloader    文件:AttributeCertificateIssuer.java   
public AttributeCertificateIssuer(X509Principal principal)
{
    form = new V2Form(new GeneralNames(new DERSequence(new GeneralName(principal))));
}
项目:gwt-crypto    文件:AttributeCertificateIssuer.java   
public AttributeCertificateIssuer(X500Name principal)
{
    form = new V2Form(new GeneralNames(new GeneralName(principal)));
}
项目:Aki-SSL    文件:AttributeCertificateIssuer.java   
public AttributeCertificateIssuer(X509Principal principal)
{
    form = new V2Form(GeneralNames.getInstance(new DERSequence(new GeneralName(principal))));
}
项目:Aki-SSL    文件:AttributeCertificateIssuer.java   
public AttributeCertificateIssuer(X500Name principal)
{
    form = new V2Form(new GeneralNames(new GeneralName(principal)));
}
项目:AcademicTorrents-Downloader    文件:AttributeCertificateIssuer.java   
public AttributeCertificateIssuer(X509Principal principal)
{
    form = new V2Form(new GeneralNames(new DERSequence(new GeneralName(principal))));
}
项目:CryptMeme    文件:AttributeCertificateIssuer.java   
public AttributeCertificateIssuer(X509Principal principal)
{
    form = new V2Form(GeneralNames.getInstance(new DERSequence(new GeneralName(principal))));
}
项目:irma_future_id    文件:AttributeCertificateIssuer.java   
public AttributeCertificateIssuer(X500Name principal)
{
    form = new V2Form(new GeneralNames(new GeneralName(principal)));
}
项目:irma_future_id    文件:AttributeCertificateIssuer.java   
public AttributeCertificateIssuer(X509Principal principal)
{
    form = new V2Form(GeneralNames.getInstance(new DERSequence(new GeneralName(principal))));
}
项目:irma_future_id    文件:AttributeCertificateIssuer.java   
public AttributeCertificateIssuer(
    X509Principal principal) 
{        
    form = new V2Form(new GeneralNames(new GeneralName(principal)));
}
项目:irma_future_id    文件:AttributeCertificateIssuer.java   
public AttributeCertificateIssuer(
    X509Principal principal) 
{        
    form = new V2Form(new GeneralNames(new GeneralName(principal)));
}
项目:bc-java    文件:AttributeCertificateIssuer.java   
public AttributeCertificateIssuer(X500Name principal)
{
    form = new V2Form(new GeneralNames(new GeneralName(principal)));
}
项目:bc-java    文件:AttributeCertificateIssuer.java   
public AttributeCertificateIssuer(X509Principal principal)
{
    form = new V2Form(GeneralNames.getInstance(new DERSequence(new GeneralName(principal))));
}
项目:bc-java    文件:AttributeCertificateIssuer.java   
public AttributeCertificateIssuer(
    X509Principal principal) 
{        
    form = new V2Form(new GeneralNames(new GeneralName(principal)));
}
项目:bc-java    文件:AttributeCertificateIssuer.java   
public AttributeCertificateIssuer(
    X509Principal principal) 
{        
    form = new V2Form(new GeneralNames(new GeneralName(principal)));
}