Bug #48290 Use of encrypt keywork in C# throws exception keyword not supported
Submitted: 25 Oct 2009 15:17 Modified: 10 Nov 2009 14:30
Reporter: Sachin Ranadive Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S5 (Performance)
Version:5.1.35 OS:Windows
Assigned to: CPU Architecture:Any
Tags: C#, Visual Studio 2008

[25 Oct 2009 15:17] Sachin Ranadive
Description:
C# Visual Studio 2008
MySQL .NET Connector 6.2.0

Keyword not supported
Parameter name encrypt

MySQL Server 5.1.35

How to repeat:
//Build DB string
            mySqlConnectString = "Database=" + userSettings.DatabaseName + ";"
                + "Server=" + userSettings.DatabaseServer + ";"
                + "Uid=" + userSettings.UserName + ";"
                + "Pwd=" + GetPassword(userSettings.Password, false) + ";"
                //+ "SSL Mode=Required;";
                + "Encrypt=true;";
            ;
[6 Nov 2009 19:45] Tonci Grgin
Hi Sachin and thanks for your report.

From what I see in sources, you should use new parameter "Ssl Mode":
    if (validKeywords[key] == "Encrypt")
        MySqlTrace.LogWarning("Encrypt is now obsolete. Use Ssl Mode instead");
[6 Nov 2009 19:46] Tonci Grgin
MySQLConnectionStringBuilder.cs, LN: 853
[9 Nov 2009 16:36] Reggie Burnett
Actually this is a bug.  We will be completely removing the encrypt keyword starting with 6.4 but it is supported for the next couple of releases.
[9 Nov 2009 16:40] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/89828

795 Reggie Burnett	2009-11-09 [merge]
      - fixed encrypt keyword that was no longer supported in connection strings. It is obsolete so
        new code should use the 'ssl mode'.  Encrypt will be removed entirely starting with 6.4 (bug #48290)
[9 Nov 2009 16:41] Reggie Burnett
Fixed in 6.2.1+
[9 Nov 2009 16:54] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/89834

797 Reggie Burnett	2009-11-09
      - fixed encrypt keyword that was no longer supported in connection strings. It is obsolete so
        new code should use the 'ssl mode'.  Encrypt will be removed entirely starting with 6.4 (bug #48290)
[10 Nov 2009 14:30] Tony Bedford
An entry has been added to the 6.2.1 changelog:

When used, the Encrypt connection string option caused a “Keyword not supported” exception to be generated.

This option is in fact obsolete, and the option SSL Mode should be used instead. Although the Encrypt option has been fixed so that it does not generate an exception, it will be removed completely in version 6.4.
[5 Dec 2019 13:12] Subramaniyan V
I Need to encrypt the server credentials. How to encrypt that one.I tried "Column Encryption Setting=enabled" but you already stopped that one any other way it is possible please confirm.