Re: Verify Server Certificate before connecting
Posted by: Fernando Gonzalez.Sanchez
Date: February 06, 2013 11:25AM

From the documentation for MySqlSslMode enum:

/// <summary>
/// Always use SSL. Validate server SSL certificate, but different host name mismatch.
/// </summary>
VerifyCA,
/// <summary>
/// Always use SSL and perform full certificate validation.
/// </summary>
VerifyFull


So in your connection string you can append ";SSL Mode=VerifyCA;" or ";SSL Mode=VerifyFull;" depending on your needs.

There's no exposure of the callback to be notified on validated SSLs, but Connector/NET itself internally uses RemoteCertificateValidationCallback (class MySql.Data.MySqlClient.NativeDriver, method StartSSL).

Options: ReplyQuote


Subject
Written By
Posted
Re: Verify Server Certificate before connecting
February 06, 2013 11:25AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.