我将 itextpdf 从 5.2.1 更新到 5.5.13.3 以修复漏洞,但找不到函数 setCrypto。它被什么功能取代了?
PdfSignatureAppearance sap = stamper.getSignatureAppearance();
sap.setCrypto(privateKey, certificateChain, null, PdfSignatureAppearance.SELF_SIGNED); // this function remove on itextpdf 5.5.13.3
//5.2.1 上的文档
/**
* Sets the cryptographic parameters.
* @param privKey the private key
* @param certChain the certificate chain
* @param crlList the certificate revocation list. It may be <CODE>null</CODE>
* @param filter the cryptographic filter type. It can be SELF_SIGNED, VERISIGN_SIGNED or WINCER_SIGNED
*/
public void setCrypto(PrivateKey privKey, Certificate[] certChain, CRL[] crlList, PdfName filter) {
this.privKey = privKey;
this.certChain = certChain;
this.crlList = crlList;
this.filter = filter;
}