You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2018/01/12 19:13:30 UTC
svn commit: r1821020 -
/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateVisibleSignature2.java
Author: tilman
Date: Fri Jan 12 19:13:30 2018
New Revision: 1821020
URL: http://svn.apache.org/viewvc?rev=1821020&view=rev
Log:
PDFBOX-3198: move constructor to beginning
Modified:
pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateVisibleSignature2.java
Modified: pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateVisibleSignature2.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateVisibleSignature2.java?rev=1821020&r1=1821019&r2=1821020&view=diff
==============================================================================
--- pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateVisibleSignature2.java (original)
+++ pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateVisibleSignature2.java Fri Jan 12 19:13:30 2018
@@ -77,6 +77,24 @@ public class CreateVisibleSignature2 ext
private boolean lateExternalSigning = false;
private File imageFile;
+ /**
+ * Initialize the signature creator with a keystore (pkcs12) and pin that
+ * should be used for the signature.
+ *
+ * @param keystore is a pkcs12 keystore.
+ * @param pin is the pin for the keystore / private key
+ * @throws KeyStoreException if the keystore has not been initialized (loaded)
+ * @throws NoSuchAlgorithmException if the algorithm for recovering the key cannot be found
+ * @throws UnrecoverableKeyException if the given password is wrong
+ * @throws CertificateException if the certificate is not valid as signing time
+ * @throws IOException if no certificate could be found
+ */
+ public CreateVisibleSignature2(KeyStore keystore, char[] pin)
+ throws KeyStoreException, UnrecoverableKeyException, NoSuchAlgorithmException, IOException, CertificateException
+ {
+ super(keystore, pin);
+ }
+
public File getImageFile()
{
return imageFile;
@@ -105,24 +123,6 @@ public class CreateVisibleSignature2 ext
}
/**
- * Initialize the signature creator with a keystore (pkcs12) and pin that
- * should be used for the signature.
- *
- * @param keystore is a pkcs12 keystore.
- * @param pin is the pin for the keystore / private key
- * @throws KeyStoreException if the keystore has not been initialized (loaded)
- * @throws NoSuchAlgorithmException if the algorithm for recovering the key cannot be found
- * @throws UnrecoverableKeyException if the given password is wrong
- * @throws CertificateException if the certificate is not valid as signing time
- * @throws IOException if no certificate could be found
- */
- public CreateVisibleSignature2(KeyStore keystore, char[] pin)
- throws KeyStoreException, UnrecoverableKeyException, NoSuchAlgorithmException, IOException, CertificateException
- {
- super(keystore, pin);
- }
-
- /**
* Sign pdf file and create new file that ends with "_signed.pdf".
*
* @param inputFile The source pdf document file.