Answer the question
In order to leave comments, you need to log in
How to integrate federal city system (socket, php)?
The challenge is to integrate FSH.
The FSH request is a signed XML message sent via TLS1.0 socket and encrypted according to GOST.
The last gag that can't be beat: SSL operation failed with code 1. OpenSSL Error messages: error:1409017F:SSL routines:ssl3_get_server_certificate:wrong certificate type The
socket is created like this:
$context = stream_context_create(
array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
// 'local_cert' => 'client_ssl.pem',
// 'cafile' => 'cryptopro.cer',
// 'local_pk' => 'nocerts.pem',
'allow_self_signed' => true,
// 'ciphers' => 'aGOST:kGOST:aGOST01:GOST94:GOST89MAC:ALL',
// 'disable_compression' => true
)
)
);
$socket = stream_socket_client($hostname.':'.$port, $errno, $errstr, 60,
STREAM_CLIENT_CONNECT, $context);
if (!$socket) {
die("Не могу соединиться: $errstr ($errno)");
}
if ($socket) {
fwrite($socket, $xml);
}
Answer the question
In order to leave comments, you need to log in
Maybe it will help you: https://github.com/curl/curl/issues/447
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question