diff options
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/gv/egiz/pdfas/commandline/Main.java | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/commandline/Main.java b/src/main/java/at/gv/egiz/pdfas/commandline/Main.java index 2dc551f..3595ef1 100644 --- a/src/main/java/at/gv/egiz/pdfas/commandline/Main.java +++ b/src/main/java/at/gv/egiz/pdfas/commandline/Main.java @@ -1247,24 +1247,29 @@ public abstract class Main public static void formatVerifyResult(VerifyResult result, PrintWriter writer) throws SettingNotFoundException
{
- writer.println(" Zertifikat:");
- writer.println(" Signator: " + result.getSignerCertificate().getSubjectDN().toString());
- writer.println(" Aussteller: " + result.getSignerCertificate().getIssuerDN().toString());
- writer.println(" Seriennummer: " + result.getSignerCertificate().getSerialNumber());
- List public_properties = result.getPublicProperties();
- Iterator it = public_properties.iterator();
- while (it.hasNext())
- {
- String public_property = (String) it.next();
- writer.println(" Eigenschaft: " + public_property);
- }
-
- writer.println(" Zertifikat-Check:");
- writer.println(" " + result.getCertificateCheck().getCode() + " - " + result.getCertificateCheck().getMessage());
- writer.println(" Signatur-Check:");
- writer.println(" " + result.getValueCheckCode().getCode() + " - " + result.getValueCheckCode().getMessage());
- writer.println(" Manifest-Check:");
- writer.println(" " + result.getManifestCheckCode().getCode() + " - " + result.getManifestCheckCode().getMessage());
+ if (result.isVerificationDone()) {
+ writer.println(" Zertifikat:");
+ writer.println(" Signator: " + result.getSignerCertificate().getSubjectDN().toString());
+ writer.println(" Aussteller: " + result.getSignerCertificate().getIssuerDN().toString());
+ writer.println(" Seriennummer: " + result.getSignerCertificate().getSerialNumber());
+ List public_properties = result.getPublicProperties();
+ Iterator it = public_properties.iterator();
+ while (it.hasNext())
+ {
+ String public_property = (String) it.next();
+ writer.println(" Eigenschaft: " + public_property);
+ }
+
+ writer.println(" Zertifikat-Check:");
+ writer.println(" " + result.getCertificateCheck().getCode() + " - " + result.getCertificateCheck().getMessage());
+ writer.println(" Signatur-Check:");
+ writer.println(" " + result.getValueCheckCode().getCode() + " - " + result.getValueCheckCode().getMessage());
+ writer.println(" Manifest-Check:");
+ writer.println(" " + result.getManifestCheckCode().getCode() + " - " + result.getManifestCheckCode().getMessage());
+ } else {
+ PdfAsException ex = result.getVerificationException();
+ writer.println("\n Signaturprüfung für diese Signatur nicht möglich: " + ErrorCodeHelper.formErrorMessage(ex));
+ }
}
}
|