Example usage for org.bouncycastle.cms KeyTransRecipientId getSubjectKeyIdentifier

List of usage examples for org.bouncycastle.cms KeyTransRecipientId getSubjectKeyIdentifier

Introduction

In this page you can find the example usage for org.bouncycastle.cms KeyTransRecipientId getSubjectKeyIdentifier.

Prototype

public byte[] getSubjectKeyIdentifier() 

Source Link

Usage

From source file:mitm.common.security.cms.RecipientInfoImpl.java

License:Open Source License

private KeyTransRecipientId getKeyTransRecipientId(org.bouncycastle.cms.KeyTransRecipientId otherRecipientId)
        throws RecipientInfoException {
    try {//from  w w w .ja va  2  s  . c  om
        KeyTransRecipientIdImpl recipientId = new KeyTransRecipientIdImpl(
                X500PrincipalUtils.fromX500Name(otherRecipientId.getIssuer()),
                otherRecipientId.getSerialNumber(), otherRecipientId.getSubjectKeyIdentifier());

        return recipientId;
    } catch (IOException e) {
        throw new RecipientInfoException(e);
    }
}