Guzzle利用時のwrong signature typeエラーの対応
問題
Guzzleを利用したアクセス時に、接続先のSSLバージョンが古めだったためエラーが発生した。
[previous exception] [object] (GuzzleHttp\\Exception\\ConnectException(code: 0): cURL error 35: error:1414D172:SSL routines:tls12_check_peer_sigalg:wrong signature type (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://stbfep.sps-system.com/api/xmlapi.do at /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:210)
解決方法
GuzzleのOptionで必要な暗号を設定する。
$client = new Client([ 'base_uri' => 'https://example.com', 'timeout' => 5.0, 'curl' => [ CURLOPT_SSL_CIPHER_LIST => 'SSLv3' ], ]);