Java 类org.bouncycastle.asn1.dvcs.ServiceType 实例源码

项目:ipack    文件:CCPDRequestBuilder.java   
public CCPDRequestBuilder()
{
    super(new DVCSRequestInformationBuilder(ServiceType.CCPD));
}
项目:ipack    文件:CPDRequestBuilder.java   
public CPDRequestBuilder()
{
    super(new DVCSRequestInformationBuilder(ServiceType.CPD));
}
项目:ipack    文件:VPKCRequestBuilder.java   
public VPKCRequestBuilder()
{
    super(new DVCSRequestInformationBuilder(ServiceType.VPKC));
}
项目:ipack    文件:VSDRequestBuilder.java   
public VSDRequestBuilder()
{
    super(new DVCSRequestInformationBuilder(ServiceType.VSD));
}
项目:ipack    文件:DVCSRequest.java   
/**
 * Construct a DVCS Request from a ContentInfo
 *
 * @param contentInfo the contentInfo representing the DVCSRequest
 * @throws DVCSConstructionException
 */
public DVCSRequest(ContentInfo contentInfo)
    throws DVCSConstructionException
{
    super(contentInfo);

    if (!DVCSObjectIdentifiers.id_ct_DVCSRequestData.equals(contentInfo.getContentType()))
    {
        throw new DVCSConstructionException("ContentInfo not a DVCS Request");
    }

    try
    {
        if (contentInfo.getContent().toASN1Primitive() instanceof ASN1Sequence)
        {
            this.asn1 = org.bouncycastle.asn1.dvcs.DVCSRequest.getInstance(contentInfo.getContent());
        }
        else
        {
            this.asn1 = org.bouncycastle.asn1.dvcs.DVCSRequest.getInstance(ASN1OctetString.getInstance(contentInfo.getContent()).getOctets());
        }
    }
    catch (Exception e)
    {
        throw new DVCSConstructionException("Unable to parse content: " + e.getMessage(), e);
    }

    this.reqInfo = new DVCSRequestInfo(asn1.getRequestInformation());

    int service = reqInfo.getServiceType();
    if (service == ServiceType.CPD.getValue().intValue())
    {
        this.data = new CPDRequestData(asn1.getData());
    }
    else if (service == ServiceType.VSD.getValue().intValue())
    {
        this.data = new VSDRequestData(asn1.getData());
    }
    else if (service == ServiceType.VPKC.getValue().intValue())
    {
        this.data = new VPKCRequestData(asn1.getData());
    }
    else if (service == ServiceType.CCPD.getValue().intValue())
    {
        this.data = new CCPDRequestData(asn1.getData());
    }
    else
    {
        throw new DVCSConstructionException("Unknown service type: " + service);
    }
}
项目:gwt-crypto    文件:CCPDRequestBuilder.java   
public CCPDRequestBuilder()
{
    super(new DVCSRequestInformationBuilder(ServiceType.CCPD));
}
项目:gwt-crypto    文件:CPDRequestBuilder.java   
public CPDRequestBuilder()
{
    super(new DVCSRequestInformationBuilder(ServiceType.CPD));
}
项目:gwt-crypto    文件:VPKCRequestBuilder.java   
public VPKCRequestBuilder()
{
    super(new DVCSRequestInformationBuilder(ServiceType.VPKC));
}
项目:gwt-crypto    文件:VSDRequestBuilder.java   
public VSDRequestBuilder()
{
    super(new DVCSRequestInformationBuilder(ServiceType.VSD));
}
项目:gwt-crypto    文件:DVCSRequest.java   
/**
 * Construct a DVCS Request from a ContentInfo
 *
 * @param contentInfo the contentInfo representing the DVCSRequest
 * @throws DVCSConstructionException
 */
public DVCSRequest(ContentInfo contentInfo)
    throws DVCSConstructionException
{
    super(contentInfo);

    if (!DVCSObjectIdentifiers.id_ct_DVCSRequestData.equals(contentInfo.getContentType()))
    {
        throw new DVCSConstructionException("ContentInfo not a DVCS Request");
    }

    try
    {
        if (contentInfo.getContent().toASN1Primitive() instanceof ASN1Sequence)
        {
            this.asn1 = org.bouncycastle.asn1.dvcs.DVCSRequest.getInstance(contentInfo.getContent());
        }
        else
        {
            this.asn1 = org.bouncycastle.asn1.dvcs.DVCSRequest.getInstance(ASN1OctetString.getInstance(contentInfo.getContent()).getOctets());
        }
    }
    catch (Exception e)
    {
        throw new DVCSConstructionException("Unable to parse content: " + e.getMessage(), e);
    }

    this.reqInfo = new DVCSRequestInfo(asn1.getRequestInformation());

    int service = reqInfo.getServiceType();
    if (service == ServiceType.CPD.getValue().intValue())
    {
        this.data = new CPDRequestData(asn1.getData());
    }
    else if (service == ServiceType.VSD.getValue().intValue())
    {
        this.data = new VSDRequestData(asn1.getData());
    }
    else if (service == ServiceType.VPKC.getValue().intValue())
    {
        this.data = new VPKCRequestData(asn1.getData());
    }
    else if (service == ServiceType.CCPD.getValue().intValue())
    {
        this.data = new CCPDRequestData(asn1.getData());
    }
    else
    {
        throw new DVCSConstructionException("Unknown service type: " + service);
    }
}
项目:Aki-SSL    文件:CCPDRequestBuilder.java   
public CCPDRequestBuilder()
{
    super(new DVCSRequestInformationBuilder(ServiceType.CCPD));
}
项目:Aki-SSL    文件:CPDRequestBuilder.java   
public CPDRequestBuilder()
{
    super(new DVCSRequestInformationBuilder(ServiceType.CPD));
}
项目:Aki-SSL    文件:VPKCRequestBuilder.java   
public VPKCRequestBuilder()
{
    super(new DVCSRequestInformationBuilder(ServiceType.VPKC));
}
项目:Aki-SSL    文件:VSDRequestBuilder.java   
public VSDRequestBuilder()
{
    super(new DVCSRequestInformationBuilder(ServiceType.VSD));
}
项目:Aki-SSL    文件:DVCSRequest.java   
/**
 * Construct a DVCS Request from a ContentInfo
 *
 * @param contentInfo the contentInfo representing the DVCSRequest
 * @throws DVCSConstructionException
 */
public DVCSRequest(ContentInfo contentInfo)
    throws DVCSConstructionException
{
    super(contentInfo);

    if (!DVCSObjectIdentifiers.id_ct_DVCSRequestData.equals(contentInfo.getContentType()))
    {
        throw new DVCSConstructionException("ContentInfo not a DVCS Request");
    }

    try
    {
        if (contentInfo.getContent().toASN1Primitive() instanceof ASN1Sequence)
        {
            this.asn1 = org.bouncycastle.asn1.dvcs.DVCSRequest.getInstance(contentInfo.getContent());
        }
        else
        {
            this.asn1 = org.bouncycastle.asn1.dvcs.DVCSRequest.getInstance(ASN1OctetString.getInstance(contentInfo.getContent()).getOctets());
        }
    }
    catch (Exception e)
    {
        throw new DVCSConstructionException("Unable to parse content: " + e.getMessage(), e);
    }

    this.reqInfo = new DVCSRequestInfo(asn1.getRequestInformation());

    int service = reqInfo.getServiceType();
    if (service == ServiceType.CPD.getValue().intValue())
    {
        this.data = new CPDRequestData(asn1.getData());
    }
    else if (service == ServiceType.VSD.getValue().intValue())
    {
        this.data = new VSDRequestData(asn1.getData());
    }
    else if (service == ServiceType.VPKC.getValue().intValue())
    {
        this.data = new VPKCRequestData(asn1.getData());
    }
    else if (service == ServiceType.CCPD.getValue().intValue())
    {
        this.data = new CCPDRequestData(asn1.getData());
    }
    else
    {
        throw new DVCSConstructionException("Unknown service type: " + service);
    }
}
项目:irma_future_id    文件:CCPDRequestBuilder.java   
public CCPDRequestBuilder()
{
    super(new DVCSRequestInformationBuilder(ServiceType.CCPD));
}
项目:irma_future_id    文件:CPDRequestBuilder.java   
public CPDRequestBuilder()
{
    super(new DVCSRequestInformationBuilder(ServiceType.CPD));
}
项目:irma_future_id    文件:VPKCRequestBuilder.java   
public VPKCRequestBuilder()
{
    super(new DVCSRequestInformationBuilder(ServiceType.VPKC));
}
项目:irma_future_id    文件:VSDRequestBuilder.java   
public VSDRequestBuilder()
{
    super(new DVCSRequestInformationBuilder(ServiceType.VSD));
}
项目:irma_future_id    文件:DVCSRequest.java   
/**
 * Construct a DVCS Request from a ContentInfo
 *
 * @param contentInfo the contentInfo representing the DVCSRequest
 * @throws DVCSConstructionException
 */
public DVCSRequest(ContentInfo contentInfo)
    throws DVCSConstructionException
{
    super(contentInfo);

    if (!DVCSObjectIdentifiers.id_ct_DVCSRequestData.equals(contentInfo.getContentType()))
    {
        throw new DVCSConstructionException("ContentInfo not a DVCS Request");
    }

    try
    {
        if (contentInfo.getContent().toASN1Primitive() instanceof ASN1Sequence)
        {
            this.asn1 = org.bouncycastle.asn1.dvcs.DVCSRequest.getInstance(contentInfo.getContent());
        }
        else
        {
            this.asn1 = org.bouncycastle.asn1.dvcs.DVCSRequest.getInstance(ASN1OctetString.getInstance(contentInfo.getContent()).getOctets());
        }
    }
    catch (Exception e)
    {
        throw new DVCSConstructionException("Unable to parse content: " + e.getMessage(), e);
    }

    this.reqInfo = new DVCSRequestInfo(asn1.getRequestInformation());

    int service = reqInfo.getServiceType();
    if (service == ServiceType.CPD.getValue().intValue())
    {
        this.data = new CPDRequestData(asn1.getData());
    }
    else if (service == ServiceType.VSD.getValue().intValue())
    {
        this.data = new VSDRequestData(asn1.getData());
    }
    else if (service == ServiceType.VPKC.getValue().intValue())
    {
        this.data = new VPKCRequestData(asn1.getData());
    }
    else if (service == ServiceType.CCPD.getValue().intValue())
    {
        this.data = new CCPDRequestData(asn1.getData());
    }
    else
    {
        throw new DVCSConstructionException("Unknown service type: " + service);
    }
}
项目:bc-java    文件:CCPDRequestBuilder.java   
public CCPDRequestBuilder()
{
    super(new DVCSRequestInformationBuilder(ServiceType.CCPD));
}
项目:bc-java    文件:CPDRequestBuilder.java   
public CPDRequestBuilder()
{
    super(new DVCSRequestInformationBuilder(ServiceType.CPD));
}
项目:bc-java    文件:VPKCRequestBuilder.java   
public VPKCRequestBuilder()
{
    super(new DVCSRequestInformationBuilder(ServiceType.VPKC));
}
项目:bc-java    文件:VSDRequestBuilder.java   
public VSDRequestBuilder()
{
    super(new DVCSRequestInformationBuilder(ServiceType.VSD));
}
项目:bc-java    文件:DVCSRequest.java   
/**
 * Construct a DVCS Request from a ContentInfo
 *
 * @param contentInfo the contentInfo representing the DVCSRequest
 * @throws DVCSConstructionException
 */
public DVCSRequest(ContentInfo contentInfo)
    throws DVCSConstructionException
{
    super(contentInfo);

    if (!DVCSObjectIdentifiers.id_ct_DVCSRequestData.equals(contentInfo.getContentType()))
    {
        throw new DVCSConstructionException("ContentInfo not a DVCS Request");
    }

    try
    {
        if (contentInfo.getContent().toASN1Primitive() instanceof ASN1Sequence)
        {
            this.asn1 = org.bouncycastle.asn1.dvcs.DVCSRequest.getInstance(contentInfo.getContent());
        }
        else
        {
            this.asn1 = org.bouncycastle.asn1.dvcs.DVCSRequest.getInstance(ASN1OctetString.getInstance(contentInfo.getContent()).getOctets());
        }
    }
    catch (Exception e)
    {
        throw new DVCSConstructionException("Unable to parse content: " + e.getMessage(), e);
    }

    this.reqInfo = new DVCSRequestInfo(asn1.getRequestInformation());

    int service = reqInfo.getServiceType();
    if (service == ServiceType.CPD.getValue().intValue())
    {
        this.data = new CPDRequestData(asn1.getData());
    }
    else if (service == ServiceType.VSD.getValue().intValue())
    {
        this.data = new VSDRequestData(asn1.getData());
    }
    else if (service == ServiceType.VPKC.getValue().intValue())
    {
        this.data = new VPKCRequestData(asn1.getData());
    }
    else if (service == ServiceType.CCPD.getValue().intValue())
    {
        this.data = new CCPDRequestData(asn1.getData());
    }
    else
    {
        throw new DVCSConstructionException("Unknown service type: " + service);
    }
}