|
3 | 3 | use AS2\PartnerInterface;
|
4 | 4 |
|
5 | 5 | // local certificates
|
6 |
| -// openssl_pkcs12_read(file_get_contents(__DIR__.'/data/phpas2.p12'), $certs, null); |
7 |
| -openssl_pkcs12_read(file_get_contents(__DIR__.'/data/key3.pfx'), $certs, 'test'); |
| 6 | +openssl_pkcs12_read(file_get_contents(__DIR__.'/data/phpas2.p12'), $local, null); |
| 7 | +openssl_pkcs12_read(file_get_contents(__DIR__.'/data/key3.pfx'), $key3, 'test'); |
8 | 8 |
|
9 | 9 | return [
|
10 | 10 | 'storage_path' => __DIR__.'/tmp/storage',
|
11 |
| - 'log_path' => __DIR__.'/tmp/logs.txt', |
12 |
| - // 'log_path' => 'php://stdout', |
| 11 | + // 'log_path' => __DIR__.'/tmp/logs.txt', |
| 12 | + 'log_path' => 'php://stdout', |
13 | 13 | 'partners' => [
|
14 | 14 |
|
15 | 15 | // add your partners here ...
|
|
45 | 45 | 'compression' => true,
|
46 | 46 | 'signature_algorithm' => 'sha1',
|
47 | 47 | 'encryption_algorithm' => '3des',
|
48 |
| - 'content_transfer_encoding' => 'binary', |
| 48 | + // 'content_transfer_encoding' => 'binary', |
49 | 49 | 'mdn_mode' => PartnerInterface::MDN_MODE_SYNC,
|
50 | 50 | 'mdn_options' => 'signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, sha256',
|
51 | 51 | ],
|
|
54 | 54 | /** @see http://mendelson-e-c.com/as2_software */
|
55 | 55 |
|
56 | 56 | 'id' => 'mycompanyAS2',
|
| 57 | + // 'target_url' => 'http://127.0.0.1:8000', |
57 | 58 | 'target_url' => 'http://127.0.0.1:8080/as2/HttpReceiver',
|
58 |
| - 'certificate' => '-----BEGIN CERTIFICATE----- |
59 |
| -MIIC0DCCAjkCBEOO/bswDQYJKoZIhvcNAQEFBQAwga4xJjAkBgkqhkiG9w0BCQEWF3Jvc2V0dGFu |
60 |
| -ZXRAbWVuZGVsc29uLmRlMQswCQYDVQQGEwJERTEPMA0GA1UECBMGQmVybGluMQ8wDQYDVQQHEwZC |
61 |
| -ZXJsaW4xIjAgBgNVBAoTGW1lbmRlbHNvbi1lLWNvbW1lcmNlIEdtYkgxIjAgBgNVBAsTGW1lbmRl |
62 |
| -bHNvbi1lLWNvbW1lcmNlIEdtYkgxDTALBgNVBAMTBG1lbmQwHhcNMDUxMjAxMTM0MjE5WhcNMTkw |
63 |
| -ODEwMTM0MjE5WjCBrjEmMCQGCSqGSIb3DQEJARYXcm9zZXR0YW5ldEBtZW5kZWxzb24uZGUxCzAJ |
64 |
| -BgNVBAYTAkRFMQ8wDQYDVQQIEwZCZXJsaW4xDzANBgNVBAcTBkJlcmxpbjEiMCAGA1UEChMZbWVu |
65 |
| -ZGVsc29uLWUtY29tbWVyY2UgR21iSDEiMCAGA1UECxMZbWVuZGVsc29uLWUtY29tbWVyY2UgR21i |
66 |
| -SDENMAsGA1UEAxMEbWVuZDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAvl9YOib23cCSOpkD |
67 |
| -DU+NRnMnB1G8AhViieKhw2h33895+IfrkCSaEL3PMi0wn55ddPRgdMi9mOWELU6ITkvSMMsjFgYY |
68 |
| -e+1ibQjfK3Tnw9g1te/O+7XvjZaboEb4Onjh+p6fVZ90WTg1ccU8sifKSPFTJ59d2HsjDMO1VWhD |
69 |
| -uYUCAwEAATANBgkqhkiG9w0BAQUFAAOBgQC8DiHP61jAADXRIfxoDvw0pFTMMTOVAa905GGy1P+Y |
70 |
| -4NC8I92PviobpmEq8Z2HsEi6iviVwODrPTSfm93mUWZ52EPXinlGYHRP0D/VxNOMvFi+mRyweLA5 |
71 |
| -5rIFWk1PqdJRch9E3vTcjwRtCfPNdPQlynVwk0jeYKtEtQn2J9LLWg== |
72 |
| ------END CERTIFICATE----- |
73 |
| -', |
| 59 | + 'private_key' => isset($key3['pkey']) ? $key3['pkey'] : null, |
| 60 | + 'certificate' => isset($key3['cert']) ? $key3['cert'] : null, |
74 | 61 | 'content_type' => 'application/EDI-Consent',
|
75 | 62 | 'compression' => true,
|
76 | 63 | 'signature_algorithm' => 'sha256',
|
77 | 64 | 'encryption_algorithm' => '3des',
|
78 |
| - 'content_transfer_encoding' => 'binary', |
| 65 | + // 'content_transfer_encoding' => 'binary', |
79 | 66 | 'mdn_mode' => PartnerInterface::MDN_MODE_SYNC,
|
80 | 67 | 'mdn_options' => 'signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, sha256',
|
81 | 68 | ],
|
82 | 69 |
|
83 | 70 | // local station
|
84 | 71 |
|
85 | 72 | [
|
86 |
| - 'id' => 'mycompanyAS2', |
| 73 | + 'id' => 'phpas2', |
87 | 74 | 'email' => 'phpas2@example.com',
|
88 | 75 | 'target_url' => 'http://127.0.0.1:8000',
|
89 |
| - 'certificate' => isset($certs['cert']) ? $certs['cert'] : null, |
90 |
| - 'private_key' => isset($certs['pkey']) ? $certs['pkey'] : null, |
| 76 | + 'certificate' => isset($local['cert']) ? $local['cert'] : null, |
| 77 | + 'private_key' => isset($local['pkey']) ? $local['pkey'] : null, |
91 | 78 | // 'private_key_pass_phrase' => 'password',
|
92 | 79 | // 'content_type' => 'application/edi-x12',
|
93 | 80 | 'content_type' => 'application/EDI-Consent',
|
94 |
| - 'compression' => false, |
| 81 | + 'compression' => true, |
95 | 82 | 'signature_algorithm' => 'sha256',
|
96 | 83 | 'encryption_algorithm' => '3des',
|
97 | 84 | 'mdn_mode' => PartnerInterface::MDN_MODE_SYNC,
|
|
0 commit comments