PHP SOAP Communication Using TLS 1.2

后端 未结 2 1947
情话喂你
情话喂你 2021-02-09 23:15

We have integrated UPS Web Service in our site. recently we got alert from UPS :

Effective January 26, 2016,the UPS test environment wil

2条回答
  •  野的像风
    2021-02-10 00:06

    I met this problem too. I use this to force TLS communication.

    $mode = array
    (
        'soap_version' => 'SOAP_1_1',  // use soap 1.1 client
        'trace' => 1,
        'stream_context' => stream_context_create(array(
            'ssl' => array(
                'crypto_method' =>  STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT,
            )
         ))
    );
    
    // initialize soap client
    $client = new SoapClient($this->wsdl, $mode);
    

    But I have always a problem (on my dev environment) with MAMP witch includes a version of openssl without TLS 1.2 support.

提交回复
热议问题