Quantcast
Channel: SCN : Unanswered Discussions - B2B Integration with SAP Process Orchestration
Viewing all articles
Browse latest Browse all 499

signature causing parse message exception in AS2Receiver

$
0
0

When receiving a signed message using a sender channel (verify signature checked) with adapter type AS2 from B2B TOOLKIT following exception is raised:

 

Cannot verify signature: javax.mail.MessagingException: Error in signature verification: java.lang.ArrayIndexOutOfBoundsException: 0 >= 0;

  nested exception is:

java.lang.ArrayIndexOutOfBoundsException: 0 >= 0: javax.mail.MessagingException: Error in signature verification: java.lang.ArrayIndexOutOfBoundsException: 0 >= 0;

  nested exception is:

java.lang.ArrayIndexOutOfBoundsException: 0 >= 0

at com.sap.aii.adapter.as2.ra.api.AS2Receiver.parseMessage(AS2Receiver.java:402)

at com.sap.aii.adapter.as2.ra.integration.ChannelDispatcher.receive(ChannelDispatcher.java:404)

at com.sap.aii.adapter.as2.servlet.AS2DispatcherServlet.doPost(AS2DispatcherServlet.java:239)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)

...

Caused by: javax.mail.MessagingException: Error in signature verification: java.lang.ArrayIndexOutOfBoundsException: 0 >= 0;

  nested exception is:

java.lang.ArrayIndexOutOfBoundsException: 0 >= 0

at com.sap.aii.adapter.as2.ra.api.util.IAIKUtils.getSignedMessage(IAIKUtils.java:637)

at com.sap.aii.adapter.as2.ra.api.AS2Receiver.parseMessage(AS2Receiver.java:359)

... 45 more

Caused by: java.lang.ArrayIndexOutOfBoundsException: 0 >= 0

at java.util.Vector.elementAt(Vector.java:427)

at javax.mail.Multipart.getBodyPart(Multipart.java:157)

at javax.mail.internet.MimeMultipart.getBodyPart(MimeMultipart.java:256)

at com.sap.aii.adapter.as2.ra.api.util.IAIKUtils.verifySignatureAndGetMessage(IAIKUtils.java:758)

at com.sap.aii.adapter.as2.ra.api.util.IAIKUtils.getSignedMessage(IAIKUtils.java:633)

... 46 more

 

The signature part of the message is:

------=_Part_607_1099291989.1427893970800
Content-Type: application/pkcs7-signature; name=smime.p7s; smime-type=signed-data
Content-Transfer-Encoding: binary
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

<< binary part removed >>
------=_Part_607_1099291989.1427893970800--


The message in the communication channel logging:


Error in AS2 Message Signature validation: iaik.cms.CertificateNotFoundException: Certificate for verifying the signature not found!


When a signature is sent (but verify signature is not checked), the exception is still raised. When no signature is sent, the message passes without problem.

 

Any ideas on how to tackle this?


Viewing all articles
Browse latest Browse all 499

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>