tiamo / phpas2

PHPAS2 is a php-based implementation of the EDIINT AS2 standard.
42 stars 41 forks source link

send to mendelsontestAS2 problem #38

Open xinjian555 opened 1 year ago

xinjian555 commented 1 year ago

when i use the demo send message to  "mendelsontestAS2" Q1: the "MDN" return "The system is unable to find out the sign algorithm of the inbound AS2 message."

Q2: and if i config "compress true" then the MDN return "exception reading compressed stream."

any one can help me?

xinjian555 commented 1 year ago

@tiamo @robsonala @homer8173 @k0mar12 any one can you help me? thanks

k0mar12 commented 1 year ago

@xinjian555 hi. Could you pls provide your configs

xinjian555 commented 1 year ago

`

    'id' => 'mendelsontestAS2',
    'target_url' => 'http://testas2.mendelson-e-c.com:8080/as2/HttpReceiver',

    // key4
    'certificate' => '-----BEGIN CERTIFICATE----- xxxxxx-----END CERTIFICATE-----',

    'content_type' => 'application/EDI-Consent',
    //'content_type'              => 'Text/Plain',
    'compression' => true,
     'signature_algorithm' => 'sha256',

    'encryption_algorithm' => '3DES',
    'content_transfer_encoding' => 'base64',
    'mdn_mode' => 'sync',
    'mdn_options' => 'signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, sha256',
    //'mdn_options' => 'signed-receipt-protocol=optional,pkcs7-signature; signed-receipt-micalg=optional,sha1'
]

`

@k0mar12 this is my config, thanks

xinjian555 commented 1 year ago

i have add my code here the example code from github, nothing modify

as2-example thanks

tiamo commented 1 year ago

Q1: Looks like the mendelson server doesn't support sha256, try to use 'signature_algorithm' => 'sha1' Q2: Need to check

xinjian555 commented 1 year ago

@tiamo
thank you for your reply

when i config "compress=>false" signature_algorithm=>'sha256' or signature_algorithm=>'sha1'

always return "The system is unable to find out the sign algorithm of the inbound AS2 message."

can you help check why?

thank you very much

tiamo commented 1 year ago

Try to change mdn_options with sha1

xinjian555 commented 1 year ago

@tiamo
thank you for your tips

when i config "compress=>true"

'content_type' => 'application/EDI-Consent', 'compression' => true, 'signature_algorithm' => 'sha1', 'encryption_algorithm' => '3des', // 'content_transfer_encoding' => 'binary', 'mdn_mode' => PartnerInterface::MDN_MODE_SYNC, 'mdn_options' => 'signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, sha1',

than retrun "exception reading compressed stream."

can you help me check it thank you very much