HEX
Server: Apache/2.4.41 (Amazon) OpenSSL/1.0.2k-fips PHP/5.6.40
System: Linux ip-172-31-40-18 4.14.146-93.123.amzn1.x86_64 #1 SMP Tue Sep 24 00:45:23 UTC 2019 x86_64
User: apache (48)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: /var/www/html/taxicamera/old/application/third_party/authorize-sdk/tests/AuthorizeNetSSL_Test.php
<?php

class AuthorizeNetSSL_Test extends PHPUnit_Framework_TestCase {
    public function testSandboxSSLCertIsValid()
    {
        $this->markTestSkipped('Ignoring for Travis. Will fix after release.'); //TODO
        exec("echo | openssl s_client -connect test.authorize.net:443 -showcerts -verify 10 -CAfile ../lib/ssl/cert.pem 2>&1", $output, $return_value);
        $this->assertEquals(0, $return_value);
        $this->assertTrue(in_array('Verify return code: 0 (ok)', array_map('trim', $output)));
        exec("echo | openssl s_client -connect apitest.authorize.net:443 -showcerts -verify 10 -CAfile ../lib/ssl/cert.pem 2>&1", $output, $return_value);
        $this->assertEquals(0, $return_value);
        $this->assertTrue(in_array('Verify return code: 0 (ok)', array_map('trim', $output)));
    }

    public function testLiveSSLCertIsValid()
    {
        $this->markTestSkipped('Ignoring for Travis. Will fix after release.'); //TODO
        exec("echo | openssl s_client -connect secure2.authorize.net:443 -showcerts -verify 10 -CAfile ../lib/ssl/cert.pem 2>&1", $output, $return_value);
        $this->assertEquals(0, $return_value);
        $this->assertTrue(in_array('Verify return code: 0 (ok)', array_map('trim', $output)));
        exec("echo | openssl s_client -connect api2.authorize.net:443 -showcerts -verify 10 -CAfile ../lib/ssl/cert.pem 2>&1", $output, $return_value);
        $this->assertEquals(0, $return_value);
        $this->assertTrue(in_array('Verify return code: 0 (ok)', array_map('trim', $output)));
    }
}