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 | |
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')
13 files changed, 20 insertions, 20 deletions
diff --git a/pdf-as-lib/src/configuration/pdfastmp/024855edaaec4a9e70a10c8dada03c3c2872abd9/0c12b16dc63efa3bfc53fb580b20de5a56f6f86f.tmppdf b/pdf-as-lib/src/configuration/pdfastmp/024855edaaec4a9e70a10c8dada03c3c2872abd9/0c12b16dc63efa3bfc53fb580b20de5a56f6f86f.tmppdf Binary files differnew file mode 100644 index 00000000..867f68db --- /dev/null +++ b/pdf-as-lib/src/configuration/pdfastmp/024855edaaec4a9e70a10c8dada03c3c2872abd9/0c12b16dc63efa3bfc53fb580b20de5a56f6f86f.tmppdf diff --git a/pdf-as-lib/src/configuration/pdfastmp/1bc3511b26297bf767ab8bb767815ec65d48b71e/651beb1a92f9313e46752667ad2caad8e55cc785.tmppdf b/pdf-as-lib/src/configuration/pdfastmp/1bc3511b26297bf767ab8bb767815ec65d48b71e/651beb1a92f9313e46752667ad2caad8e55cc785.tmppdf Binary files differnew file mode 100644 index 00000000..867f68db --- /dev/null +++ b/pdf-as-lib/src/configuration/pdfastmp/1bc3511b26297bf767ab8bb767815ec65d48b71e/651beb1a92f9313e46752667ad2caad8e55cc785.tmppdf diff --git a/pdf-as-lib/src/configuration/pdfastmp/1e58de17f4bbdc2a3eb911d8d73b8e5f0b9b8d8f/5990344a0c25a1998c13b80fb54163df279ab0b3.tmppdf b/pdf-as-lib/src/configuration/pdfastmp/1e58de17f4bbdc2a3eb911d8d73b8e5f0b9b8d8f/5990344a0c25a1998c13b80fb54163df279ab0b3.tmppdf Binary files differnew file mode 100644 index 00000000..867f68db --- /dev/null +++ b/pdf-as-lib/src/configuration/pdfastmp/1e58de17f4bbdc2a3eb911d8d73b8e5f0b9b8d8f/5990344a0c25a1998c13b80fb54163df279ab0b3.tmppdf diff --git a/pdf-as-lib/src/configuration/pdfastmp/43cca4ac73be06a084ff233127b261dbf14ea783/3db03bf642b2dfefb9d5e9c4685b6bf4d2801347.tmppdf b/pdf-as-lib/src/configuration/pdfastmp/43cca4ac73be06a084ff233127b261dbf14ea783/3db03bf642b2dfefb9d5e9c4685b6bf4d2801347.tmppdf Binary files differnew file mode 100644 index 00000000..867f68db --- /dev/null +++ b/pdf-as-lib/src/configuration/pdfastmp/43cca4ac73be06a084ff233127b261dbf14ea783/3db03bf642b2dfefb9d5e9c4685b6bf4d2801347.tmppdf diff --git a/pdf-as-lib/src/configuration/pdfastmp/7c7e273e4cecbcf5e0bca3e3770535b767ccf65c/fdf2688a1a93fbf4759ddc444275ae38e03fa86e.tmppdf b/pdf-as-lib/src/configuration/pdfastmp/7c7e273e4cecbcf5e0bca3e3770535b767ccf65c/fdf2688a1a93fbf4759ddc444275ae38e03fa86e.tmppdf Binary files differnew file mode 100644 index 00000000..867f68db --- /dev/null +++ b/pdf-as-lib/src/configuration/pdfastmp/7c7e273e4cecbcf5e0bca3e3770535b767ccf65c/fdf2688a1a93fbf4759ddc444275ae38e03fa86e.tmppdf diff --git a/pdf-as-lib/src/configuration/pdfastmp/87cf3a0d9ca039d5260e102a672e485e3e7b711e/02591ca7b2fa3dabd5041f8a3f21e867d0cc0591.tmppdf b/pdf-as-lib/src/configuration/pdfastmp/87cf3a0d9ca039d5260e102a672e485e3e7b711e/02591ca7b2fa3dabd5041f8a3f21e867d0cc0591.tmppdf Binary files differnew file mode 100644 index 00000000..867f68db --- /dev/null +++ b/pdf-as-lib/src/configuration/pdfastmp/87cf3a0d9ca039d5260e102a672e485e3e7b711e/02591ca7b2fa3dabd5041f8a3f21e867d0cc0591.tmppdf diff --git a/pdf-as-lib/src/configuration/pdfastmp/cd1fe1d42172b0daeedd6d4dedbf7c67f16fa94c/e6b460a6ddc28c62c6a04f78bff877cb5eb970ff.tmppdf b/pdf-as-lib/src/configuration/pdfastmp/cd1fe1d42172b0daeedd6d4dedbf7c67f16fa94c/e6b460a6ddc28c62c6a04f78bff877cb5eb970ff.tmppdf Binary files differnew file mode 100644 index 00000000..867f68db --- /dev/null +++ b/pdf-as-lib/src/configuration/pdfastmp/cd1fe1d42172b0daeedd6d4dedbf7c67f16fa94c/e6b460a6ddc28c62c6a04f78bff877cb5eb970ff.tmppdf diff --git a/pdf-as-lib/src/configuration/pdfastmp/cf6014eb965316128c7d6b4e129da73f95ba46ee/4c67eec41791b71414dadeb0ff387a04448cbe9f.tmppdf b/pdf-as-lib/src/configuration/pdfastmp/cf6014eb965316128c7d6b4e129da73f95ba46ee/4c67eec41791b71414dadeb0ff387a04448cbe9f.tmppdf Binary files differnew file mode 100644 index 00000000..867f68db --- /dev/null +++ b/pdf-as-lib/src/configuration/pdfastmp/cf6014eb965316128c7d6b4e129da73f95ba46ee/4c67eec41791b71414dadeb0ff387a04448cbe9f.tmppdf diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java index 8e86364b..fe7f72ab 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java @@ -238,7 +238,7 @@ public class PdfAsImpl implements PdfAs, IConfigurationConstants, return result; } catch (Throwable e) { - logger.error("Failed to create signature [" + e.getMessage() + "]", + logger.warn("Failed to create signature [" + e.getMessage() + "]", e); throw ErrorExtractor.searchPdfAsError(e, status); } finally { @@ -316,7 +316,7 @@ public class PdfAsImpl implements PdfAs, IConfigurationConstants, return request; } catch (Throwable e) { - logger.error("startSign", e); + logger.warn("startSign", e); throw ErrorExtractor.searchPdfAsError(e, status); } } @@ -378,7 +378,7 @@ public class PdfAsImpl implements PdfAs, IConfigurationConstants, request.setNeedSignature(true); } catch (Throwable e) { - logger.error("process", e); + logger.warn("process", e); throw ErrorExtractor.searchPdfAsError(e, status); } } else if (request.needSignature()) { @@ -548,10 +548,10 @@ public class PdfAsImpl implements PdfAs, IConfigurationConstants, return signer.generateVisibleSignaturePreview(parameter, iaikCert, resolution, status, requestedSignature); } catch (PdfAsException e) { - logger.error("PDF-AS Exception", e); + logger.warn("PDF-AS Exception", e); throw ErrorExtractor.searchPdfAsError(e, status); } catch (Throwable e) { - logger.error("Throwable Exception", e); + logger.warn("Throwable Exception", e); throw ErrorExtractor.searchPdfAsError(e, status); } diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/CertificateResolver.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/CertificateResolver.java index 7012a93a..bff573a4 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/CertificateResolver.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/CertificateResolver.java @@ -57,14 +57,14 @@ public class CertificateResolver implements IResolver { Map<String, String> issuerDNMap = DNUtils.dnToMap(certificate.getIssuerDN().getName()); this.ctx.put("issuer", issuerDNMap); } catch (InvalidNameException e) { - logger.error("Failed to build issuer Map", e); + logger.warn("Failed to build issuer Map", e); } try { Map<String, String> subjectDNMap = DNUtils.dnToMap(certificate.getSubjectDN().getName()); this.ctx.put("subject", subjectDNMap); } catch (InvalidNameException e) { - logger.error("Failed to build subject Map", e); + logger.warn("Failed to build subject Map", e); } Map<String, String> iuiMap = new HashMap<String, String>(); diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/verify/IntegrityVerifier.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/verify/IntegrityVerifier.java index 9142bc68..3b49497b 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/verify/IntegrityVerifier.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/verify/IntegrityVerifier.java @@ -66,7 +66,7 @@ public class IntegrityVerifier implements IVerifier { 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 SignatureException("Signature ERROR missing signed Signing Certificate"); } else { @@ -80,12 +80,12 @@ public class IntegrityVerifier implements IVerifier { // OK logger.debug("Found and verified SigningCertificateV2"); } else { - logger.error("Signature ERROR certificate missmatch: "); + logger.warn("Signature ERROR certificate missmatch, misbehaving Sign Backend?"); throw new SignatureException("Signature ERROR certificate missmatch"); } } catch (Throwable e) { - logger.error("Signature ERROR wrong encoding for ESSCertIDv2"); + logger.error("Signature ERROR wrong encoding for ESSCertIDv2, misbehaving Signature Backend?"); throw new SignatureException("Signature ERROR wrong encoding for ESSCertIDv2"); } @@ -99,12 +99,12 @@ public class IntegrityVerifier implements IVerifier { // OK logger.debug("Found and verified SigningCertificate"); } else { - logger.error("Signature ERROR certificate missmatch"); + logger.warn("Signature ERROR certificate missmatch"); throw new SignatureException("Signature ERROR certificate missmatch"); } } catch (Throwable e) { - logger.error("Signature ERROR wrong encoding for ESSCertIDv2"); + logger.error("Signature ERROR wrong encoding for ESSCertIDv2, misbehaving Signature Backend?"); throw new SignatureException("Signature ERROR wrong encoding for ESSCertIDv2", e); } 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()) diff --git a/pdf-as-lib/src/main/resources/config/config.zip b/pdf-as-lib/src/main/resources/config/config.zip Binary files differindex 19971a5b..e46d87d2 100644 --- a/pdf-as-lib/src/main/resources/config/config.zip +++ b/pdf-as-lib/src/main/resources/config/config.zip |