M
M
min4er2018-04-13 15:07:18
PHP
min4er, 2018-04-13 15:07:18

How to set up ssl on an outdated version of PHP?

There is an ancient Ubuntu 10 with PHP 5.3.2 on board. There is software that does not work even on PHP 5.4 (((
PHP is built with ssl support out of the box, respectively, the external extension is not used (and is absent in ubunt as such). And now, the day has come when support of at least TSL 1.2 was required. Actually, the question is, is it possible to "trick" php_ssl with some trick without breaking anything? If it doesn't match, climbed into the HEX editor and typed in the required number with your hands - it still fell
.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander, 2018-04-13
@alexr64

Why do you need ssl in php? Why not tie ssl higher, for example, in nginx?

offtopic
Climbed HEX editor entered the desired number with his hands - it still fell.
Если Вам в паспорте, вместо фио, написать "Иванов Иван Иваныч" - Вы им станете?

X
xmoonlight, 2018-04-13
@xmoonlight

The PHP version does not affect SSL in any way.
SSL is only affected by the web server.
You need to configure the correct version of PHP (script processing) on ​​any actual web server in order to raise TLS 1.2 there.
The best thing is to try to figure out the script errors step by step and adapt it to the current version of PHP.

M
min4er, 2018-04-13
@min4er

Maybe I didn't describe the problem correctly. The PHP script pulls the remote web service link over HTTPS. This service requires TLS 1.2 or drops the call. In a test environment, PHP built with a fresh openssl connects successfully, but not in an ancient production environment. Here, I hope to invent a trick how to connect.
Script example:

<?php

$host = "https://webservice.com/Data.php?version=2.0&wsdl";
$userId = 123;
$pass='123';


$client = new \SoapClient($host, ['trace' => true]);

$session_id = $client->login_token($userId, $pass);

$data = $client->get_data($session_id, "2018-03-01", "2018-04-01");
 

print_r($session_id);

print_r("\r\n");

print_r($data);

$client->logout($session_id);

?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question