HOW TO TEST TLS 1.2 HOW TO
This example shows how to upgrade Ubuntu from 12.04 to 14.04 so that you can ultimately get Php5.6 installed (and, thus, the newer version of openssl and cURL used by Php to allow you to use TLS1.2).
HOW TO TEST TLS 1.2 MOD
That is why it is important to get a list of mod packages installed on your system that were not part of the standard installation of your current version of Php.Įxample Upgrade From Ubuntu 12.04 (precise):
HOW TO TEST TLS 1.2 INSTALL
In most cases you will have to specify the packages unique to your system with syntax such as "sudo apt-get install php5.6 php5.6-curl". If (strlen($response_curlerror) > 0) ' | sort -uīrief Note About Upgrading Php and Mod Packages:īy default, when you install a new version of Php (such as Php5.6) with the generic "sudo apt-get install php5.6" it will not necessarily install all of the mod packages you may current have. * Show results of submitting request using TLS 1.2 */ Print "PHP version (minimum should be 5.6): ". Print "cURL version (minimum should be 7.34.0): ". Print "OpenSSL version (minimum should be 1.0.1): ". "/cacert.crt") /* Location in same folder as this file */Ĭurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1) sandbox will require TLS 1.2 until September 2017 - after which point it will also be required on live */Ĭurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1) Ĭurl_setopt($ch, CURLOPT_POSTFIELDS, $payload) Ĭurl_setopt($ch, CURLOPT_CAINFO, dirname(_FILE_). According to php documentation you should not need to specify this manually instead let Curl choose. curl_setopt($ch, CURLOPT_SSLVERSION, 6) /* Use TLS 1.2. "" Ĭurl_setopt($ch, CURLOPT_HEADER, 0) /* Set to 1 to see HTTP headers, otherwise 0 or XML reading will not work */Ĭurl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml")) Ĭurl_setopt($ch, CURLOPT_FORBID_REUSE, 1) $gateway_key = "your-merchant-key" /* Change this for your test account */ $gateway_login = "your-merchant-id" /* Change this for your test account */ * (STEP 3) Define the Authorize.Net Merchant Information */ * (STEP 2) Define "" for remote SSL test */Ĭurl_setopt($ch, CURLOPT_RETURNTRANSFER, true) $digest_aliases = "Php version less than 5.3.0. $ciphers_and_aliases = "Php version less than 5.3.0. $digest_aliases = array_diff($digests_and_aliases, $digests) $digests_and_aliases = openssl_get_md_methods(true)
$cipher_aliases = array_diff($ciphers_and_aliases, $ciphers) $ciphers_and_aliases = openssl_get_cipher_methods(true) You can download the entire testing project here. What has been done with this page is to show the testing process (all in Php) as you may already have parts in-hand and may only need some reference. Luckily, API testing is simple with Authorize.Net's sandbox environment Authorize.Net is moving to TLS 1.2 for their production API in September 2017. PCI compliance requires (by June 2018) that systems use TLS 1.2. The purpose of this project is to show how to test the web environment to determine if backend systems (primarily those interacting with remote API systems such as Authorize.Net) are capable of using TLS 1.2.