}
}
// Creating the signature
ExternalDigest digest = new BouncyCastleDigest();
ExternalSignature signature = new PrivateKeySignature(pk, digestAlgorithm, null);
MakeSignature.signDetached(appearance, digest, signature, chain, crlList,
ocspClient, tsaClient, 0, subfilter);
}