private boolean verifyDetached(final byte[] data, final byte[] signature) throws CMSException, IOException, OperatorCreationException, GeneralSecurityException {
InputStream inputStream = new ByteArrayInputStream(data);
CMSSignedDataParser signedDataParser = new CMSSignedDataParser(new CMSTypedStream(inputStream), signature);
CMSTypedStream signedContent = signedDataParser.getSignedContent();
signedContent.drain();
CollectionStore certificatesStore = (CollectionStore) signedDataParser.getCertificates();
boolean verified = true;