PdfSignature signature = new PdfSignature(PdfName.ADOBE_PPKLITE, PdfName.ADBE_PKCS7_DETACHED);
signature.setReason(appearance.getReason());
signature.setLocation(appearance.getLocation());
signature.setContact(appearance.getContact());
signature.setDate(new PdfDate(appearance.getSignDate()));
if ((this.parameters.getSignatureInfo() != null) && (ConditionUtils.isNotEmpty(this.parameters.getSignatureInfo().getName()))) {
signature.setName(this.parameters.getSignatureInfo().getName());
} else {
signature.setName(BouncyCastleProviderHelper.toString(certificate.getSubjectX500Principal()));