List<X509Certificate> certList = new ArrayList();
certList.add(rootCert);
certList.add(subcacert);
certList.add(signCert);
certList.add(caCert);
Store certs = new JcaCertStore(certList);
.....
generator.addCertificates(certs);// adding certificates
generator.addCRLs(certs); //adding crls
CMSSignedData sigData = generator.generateSignatureforHash(DocumentHash, false);
//adding timestamp from TSA
return new String(Base64.encode(sigData .getEncoded()), "UTF-8");
签名是有效的,我也正在获得包括嵌入式时间戳的签名。我希望它支持LTV。但是我得到的签名没有启用LTV。