Skip to content

Commit a67d3dd

Browse files
committed
Improved docs
1 parent 409a5d4 commit a67d3dd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

as2-lib/src/main/java/com/helger/as2lib/crypto/BCCryptoHelper.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ private X509Certificate _verifyFindCertificate (@Nullable final X509Certificate
664664
final Collection <?> aContainedCerts = aSignedParser.getCertificates ().getMatches (aSignerID);
665665
if (!aContainedCerts.isEmpty ())
666666
{
667-
// For PEPPOL the certificate is passed in
667+
// E.g. for Peppol the certificate is passed in
668668
if (aContainedCerts.size () > 1)
669669
LOGGER.warn ("Signed part contains " + aContainedCerts.size () + " certificates - using the first one!");
670670

@@ -674,7 +674,7 @@ private X509Certificate _verifyFindCertificate (@Nullable final X509Certificate
674674
if (aX509Cert != null && !aX509Cert.equals (aCert))
675675
LOGGER.warn ("Certificate mismatch! Provided certificate\n" +
676676
aX509Cert +
677-
" differs from certficate contained in message\n" +
677+
"\ndiffers from certficate contained in message\n" +
678678
aCert);
679679

680680
// The certificate provided in the message takes precedence
@@ -727,6 +727,7 @@ public MimeBodyPart verify (@Nonnull final MimeBodyPart aPart,
727727
EContentTransferEncoding.AS2_DEFAULT.getID (),
728728
aResHelper.createTempFile ());
729729

730+
// If no certificate is found, an exception is thrown
730731
final X509Certificate aRealX509Cert = _verifyFindCertificate (aX509Cert, bUseCertificateInBodyPart, aSignedParser);
731732

732733
if (LOGGER.isDebugEnabled ())

0 commit comments

Comments
 (0)