private void protect(PDDocument doc, String certPath) throws Exception
{
InputStream inStream = new FileInputStream(certPath);
CertificateFactory cf = CertificateFactory.getInstance("X.509");
Assert.assertNotNull(cf);
X509Certificate certificate = (X509Certificate)cf.generateCertificate(inStream);
Assert.assertNotNull(certificate);
inStream.close();
PublicKeyProtectionPolicy ppp = new PublicKeyProtectionPolicy();
PublicKeyRecipient recip = new PublicKeyRecipient();