Click or drag to resize

CrestronFileTransferClientSetPeerVerification Method

Set option to enable/disable verification of the peer's certificate.

Namespace: Crestron.SimplSharp
Assembly: SimplSharpHelperInterface (in SimplSharpHelperInterface.dll) Version: 2.21.121
Syntax
C#
public int SetPeerVerification(
	bool verifyPeer
)

Parameters

verifyPeer  Boolean
The Boolean turning On/Off the Verification.

Return Value

Int32
Zero if successful. -1 if underlying object has not been properly initialized. 1 if internal error occurred. Use GetLastClientError() to retrieve the error code. 87 if invalid parameter was passed.
Exceptions
ExceptionCondition
ObjectDisposedExceptionThe FTC Client has already been closed or disposed.
Remarks
This option determines whether the client verifies the authenticity of the peer's certificate. When negotiating a SSL connection, the server sends a certificate indicating its identity. Client verifies whether the certificate is authentic, i.e. that you can trust that the server is who the certificate says it is. This trust is based on a chain of digital signatures, rooted in certification authority (CA) certificates you supply. Client will use certificates provided with the SetCACertificate method. When the Verification is set to TRUE, and the verification fails to prove that the certificate is authentic, the GetFile method fails. When it is FALSE, the peer certificate verification succeeds regardless. Authenticating the certificate is not by itself very useful. You typically want to ensure that the server, as authentically identified by its certificate, is the server you mean to be talking to. Use SetHostVerification to control that. The check that the host name in the certificate is valid for the host name you're connecting to is done independently of the SetPeerVerification option.

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also