Get data on the certificate used to secure network connection.
[in] Certificate owner name. Corresponds to the Subject field.
[in] Certificate issuer name. Corresponds to the Issuer field.
[in] Certificate serial number. Corresponds to the SerialNumber field.
[in] Certificate print. Corresponds to the SHA-1 hash from the entire certificate file (all fields including the issuer signature).
[in] Certificate expiration date in the datetime format.
Returns true if successful, otherwise false.
Certificate data can be requested only after establishing a secure connection using SocketTlsHandshake.
In case of a certificate obtaining error, the error 5275 (ERR_NETSOCKET_NO_CERTIFICATE) is written to _LastError.
The function can be called only from Expert Advisors and scripts, as they run in their own execution threads. If calling from an indicator, GetLastError() returns the error 4014 – "Function is not allowed for call".