Java 类org.bouncycastle.asn1.isismtt.ocsp.RequestedCertificate 实例源码

项目:gwt-crypto    文件:RequestedCertificateUnitTest.java   
private void checkConstruction(
    RequestedCertificate requested,
    int type,
    byte[] certOctets,
    Certificate cert)
    throws IOException
{
    checkValues(requested, type, certOctets, cert);

    requested = RequestedCertificate.getInstance(requested);

    checkValues(requested, type, certOctets, cert);

    ASN1InputStream aIn = new ASN1InputStream(requested.toASN1Primitive().getEncoded());

    Object obj = aIn.readObject();

    requested = RequestedCertificate.getInstance(obj);

    checkValues(requested, type, certOctets, cert);
}
项目:gwt-crypto    文件:RequestedCertificateUnitTest.java   
private void checkValues(
    RequestedCertificate requested,
    int type,
    byte[] certOctets,
    Certificate cert)
    throws IOException
{
    checkMandatoryField("certType", type, requested.getType());

    if (requested.getType() == RequestedCertificate.certificate)
    {
        checkMandatoryField("certificate", cert.getEncoded(), requested.getCertificateBytes());
    }
    else
    {
        checkMandatoryField("certificateOctets", certOctets, requested.getCertificateBytes());
    }
}
项目:irma_future_id    文件:RequestedCertificateUnitTest.java   
private void checkConstruction(
    RequestedCertificate requested,
    int type,
    byte[] certOctets,
    Certificate cert)
    throws IOException
{
    checkValues(requested, type, certOctets, cert);

    requested = RequestedCertificate.getInstance(requested);

    checkValues(requested, type, certOctets, cert);

    ASN1InputStream aIn = new ASN1InputStream(requested.toASN1Object().getEncoded());

    Object obj = aIn.readObject();

    requested = RequestedCertificate.getInstance(obj);

    checkValues(requested, type, certOctets, cert);
}
项目:irma_future_id    文件:RequestedCertificateUnitTest.java   
private void checkValues(
    RequestedCertificate requested,
    int type,
    byte[] certOctets,
    Certificate cert)
    throws IOException
{
    checkMandatoryField("certType", type, requested.getType());

    if (requested.getType() == RequestedCertificate.certificate)
    {
        checkMandatoryField("certificate", cert.getEncoded(), requested.getCertificateBytes());
    }
    else
    {
        checkMandatoryField("certificateOctets", certOctets, requested.getCertificateBytes());
    }
}
项目:bc-java    文件:RequestedCertificateUnitTest.java   
private void checkConstruction(
    RequestedCertificate requested,
    int type,
    byte[] certOctets,
    Certificate cert)
    throws IOException
{
    checkValues(requested, type, certOctets, cert);

    requested = RequestedCertificate.getInstance(requested);

    checkValues(requested, type, certOctets, cert);

    ASN1InputStream aIn = new ASN1InputStream(requested.toASN1Object().getEncoded());

    Object obj = aIn.readObject();

    requested = RequestedCertificate.getInstance(obj);

    checkValues(requested, type, certOctets, cert);
}
项目:bc-java    文件:RequestedCertificateUnitTest.java   
private void checkValues(
    RequestedCertificate requested,
    int type,
    byte[] certOctets,
    Certificate cert)
    throws IOException
{
    checkMandatoryField("certType", type, requested.getType());

    if (requested.getType() == RequestedCertificate.certificate)
    {
        checkMandatoryField("certificate", cert.getEncoded(), requested.getCertificateBytes());
    }
    else
    {
        checkMandatoryField("certificateOctets", certOctets, requested.getCertificateBytes());
    }
}