Menu

BCCryptoHelper: Check for compressed data failed on BASE content type

Help
kp5322
2016-04-04
2016-04-05
  • kp5322

    kp5322 - 2016-04-04

    Hi. I'm trying to setup openAS2 with a trading partner. It works sending them a EDI file, but when I try and receive one back I get:

    04/04/16 13:31:20 AS2ReceiverHandler: incoming connection 161.225.201.27 28521
    04/04/16 13:31:20 AS2ReceiverHandler: received 2691 bytes in 0.2 seconds at 1.289 MBps 161.225.201.27 28521 [MOKOsi282792153e2f8e8banode1086111470100@mftlx1001.xget.com]
    04/04/16 13:31:20 AS2ReceiverHandler: decrypting ::: [MOKOsi282792153e2f8e8banode1086111470100@mftlx1001.xget.com]
    ...
    04/04/16 13:31:20 BCCryptoHelper: Compression check. MIME Base Content-Type:multipart/signed
    04/04/16 13:31:20 BCCryptoHelper: Compression check. SMIME-TYPE:null
    04/04/16 13:31:20 BCCryptoHelper: Compressed MIME msg AFTER COMPRESSION Content-Disposition:null
    04/04/16 13:31:20 BCCryptoHelper: Check for compressed data failed on BASE content type: multipart/signed
    04/04/16 13:31:20 AS2ReceiverHandler: verifying signature [MOKOsi282792153e2f8e8banode1086111470100@mftlx1001.xget.com]
    04/04/16 13:31:21 BCCryptoHelper: Signer verification failed: Verification failed
    04/04/16 13:31:21 java.security.SignatureException: Verification failed
    at org.openas2.lib.helper.BCCryptoHelper.verify(Unknown Source)
    at org.openas2.processor.receiver.AS2ReceiverHandler.decryptAndVerify(Unknown Source)
    at org.openas2.processor.receiver.AS2ReceiverHandler.handle(Unknown Source)
    at org.openas2.processor.receiver.NetModule$ConnectionThread.run(Unknown Source)

    It would appear this is a new issue in this version (1.3.6)? If so, where can I find 1.3.4 or 1.3.5 which apparently did not have this issue. I can only find 1.3.6

    Thanks,
    Kevin.

     
  • kp5322

    kp5322 - 2016-04-04

    I also have at the bottom:

    The message sent to Recipient XXXXARA on Mon, 4 Apr 2016 22:48:09 GMT with Subject Integrator Message has been received, the EDI Interchange was successfully decrypted and it's integrity was verified. Authentication of the originator of the message failed.

    But where is the file? The receiver apparently got the MDN ok.

    I can't find the file anywhere, is there a setting to let me see the files even though they were not authenticated?

     
  • Christopher Broderick

    Please enable TRACE level logging and upload the log file for review.

     
  • kp5322

    kp5322 - 2016-04-05

    OK done, here is the TRACE level logging, my server is called "myserver" and the server that is sending the file that fails is "TheirServer".
    First, it sends a file test997d.edi (successfully) to TheirServer.
    Then, "TheirServer" attempts to send a file to "myserver" but it failes, see log:


    04/04/16 16:19:37 OpenAS2Server: - OpenAS2 Started -
    04/04/16 16:19:57 DirectoryPollingModule: processing C:\openas2\bin..\config..\data\toTheirServer\test997d.edi
    04/04/16 16:19:57 DirectoryPollingModule: file assigned to message C:\openas2\bin..\config..\data\toTheirServer\test997d.edi [OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100]
    04/04/16 16:19:57 DirectoryPollingModule: PARTNERSHIP parms: {content_transfer_encoding=binary, as2_mdn_options=signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, SHA1, protocol=as2, as2_mdn_to=info@chimpkey.com, subject=From ChimpKey2 to TheirServer, encrypt=3DES, as2_url=http://emft.TheirServer.com:4080/as2, sign=SHA1} [OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100]
    04/04/16 16:19:57 DirectoryPollingModule: RESEND COUNT extracted from config: null [OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100]
    04/04/16 16:19:57 DirectoryPollingModule: Message object in directory polling module. Content-Disposition: Attachment; filename="test997d.edi"
    Content-Type : application/EDI-X12
    HEADERS : ;;Content-Disposition::Attachment; filename="test997d.edi"
    Content-Disposition in MSG getData() MIMEPART: application/EDI-X12 [OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100]
    04/04/16 16:19:57 DefaultProcessor: Processor searching for module handler for action: send
    04/04/16 16:19:57 AS2SenderModule: message sender invoked [OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100]
    04/04/16 16:19:57 AS2SenderModule: Retry count from options: {retries=null}
    04/04/16 16:19:57 AS2SenderModule: Compression type from config: null
    04/04/16 16:19:57 BCCryptoHelper: Calc MIC called with digest: SHA1 ::: Incl headers? true
    04/04/16 16:19:57 BCCryptoHelper: Calculating MIC on MIMEPART Headers:
    Content-Disposition::Attachment; filename="test997d.edi"
    04/04/16 16:19:57 AS2SenderModule: Params for creating signed body part:: DATA: javax.mail.internet.MimeBodyPart@1e0730b
    SIGN DIGEST: SHA1
    CERT ALG NAME EXTRACTED: SHA1WITHRSA
    CERT PUB KEY ALG NAME EXTRACTED: RSA [OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100]
    04/04/16 16:19:57 BCCryptoHelper: Params for creating SMIME signed generator:: SIGN DIGEST: SHA1 PUB ENCRYPT ALG: RSA X509 CERT: [0] Version: 3
    SerialNumber: 933160515
    IssuerDN: C=CA,ST=BC,L=Vancouver,O=ChimpKey2,OU=ChimpKey2,CN=ChimpKey2
    Start Date: Sun Mar 06 16:17:12 PST 2016
    Final Date: Wed Mar 04 16:17:12 PST 2026
    SubjectDN: C=CA,ST=BC,L=Vancouver,O=ChimpKey2,OU=ChimpKey2,CN=ChimpKey2
    Public Key: RSA Public Key
    modulus: 882bf752b0140fa8b06db82c3f32174b357e81a2d57bfe58aa2a0be7a879b494878544a4efcb677261f47768c1c33cd9627ab1d2f753a029f4b0cde3fd999361837850574a91f57800297d87451f09fbdb71a56c88fd16bab7bbe4503df8393df4b625a31e3a953f88511446004d56b8f0fd6e014e9643cadd570f210c2cfe70351ca21ab5233d8588ceb9c4288f2fce88eeec749fe0121416c8c678b57fbe8732df65fca1c7986a3f1e275566230428a454e466c063a1c6c0822663af8e0d9f2ce0e0e42aa80dbf2ebd9337e85b0b7bdc69a482f717e196111165aa1450ff7aa43120b9199df231f63120d8d71843107dca76fa741e660fb76ee3edc8fe97e5
    public exponent: 10001

    Signature Algorithm: SHA1WITHRSA
    Signature: 2c8b57cd829e947ee67ec400787010379d13a1df
    d1bc95be62274114a1c0719c0a3ce83141e4da03
    26b24629ff24c907f4f7c209630f4dd0940d76c2
    4b44d403b3674deeb810eb035290ec68c1321ee5
    4fdb22c59c05b79c3902df6801bc6791a6b5b861
    c79b0b5f7350c6663046963100f3168c8b442919
    c7df9a847f942212db6ca61c4b27dc411844b86c
    bec3657357de9734f680cbb3715f46216ee51798
    b4d4cf95abe9fb4714707da743cfae92a204b92d
    6b99e8f969add58a4501190d5ce359c45821209b
    6a30dd4e31d0f19ecd10d858bdfa0dca2dab6535
    728c02dc92979d16aa87470e248d95591ca0480c
    2c309da8ca219b39df7c8a9762a20c64
    Extensions:
    critical(false) 2.5.29.14 value = DER Octet String[20]

    04/04/16 16:19:57 AS2SenderModule: signed data [OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100]
    04/04/16 16:19:57 AS2SenderModule: encrypted data [OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100]
    04/04/16 16:19:57 AS2SenderModule: Save Original mic & message id information into file: C:\openas2\bin..\config/../data/pendinginfoMDN3/OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100 [OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100]
    04/04/16 16:19:57 AS2SenderModule: Pending info file written to:C:\openas2\bin..\config/../data/pendinginfoMDN3/OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100
    Original MIC: 6rIiZdV1RB/RHFH3k/MIfmSAc6A=, SHA1
    Retry Count: null
    Original file name : test997d.edi
    Pending message file : C:\openas2\bin..\config/../data/pendingMDN3/OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100
    Error directory: C:\openas2\bin..\config/../data/toTheirServer/error
    Sent directory: null [OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100]
    04/04/16 16:19:57 AS2SenderModule: Message object in sender module. Content-Disposition: Attachment; filename="test997d.edi"
    Content-Type : application/EDI-X12
    HEADERS : ;;Content-Disposition::Attachment; filename="test997d.edi"
    Content-Disposition in MSG getData() MIMEPART: application/EDI-X12 [OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100]
    04/04/16 16:19:57 AS2SenderModule: Connecting to: http://emft.TheirServer.com:4080/as2 [OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100]
    04/04/16 16:19:58 AS2SenderModule: transferred 2163 bytes in 0.74 seconds at 28.558 KBps [OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100]
    04/04/16 16:19:59 AS2Util: received MDN [Automatic-action/mdn-sent-automatically;processed] [OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100]
    04/04/16 16:19:59 AS2Util: MIC processing start...
    04/04/16 16:19:59 AS2Util: MIC check on calculated MIC: 6rIiZdV1RB/RHFH3k/MIfmSAc6A=, SHA1 [OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100]
    04/04/16 16:19:59 AS2Util: mic is matched, mic: 6rIiZdV1RB/RHFH3k/MIfmSAc6A=,SHA-1 [OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100]
    04/04/16 16:19:59 DefaultProcessor: Processor searching for module handler for action: storemdn
    04/04/16 16:19:59 MessageParameters: Attempting filename extraction from Content-disposition: Attachment; filename="test997d.edi"
    04/04/16 16:19:59 MessageParameters: Filename extracted from Content-disposition: test997d.edi
    04/04/16 16:19:59 AS2Util: Message sent and MDN received successfully. [OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100]
    04/04/16 16:19:59 AS2Util: delete pendinginfo file : C:\openas2\bin..\config..\data\pendinginfoMDN3\OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100 [OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100]
    04/04/16 16:19:59 AS2Util: deleted C:\openas2\bin..\config/../data/pendinginfoMDN3/OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100 [OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100]
    04/04/16 16:19:59 AS2Util: deleted C:\openas2\bin..\config/../data/pendingMDN3/OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100.object [OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100]
    04/04/16 16:19:59 AS2Util: Cleaning up pending file : OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100 from pending folder : C:\openas2\bin..\config..\data\pendingMDN3 [OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100]
    04/04/16 16:19:59 AS2Util: deleted C:\openas2\bin..\config..\data\pendingMDN3\OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100 [OPENAS2-04042016161957-0700-3598@MYSERVER_086111470100]
    04/04/16 16:20:14 AS2ReceiverHandler: incoming connection 161.225.201.27 33622
    04/04/16 16:20:14 AS2ReceiverHandler: received 2683 bytes in 0.3 seconds at 873.381 KBps 161.225.201.27 33622 [MOKOsi659489153e39370c4node3086111470100@mftlx1003.TheirServer.com]
    04/04/16 16:20:14 AS2ReceiverHandler: decrypting ::: [MOKOsi659489153e39370c4node3086111470100@mftlx1003.TheirServer.com]
    04/04/16 16:20:14 BCCryptoHelper: Extracted X500 info:: PRINCIPAL : CN=ChimpKey2, OU=ChimpKey2, O=ChimpKey2, L=Vancouver, ST=BC, C=CA :: NAME : CN=ChimpKey2,OU=ChimpKey2,O=ChimpKey2,L=Vancouver,ST=BC,C=CA
    04/04/16 16:20:14 BCCryptoHelper: Compression check. MIME Base Content-Type:multipart/signed
    04/04/16 16:20:14 BCCryptoHelper: Compression check. SMIME-TYPE:null
    04/04/16 16:20:14 BCCryptoHelper: Compressed MIME msg AFTER COMPRESSION Content-Disposition:null
    04/04/16 16:20:14 BCCryptoHelper: Check for compressed data failed on BASE content type: multipart/signed
    04/04/16 16:20:14 AS2ReceiverHandler: verifying signature [MOKOsi659489153e39370c4node3086111470100@mftlx1003.TheirServer.com]
    04/04/16 16:20:14 BCCryptoHelper: Signer verification failed: Verification failed
    04/04/16 16:20:14 java.security.SignatureException: Verification failed
    at org.openas2.lib.helper.BCCryptoHelper.verify(Unknown Source)
    at org.openas2.processor.receiver.AS2ReceiverHandler.decryptAndVerify(Unknown Source)
    at org.openas2.processor.receiver.AS2ReceiverHandler.handle(Unknown Source)
    at org.openas2.processor.receiver.NetModule$ConnectionThread.run(Unknown Source)

    04/04/16 16:20:14 AS2ReceiverHandler: Error decrypting received message: Verification failed [MOKOsi659489153e39370c4node3086111470100@mftlx1003.TheirServer.com]
    04/04/16 16:20:14 java.security.SignatureException: Verification failed
    at org.openas2.lib.helper.BCCryptoHelper.verify(Unknown Source)
    at org.openas2.processor.receiver.AS2ReceiverHandler.decryptAndVerify(Unknown Source)
    at org.openas2.processor.receiver.AS2ReceiverHandler.handle(Unknown Source)
    at org.openas2.processor.receiver.NetModule$ConnectionThread.run(Unknown Source)

    04/04/16 16:20:14 BCCryptoHelper: Params for creating SMIME signed generator:: SIGN DIGEST: sha1 PUB ENCRYPT ALG: RSA X509 CERT: [0] Version: 3
    SerialNumber: 933160515
    IssuerDN: C=CA,ST=BC,L=Vancouver,O=ChimpKey2,OU=ChimpKey2,CN=ChimpKey2
    Start Date: Sun Mar 06 16:17:12 PST 2016
    Final Date: Wed Mar 04 16:17:12 PST 2026
    SubjectDN: C=CA,ST=BC,L=Vancouver,O=ChimpKey2,OU=ChimpKey2,CN=ChimpKey2
    Public Key: RSA Public Key
    modulus: 882bf752b0140fa8b06db82c3f32174b357e81a2d57bfe58aa2a0be7a879b494878544a4efcb677261f47768c1c33cd9627ab1d2f753a029f4b0cde3fd999361837850574a91f57800297d87451f09fbdb71a56c88fd16bab7bbe4503df8393df4b625a31e3a953f88511446004d56b8f0fd6e014e9643cadd570f210c2cfe70351ca21ab5233d8588ceb9c4288f2fce88eeec749fe0121416c8c678b57fbe8732df65fca1c7986a3f1e275566230428a454e466c063a1c6c0822663af8e0d9f2ce0e0e42aa80dbf2ebd9337e85b0b7bdc69a482f717e196111165aa1450ff7aa43120b9199df231f63120d8d71843107dca76fa741e660fb76ee3edc8fe97e5
    public exponent: 10001

    Signature Algorithm: SHA1WITHRSA
    Signature: 2c8b57cd829e947ee67ec400787010379d13a1df
    d1bc95be62274114a1c0719c0a3ce83141e4da03
    26b24629ff24c907f4f7c209630f4dd0940d76c2
    4b44d403b3674deeb810eb035290ec68c1321ee5
    4fdb22c59c05b79c3902df6801bc6791a6b5b861
    c79b0b5f7350c6663046963100f3168c8b442919
    c7df9a847f942212db6ca61c4b27dc411844b86c
    bec3657357de9734f680cbb3715f46216ee51798
    b4d4cf95abe9fb4714707da743cfae92a204b92d
    6b99e8f969add58a4501190d5ce359c45821209b
    6a30dd4e31d0f19ecd10d858bdfa0dca2dab6535
    728c02dc92979d16aa87470e248d95591ca0480c
    2c309da8ca219b39df7c8a9762a20c64
    Extensions:
    critical(false) 2.5.29.14 value = DER Octet String[20]

    04/04/16 16:20:14 AS2ReceiverHandler: setup to send asynch MDN [automatic-action/MDN-sent-automatically; processed/Error:integrity-check-failed] [MOKOsi659489153e39370c4node3086111470100@mftlx1003.TheirServer.com]
    04/04/16 16:20:14 DefaultProcessor: Processor searching for module handler for action: sendmdn
    04/04/16 16:20:14 DefaultProcessor: No handler found for action: sendmdn [MOKOsi659489153e39370c4node3086111470100@mftlx1003.TheirServer.com]
    04/04/16 16:20:14 AS2ReceiverHandler: Failed to initiate async MDN send on DispositionException handling. [MOKOsi659489153e39370c4node3086111470100@mftlx1003.TheirServer.com]
    NoModuleException: Requested action: sendmdn Message: Message From:{as2_id=086111470100, name=TheirServer_com, email=support@TheirServer.com, x509_alias=TheirServer_com}To:{as2_id=MYSERVER, name=chimpkey2, email=info@chimpkey.com, x509_alias=chimpkey2}
    Headers:{Host=as2k.chimpkey2.com:10080, User-Agent=GIS/PsHttpClientAdapter, Content-Length=2683, content-type=multipart/signed; protocol="application/pkcs7-signature"; micalg=SHA1;
    boundary="_=9592167662637904Sterling9592167662637904MOKO", Receipt-Delivery-Option=http://emft.TheirServer.com:4080/as2, Disposition-Notification-Options=signed-receipt-protocol=optional,pkcs7-signature;signed-receipt-micalg=optional,sha1, Disposition-Notification-To=086111470100, EDIINT-Features=multiple-attachments, AS2-Reliability, AS2-Version=1.2, Message-ID=MOKOsi659489153e39370c4node3086111470100@mftlx1003.TheirServer.com, Subject=Integrator Message, Date=Mon, 4 Apr 2016 23:20:13 GMT, AS2-From=086111470100, AS2-To=MYSERVER, Content-Disposition=null}
    Attributes:{HTTP_REQUEST_TYPE=POST, destination_ip=/192.168.0.100, destination_port=10080, HTTP_REQUEST_URL=/, source_port=33622, source_ip=/161.225.201.27}
    MDN:MDN From:{as2_id=MYSERVER, name=chimpkey2, email=info@chimpkey.com, x509_alias=chimpkey2}To:{as2_id=086111470100, name=TheirServer_com, email=support@TheirServer.com, x509_alias=TheirServer_com}
    Headers:{Date=Mon, 04 Apr 2016 16:20:14 -0700, From=info@chimpkey.com, Message-Id=OPENAS2-04042016162014-0700-3307@MYSERVER_086111470100, Subject=Your Requested MDN Response, MIME-Version=1.0, Content-Type=multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-1;
    boundary="----=_Part_5_31486158.1459812014108", AS2-To=086111470100, AS2-From=MYSERVER, AS2-Version=1.1, Server=OpenAS2 v1.3.6}
    Attributes:{FINAL_RECIPIENT=rfc822; MYSERVER, MIC=null, REPORTING_UA=OpenAS2 v1.3.6@/192.168.0.100:10080, ORIGINAL_MESSAGE_ID=MOKOsi659489153e39370c4node3086111470100@mftlx1003.TheirServer.com, ORIGINAL_RECIPIENT=rfc822; MYSERVER, DISPOSITION=automatic-action/MDN-sent-automatically; processed/Error:integrity-check-failed}
    Text:
    The message sent to Recipient MYSERVER on Mon, 4 Apr 2016 23:20:13 GMT with Subject Integrator Message has been received, the EDI Interchange was successfully decrypted and it's integrity was verified. Authentication of the originator of the message failed.
    Options: null
    at org.openas2.processor.DefaultProcessor.handle(Unknown Source)
    at org.openas2.processor.receiver.AS2ReceiverHandler.handle(Unknown Source)
    at org.openas2.processor.receiver.NetModule$ConnectionThread.run(Unknown Source)