diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-11-28 11:04:46 +0100 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-11-28 11:04:46 +0100 |
commit | 2b70ab18a97dd248d478d985ae602bd7e3a9d320 (patch) | |
tree | 32ec7e5d1b327f4b356f404d55d071c444a06a2e /pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/util | |
parent | 48f8e5362fa6c7b2f0a708e2dd61cac1dd366397 (diff) | |
download | pdf-as-4-2b70ab18a97dd248d478d985ae602bd7e3a9d320.tar.gz pdf-as-4-2b70ab18a97dd248d478d985ae602bd7e3a9d320.tar.bz2 pdf-as-4-2b70ab18a97dd248d478d985ae602bd7e3a9d320.zip |
Logging Error Levels adapted
Diffstat (limited to 'pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/util')
-rw-r--r-- | pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/util/SignatureUtils.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/util/SignatureUtils.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/util/SignatureUtils.java index ef5df8b1..6e584f32 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/util/SignatureUtils.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/util/SignatureUtils.java @@ -45,12 +45,12 @@ public class SignatureUtils implements ErrorConstants { // get the signer infos SignerInfo[] signerInfos = signedData.getSignerInfos(); if (signerInfos.length == 0) { - logger.error("Invalid signature (no signer information)"); + logger.warn("Invalid signature (no signer information)"); throw new PDFASError(ERROR_SIG_INVALID_BKU_SIG); } if (signerInfos.length != 1) { - logger.error("Invalid signature (multiple signer information)"); + logger.warn("Invalid signature (multiple signer information)"); throw new PDFASError(ERROR_SIG_INVALID_BKU_SIG); } // verify the signatures @@ -72,7 +72,7 @@ public class SignatureUtils implements ErrorConstants { signedCertificate = signerInfos[0] .getSignedAttribute(ObjectID.signingCertificateV2); if (signedCertificate == null) { - logger.error("Signature ERROR missing signed Signing Certificate: "); + logger.warn("Signature ERROR missing signed Signing Certificate: "); throw new PDFASError(ERROR_SIG_INVALID_BKU_SIG); } else { @@ -84,12 +84,12 @@ public class SignatureUtils implements ErrorConstants { // OK logger.debug("Found and verified SigningCertificateV2"); } else { - logger.error("Signature ERROR certificate missmatch: "); + logger.error("Signature ERROR certificate missmatch, misbehaving Signature Backend?"); throw new PDFASError(ERROR_SIG_INVALID_BKU_SIG); } } catch (Throwable e) { - logger.error("Signature ERROR wrong encoding for ESSCertIDv2:"); + logger.error("Signature ERROR wrong encoding for ESSCertIDv2, misbehaving Signature Backend?"); throw new PDFASError(ERROR_SIG_INVALID_BKU_SIG, e); } @@ -102,12 +102,12 @@ public class SignatureUtils implements ErrorConstants { // OK logger.debug("Found and verified SigningCertificate"); } else { - logger.error("Signature ERROR certificate missmatch"); + logger.warn("Signature ERROR certificate missmatch, misbehaving Signature Backend?"); throw new PDFASError(ERROR_SIG_INVALID_BKU_SIG); } } catch (Throwable e) { - logger.error("Signature ERROR wrong encoding for ESSCertIDv2"); + logger.error("Signature ERROR wrong encoding for ESSCertIDv2, misbehaving Signature Backend?"); throw new PDFASError(ERROR_SIG_INVALID_BKU_SIG, e); } @@ -121,7 +121,7 @@ public class SignatureUtils implements ErrorConstants { } catch (SignatureException ex) { // if the signature is not OK a SignatureException // is thrown - logger.error( + logger.warn( "Signature ERROR from signer: " + signedData.getCertificate( signerInfos[0].getSignerIdentifier()) |