Example usage for org.bouncycastle.cms SignerInformation getVersion

List of usage examples for org.bouncycastle.cms SignerInformation getVersion

Introduction

In this page you can find the example usage for org.bouncycastle.cms SignerInformation getVersion.

Prototype

public int getVersion() 

Source Link

Document

return the version number for this objects underlying SignerInfo structure.

Usage

From source file:net.ripe.rpki.commons.provisioning.cms.ProvisioningCmsObjectBuilderTest.java

License:BSD License

/**
 * http://tools.ietf.org/html/draft-ietf-sidr-rescerts-provisioning-09#section-3.1.1.6.1
 *//*  w  ww .  j  a  v  a2  s.co m*/
@Test
public void shouldCmsObjectSignerVersionBeCorrect() throws Exception {
    Collection<?> signers = signedDataParser.getSignerInfos().getSigners();
    SignerInformation signer = (SignerInformation) signers.iterator().next();
    assertEquals(3, signer.getVersion());
}

From source file:net.ripe.rpki.commons.provisioning.cms.ProvisioningCmsObjectParser.java

License:BSD License

/**
 * http://tools.ietf.org/html/draft-ietf-sidr-rescerts-provisioning-09#section-3.1.1.6.1
 *//*from w  w  w  .java2s  .c o m*/
private void verifySignerVersion(SignerInformation signer) {
    validationResult.rejectIfFalse(signer.getVersion() == CMS_OBJECT_SIGNER_VERSION, CMS_SIGNER_INFO_VERSION);
}