public CMSAuthEnvelopedData(ContentInfo contentInfo) throws CMSException { this.contentInfo = contentInfo; AuthEnvelopedData authEnvData = AuthEnvelopedData.getInstance(contentInfo.getContent()); this.originator = authEnvData.getOriginatorInfo(); // // read the recipients // ASN1Set recipientInfos = authEnvData.getRecipientInfos(); // // read the auth-encrypted content info // EncryptedContentInfo authEncInfo = authEnvData.getAuthEncryptedContentInfo(); this.authEncAlg = authEncInfo.getContentEncryptionAlgorithm(); // final CMSProcessable processable = new CMSProcessableByteArray( // authEncInfo.getEncryptedContent().getOctets()); CMSSecureReadable secureReadable = new CMSSecureReadable() { public InputStream getInputStream() throws IOException, CMSException { return null; } }; // // build the RecipientInformationStore // this.recipientInfoStore = CMSEnvelopedHelper.buildRecipientInformationStore( recipientInfos, this.authEncAlg, secureReadable); // FIXME These need to be passed to the AEAD cipher as AAD (Additional Authenticated Data) this.authAttrs = authEnvData.getAuthAttrs(); this.mac = authEnvData.getMac().getOctets(); this.unauthAttrs = authEnvData.getUnauthAttrs(); }