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

项目:irma_future_id    文件:AllTests.java   
public void testVPKCRequest()
    throws Exception
{
    SignedDVCSMessageGenerator gen = getSignedDVCSMessageGenerator();

    VPKCRequestBuilder reqBuilder = new VPKCRequestBuilder();

    reqBuilder.addTargetChain(new JcaX509CertificateHolder(signCert));

    CMSSignedData reqMsg = gen.build(reqBuilder.build());

    assertTrue(reqMsg.verifySignatures(new SignerInformationVerifierProvider()
    {
        public SignerInformationVerifier get(SignerId sid)
            throws OperatorCreationException
        {
            return new JcaSimpleSignerInfoVerifierBuilder().setProvider(BC).build(signCert);
        }
    }));

    DVCSRequest request = new DVCSRequest(reqMsg);

    VPKCRequestData reqData = (VPKCRequestData)request.getData();

    assertEquals(new TargetEtcChain(new CertEtcToken(CertEtcToken.TAG_CERTIFICATE, new JcaX509CertificateHolder(signCert).toASN1Structure())), ((TargetChain)reqData.getCerts().get(0)).toASN1Structure());
}
项目:bc-java    文件:AllTests.java   
public void testVPKCRequest()
    throws Exception
{
    SignedDVCSMessageGenerator gen = getSignedDVCSMessageGenerator();

    VPKCRequestBuilder reqBuilder = new VPKCRequestBuilder();

    reqBuilder.addTargetChain(new JcaX509CertificateHolder(signCert));

    CMSSignedData reqMsg = gen.build(reqBuilder.build());

    assertTrue(reqMsg.verifySignatures(new SignerInformationVerifierProvider()
    {
        public SignerInformationVerifier get(SignerId sid)
            throws OperatorCreationException
        {
            return new JcaSimpleSignerInfoVerifierBuilder().setProvider(BC).build(signCert);
        }
    }));

    DVCSRequest request = new DVCSRequest(reqMsg);

    VPKCRequestData reqData = (VPKCRequestData)request.getData();

    assertEquals(new TargetEtcChain(new CertEtcToken(CertEtcToken.TAG_CERTIFICATE, new JcaX509CertificateHolder(signCert).toASN1Structure())), ((TargetChain)reqData.getCerts().get(0)).toASN1Structure());
}
项目:ipack    文件:VPKCRequestBuilder.java   
/**
 * Adds a TargetChain representing a X.509 certificate to the request.
 *
 * @param cert the certificate to be added
 */
public void addTargetChain(X509CertificateHolder cert)
{
    chains.add(new TargetEtcChain(new CertEtcToken(CertEtcToken.TAG_CERTIFICATE, cert.toASN1Structure())));
}
项目:ipack    文件:VPKCRequestBuilder.java   
/**
 * Adds a TargetChain representing a single X.509 Extension to the request
 *
 * @param extension the extension to be added.
 */
public void addTargetChain(Extension extension)
{
    chains.add(new TargetEtcChain(new CertEtcToken(extension)));
}
项目:gwt-crypto    文件:VPKCRequestBuilder.java   
/**
 * Adds a TargetChain representing a X.509 certificate to the request.
 *
 * @param cert the certificate to be added
 */
public void addTargetChain(X509CertificateHolder cert)
{
    chains.add(new TargetEtcChain(new CertEtcToken(CertEtcToken.TAG_CERTIFICATE, cert.toASN1Structure())));
}
项目:gwt-crypto    文件:VPKCRequestBuilder.java   
/**
 * Adds a TargetChain representing a single X.509 Extension to the request
 *
 * @param extension the extension to be added.
 */
public void addTargetChain(Extension extension)
{
    chains.add(new TargetEtcChain(new CertEtcToken(extension)));
}
项目:Aki-SSL    文件:VPKCRequestBuilder.java   
/**
 * Adds a TargetChain representing a X.509 certificate to the request.
 *
 * @param cert the certificate to be added
 */
public void addTargetChain(X509CertificateHolder cert)
{
    chains.add(new TargetEtcChain(new CertEtcToken(CertEtcToken.TAG_CERTIFICATE, cert.toASN1Structure())));
}
项目:Aki-SSL    文件:VPKCRequestBuilder.java   
/**
 * Adds a TargetChain representing a single X.509 Extension to the request
 *
 * @param extension the extension to be added.
 */
public void addTargetChain(Extension extension)
{
    chains.add(new TargetEtcChain(new CertEtcToken(extension)));
}
项目:irma_future_id    文件:VPKCRequestBuilder.java   
/**
 * Adds a TargetChain representing a X.509 certificate to the request.
 *
 * @param cert the certificate to be added
 */
public void addTargetChain(X509CertificateHolder cert)
{
    chains.add(new TargetEtcChain(new CertEtcToken(CertEtcToken.TAG_CERTIFICATE, cert.toASN1Structure())));
}
项目:irma_future_id    文件:VPKCRequestBuilder.java   
/**
 * Adds a TargetChain representing a single X.509 Extension to the request
 *
 * @param extension the extension to be added.
 */
public void addTargetChain(Extension extension)
{
    chains.add(new TargetEtcChain(new CertEtcToken(extension)));
}
项目:bc-java    文件:VPKCRequestBuilder.java   
/**
 * Adds a TargetChain representing a X.509 certificate to the request.
 *
 * @param cert the certificate to be added
 */
public void addTargetChain(X509CertificateHolder cert)
{
    chains.add(new TargetEtcChain(new CertEtcToken(CertEtcToken.TAG_CERTIFICATE, cert.toASN1Structure())));
}
项目:bc-java    文件:VPKCRequestBuilder.java   
/**
 * Adds a TargetChain representing a single X.509 Extension to the request
 *
 * @param extension the extension to be added.
 */
public void addTargetChain(Extension extension)
{
    chains.add(new TargetEtcChain(new CertEtcToken(extension)));
}