Index: driver/connect.c =================================================================== --- driver/connect.c (revision 1036) +++ driver/connect.c (working copy) @@ -193,12 +193,12 @@ ds_get_utf8attr(ds->sslca, &ds->sslca8), ds_get_utf8attr(ds->sslcapath, &ds->sslcapath8), ds_get_utf8attr(ds->sslcipher, &ds->sslcipher8)); - /* TODO enable this via DSN option / gui, see bug#34020 */ - /* - mysql_options(mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, + + if (ds->sslverify) + mysql_options(mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, (const char *)&opt_ssl_verify_server_cert); - */ + { /* Get the ANSI charset info before we change connection to UTF-8. @@ -730,9 +730,13 @@ oldds->pszSSLCIPHER= _global_strdup(ds_get_utf8attr(ds->sslcipher, &ds->sslcipher8)); if (ds->charset) oldds->pszCHARSET= _global_strdup(ds_get_utf8attr(ds->charset, &ds->charset8)); + oldds->pszPORT= _global_strdup(" "); sprintf(oldds->pszPORT, "%d", ds->port); + oldds->pszSSL= _global_strdup(" "); + sprintf(oldds->pszSSLVERIFY,"%d", ds->sslverify); + /* Prompt. Function returns false if user cancels. */ if (!pFunc(hdbc, hwnd, oldds)) { @@ -770,6 +774,9 @@ ds_setattr_from_utf8(&ds->charset, oldds->pszCHARSET); if (oldds->pszPORT) ds->port= strtoul(oldds->pszPORT, NULL, 10); + if (oldds->pszSSLVERIFY) + ds->sslverify= strtoul(oldds->pszSSLVERIFY, NULL, 10); + #endif /* USE_LEGACY_ODBC_GUI */ } Index: setup/MYODBCSetupDataSourceDialog.cpp =================================================================== --- setup/MYODBCSetupDataSourceDialog.cpp (revision 1036) +++ setup/MYODBCSetupDataSourceDialog.cpp (working copy) @@ -229,6 +229,8 @@ pDataSource->pszSSLCAPATH = _global_strdup( ptab2->getSSLCAPath().toAscii() ); if ( !ptab2->getSSLCipher().isEmpty() ) pDataSource->pszSSLCIPHER = _global_strdup( ptab2->getSSLCipher().toAscii() ); + if ( !ptab2->getSSLVerify().isEmpty() ) + pDataSource->pszSSLVERIFY = _global_strdup( ptab2->getSSLVerify().toAscii() ); #else if ( !ptab1->getDataSourceName().isEmpty() ) @@ -262,6 +264,8 @@ pDataSource->pszSSLCAPATH = _global_strdup( ptab2->getSSLCAPath().ascii() ); if ( !ptab2->getSSLCipher().isEmpty() ) pDataSource->pszSSLCIPHER = _global_strdup( ptab2->getSSLCipher().ascii() ); + if ( !ptab2->getSSLVerify().isEmpty() ) + pDataSource->pszSSLVERIFY = _global_strdup( ptab2->getSSLVerify().ascii() ); #endif unsigned int nFlags = ptab3->getFlags(); @@ -397,6 +401,7 @@ ptab2->setSSLCA( pDataSource->pszSSLCA ); ptab2->setSSLCAPath( pDataSource->pszSSLCAPATH ); ptab2->setSSLCipher( pDataSource->pszSSLCIPHER ); + ptab2->setSSLVerify( pDataSource->pszSSLVERIFY ); ptab1->setUser( pDataSource->pszUSER ); if ( pDataSource->pszOPTION ) @@ -454,6 +459,7 @@ connect( ptab2->plineeditSSLCA, SIGNAL(signalAssistText(const QString&)), ptextbrowserAssist, SLOT(setHtml(const QString&)) ); connect( ptab2->plineeditSSLCAPath, SIGNAL(signalAssistText(const QString&)), ptextbrowserAssist, SLOT(setHtml(const QString&)) ); connect( ptab2->plineeditSSLCipher, SIGNAL(signalAssistText(const QString&)), ptextbrowserAssist, SLOT(setHtml(const QString&)) ); + connect( ptab2->pcheckboxSSLVerify, SIGNAL(signalAssistText(const QString&)), ptextbrowserAssist, SLOT(setHtml(const QString&)) ); connect( ptab3->ptab3a->pcheckboxReturnMatchingRows, SIGNAL(signalAssistText(const QString&)), ptextbrowserAssist, SLOT(setHtml(const QString&)) ); connect( ptab3->ptab3a->pcheckboxAllowBigResults, SIGNAL(signalAssistText(const QString&)), ptextbrowserAssist, SLOT(setHtml(const QString&)) ); connect( ptab3->ptab3a->pcheckboxUseCompressedProtocol, SIGNAL(signalAssistText(const QString&)), ptextbrowserAssist, SLOT(setHtml(const QString&)) ); @@ -690,6 +696,8 @@ stringConnectIn+= ";SSLCAPATH=" + ptab2->getSSLCAPath(); if (!ptab2->getSSLCipher().isEmpty()) stringConnectIn+= ";SSLCIPHER=" + ptab2->getSSLCipher(); + if (!ptab2->getSSLVerify().isEmpty()) + stringConnectIn+= ";SSLVERIFY=" + ptab2->getSSLVerify(); return stringConnectIn; } @@ -1068,3 +1076,4 @@ + Index: setup/MYODBCSetupDataSourceTab2.cpp =================================================================== --- setup/MYODBCSetupDataSourceTab2.cpp (revision 1036) +++ setup/MYODBCSetupDataSourceTab2.cpp (working copy) @@ -29,7 +29,8 @@ QString stringSSLCert, QString stringSSLCA, QString stringSSLCAPath, - QString stringSSLCipher ) + QString stringSSLCipher, + QString stringSSLVerify ) : QWidget( pwidgetParent ) { @@ -43,6 +44,7 @@ plineeditSSLCA->setText( stringSSLCA ); plineeditSSLCAPath->setText( stringSSLCAPath ); plineeditSSLCipher->setText( stringSSLCipher ); + pcheckboxSSLVerify->setChecked( stringSSLVerify == "1" ? TRUE : FALSE ); } MYODBCSetupDataSourceTab2::MYODBCSetupDataSourceTab2( QWidget *pwidgetParent ) @@ -96,6 +98,11 @@ plineeditSSLCipher->setText( stringSSLCipher ); } +void MYODBCSetupDataSourceTab2::setSSLVerify( const QString &stringSSLVerify ) +{ + pcheckboxSSLVerify->setChecked( stringSSLVerify == "1" ? TRUE : FALSE ); +} + QString MYODBCSetupDataSourceTab2::getPort() { return plineeditPort->text(); @@ -141,6 +148,11 @@ return plineeditSSLCipher->text(); } +QString MYODBCSetupDataSourceTab2::getSSLVerify() +{ + return pcheckboxSSLVerify->isChecked() ? "1" : ""; +} + void MYODBCSetupDataSourceTab2::doInit() { QString stringPort( tr("The TCP/IP port to use if server is not localhost.\nOptional: Yes (silently uses default)\nDefault: 3306") ); @@ -152,6 +164,7 @@ QString stringSSLCA( tr("The path to a file that contains a list of \ntrusted SSL CAs.\nOptional: Yes") ); QString stringSSLCAPath( tr("The path to a directory that contains \ntrusted SSL CA certificates in PEM format.\nOptional: Yes") ); QString stringSSLCipher( tr("A list of allowable ciphers to use for SSL encryption.\nExample: ALL:-AES:-EXP\nOptional: Yes") ); + QString stringSSLVerify( tr("The option causes the server's Common Name value in its certificate to be verified against the hostname used when connecting to the server, and the connection is rejected if there is a mismatch\nDefault: disabled") ); #if QT_VERSION >= 0x040000 QGridLayout * playoutFields = new QGridLayout(); setLayout( playoutFields ); @@ -276,7 +289,18 @@ QToolTip::add( plineeditSSLCipher, stringSSLCipher ); #endif nRow++; + + pcheckboxSSLVerify = new MYODBCSetupCheckBox( "Verify SSL Certificate", this ); + pcheckboxSSLVerify->setAssistText( stringSSLVerify ); + playoutFields->addWidget( pcheckboxSSLVerify, nRow, nColField ); +#if QT_VERSION >= 0x040000 + pcheckboxSSLVerify->setToolTip( stringSSLVerify ); +#else + QToolTip::add( pcheckboxSSLVerify, stringSSLVerify ); +#endif + nRow++; } + Index: setup/MYODBCSetupDataSourceTab2.h =================================================================== --- setup/MYODBCSetupDataSourceTab2.h (revision 1036) +++ setup/MYODBCSetupDataSourceTab2.h (working copy) @@ -31,6 +31,7 @@ #include "MYODBCSetup.h" #include "MYODBCSetupLineEdit.h" #include "MYODBCSetupComboBoxDatabases.h" +#include "MYODBCSetupCheckBox.h" class MYODBCSetupDataSourceDialog; @@ -49,7 +50,8 @@ QString stringSSLCert, QString stringSSLCA, QString stringSSLCAPath, - QString stringSSLCipher ); + QString stringSSLCipher, + QString stringSSLVerify ); MYODBCSetupDataSourceTab2( QWidget *pwidgetParent ); @@ -62,6 +64,7 @@ void setSSLCA( const QString &stringSSLCA ); void setSSLCAPath( const QString &stringSSLCApath ); void setSSLCipher( const QString &stringSSLCipher ); + void setSSLVerify( const QString &stringSSLVerify ); QString getPort(); QString getSocket(); @@ -72,6 +75,7 @@ QString getSSLCA(); QString getSSLCAPath(); QString getSSLCipher(); + QString getSSLVerify(); signals: void signalRequestCharsetNames(); @@ -86,6 +90,7 @@ MYODBCSetupLineEdit * plineeditSSLCA; MYODBCSetupLineEdit * plineeditSSLCAPath; MYODBCSetupLineEdit * plineeditSSLCipher; + MYODBCSetupCheckBox * pcheckboxSSLVerify; void doInit(); }; @@ -93,3 +98,4 @@ #endif + Index: setupgui/windows/odbcdialogparams.cpp =================================================================== --- setupgui/windows/odbcdialogparams.cpp (revision 1036) +++ setupgui/windows/odbcdialogparams.cpp (working copy) @@ -250,11 +250,12 @@ GET_BOOL(4,save_queries); /* ssl settings */ - getStrFieldData(¶ms.sslkey , 5, IDC_EDIT_sslkey); - getStrFieldData(¶ms.sslcert , 5, IDC_EDIT_sslcert); - getStrFieldData(¶ms.sslca , 5, IDC_EDIT_sslca); - getStrFieldData(¶ms.sslcapath , 5, IDC_EDIT_sslcapath); - getStrFieldData(¶ms.sslcipher , 5, IDC_EDIT_sslcipher); + getStrFieldData(¶ms.sslkey , SSL_TAB, IDC_EDIT_sslkey); + getStrFieldData(¶ms.sslcert , SSL_TAB, IDC_EDIT_sslcert); + getStrFieldData(¶ms.sslca , SSL_TAB, IDC_EDIT_sslca); + getStrFieldData(¶ms.sslcapath , SSL_TAB, IDC_EDIT_sslcapath); + getStrFieldData(¶ms.sslcipher , SSL_TAB, IDC_EDIT_sslcipher); + GET_BOOL(SSL_TAB,sslverify); } void syncTabs(HWND hwnd, DataSource ¶ms) @@ -297,6 +298,7 @@ Edit_SetText( GetDlgItem( tabHwnd, IDC_EDIT_sslca) , params.sslca); Edit_SetText( GetDlgItem( tabHwnd, IDC_EDIT_sslcapath) , params.sslcapath); Edit_SetText( GetDlgItem( tabHwnd, IDC_EDIT_sslcipher) , params.sslcipher); + SET_BOOL(SSL_TAB, sslverify); } } @@ -463,6 +465,34 @@ } } + +void processDbCombobox(HWND hwnd, HWND hwndCtl, UINT codeNotify) +{ + /* Loading list and adjust its height if button clicked and on user input */ + + switch(codeNotify) + { + case(CBN_DROPDOWN): + { + FillParameters(hwnd, *pParams); + LIST *dbs= mygetdatabases(hwnd, pParams); + LIST *dbtmp= dbs; + + ComboBox_ResetContent(hwndCtl); + + for (; dbtmp; dbtmp= list_rest(dbtmp)) + ComboBox_AddString(hwndCtl, (SQLWCHAR *)dbtmp->data); + + list_free(dbs, 1); + + ComboBox_SetText(hwndCtl,pParams->database); + + break; + } + } +} + + void FormMain_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify) { switch (id) @@ -497,17 +527,7 @@ } case IDC_EDIT_dbname: - { - if(codeNotify==CBN_DROPDOWN) { - FillParameters(hwnd, *pParams); - LIST *dbs= mygetdatabases(hwnd, pParams); - LIST *dbtmp= dbs; - ComboBox_ResetContent(hwndCtl); - for (; dbtmp; dbtmp= list_rest(dbtmp)) - ComboBox_AddString(hwndCtl, (SQLWCHAR *)dbtmp->data); - list_free(dbs, 1); - } - } + processDbCombobox(hwnd, hwndCtl, codeNotify); } return; Index: setupgui/windows/odbcdialogparams.rc =================================================================== --- setupgui/windows/odbcdialogparams.rc (revision 1036) +++ setupgui/windows/odbcdialogparams.rc (working copy) @@ -54,7 +54,7 @@ PUSHBUTTON "&Details >>",IDC_BUTTON_DETAILS,17,376,50,14 PUSHBUTTON "&Help",IDC_BUTTON_HELP,217,375,49,15 CONTROL 130,IDC_STATIC,"Static",SS_BITMAP,0,0,279,39 - COMBOBOX IDC_EDIT_database,98,176,85,42,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_EDIT_database,98,176,85,42,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP END IDD_TAB1 DIALOGEX 0, 0, 209, 151 @@ -146,6 +146,7 @@ PUSHBUTTON "...",IDC_SSLCERTCHOOSER,192,30,12,12,BS_CENTER PUSHBUTTON "...",IDC_SSLCACHOOSER,192,48,12,12,BS_CENTER PUSHBUTTON "...",IDC_SSLCAPATHCHOOSER,192,66,12,12,BS_CENTER + CONTROL "Verify SSL Certificate",IDC_CHECK_sslverify,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,74,110,87,10 END Index: setupgui/windows/resource.h =================================================================== --- setupgui/windows/resource.h (revision 1036) +++ setupgui/windows/resource.h (working copy) @@ -54,6 +54,7 @@ #define IDC_SSLCERTCHOOSER 1025 #define IDC_SSLCACHOOSER 1026 #define IDC_SSLCAPATHCHOOSER 1027 +#define IDC_CHECK_sslverify 1028 #define IDC_EDIT_drvname 10000 #define IDC_EDIT_name 10000 #define IDC_EDIT_drvdesc 10001 @@ -110,7 +111,7 @@ #define _APS_NO_MFC 1 #define _APS_NEXT_RESOURCE_VALUE 137 #define _APS_NEXT_COMMAND_VALUE 32771 -#define _APS_NEXT_CONTROL_VALUE 1024 +#define _APS_NEXT_CONTROL_VALUE 1029 #define _APS_NEXT_SYMED_VALUE 110 #endif #endif Index: util/installer.c =================================================================== --- util/installer.c (revision 1036) +++ util/installer.c (working copy) @@ -92,6 +92,8 @@ {'S', 'S', 'L', 'C', 'A', 'P', 'A', 'T', 'H', 0}; static SQLWCHAR W_SSLCIPHER[]= {'S', 'S', 'L', 'C', 'I', 'P', 'H', 'E', 'R', 0}; +static SQLWCHAR W_SSLVERIFY[]= + {'S', 'S', 'L', 'V', 'E', 'R', 'I', 'F', 'Y', 0}; static SQLWCHAR W_PORT[]= {'P', 'O', 'R', 'T', 0}; static SQLWCHAR W_SETUP[]= {'S', 'E', 'T', 'U', 'P', 0}; /* DS_PARAM */ @@ -109,7 +111,7 @@ SQLWCHAR *dsnparams[]= {W_DSN, W_DRIVER, W_DESCRIPTION, W_SERVER, W_UID, W_PWD, W_DATABASE, W_SOCKET, W_INITSTMT, W_PORT, W_OPTION, W_CHARSET, W_SSLKEY, - W_SSLCERT, W_SSLCA, W_SSLCAPATH, W_SSLCIPHER}; + W_SSLCERT, W_SSLCA, W_SSLCAPATH, W_SSLCIPHER, W_SSLVERIFY}; static const int dsnparamcnt= sizeof(dsnparams) / sizeof(SQLWCHAR *); /* DS_PARAM */ @@ -591,6 +593,9 @@ else if (!sqlwcharcasecmp(W_PORT, param)) *intdest= &ds->port; + else if(!sqlwcharcasecmp(W_SSLVERIFY, param)) + *intdest= &ds->sslverify; + /* DS_PARAM */ } @@ -943,6 +948,7 @@ if (ds_add_strprop(ds->name, W_SSLCIPHER , ds->sslcipher )) goto error; if (ds_add_intprop(ds->name, W_PORT , ds->port )) goto error; + if (ds_add_intprop(ds->name, W_SSLVERIFY , ds->sslverify )) goto error; /* DS_PARAM */ Index: util/installer.h =================================================================== --- util/installer.h (revision 1036) +++ util/installer.h (working copy) @@ -130,7 +130,8 @@ BOOL limit_column_size; /* debug */ BOOL save_queries; - + /* SSL */ + BOOL sslverify; } DataSource; DataSource *ds_new(); Index: util/MYODBCUtil.h =================================================================== --- util/MYODBCUtil.h (revision 1036) +++ util/MYODBCUtil.h (working copy) @@ -177,11 +177,12 @@ char *pszSTMT; /* Statement that will be exec when connecting to MySQL. */ char *pszOPTION; /* Options that specify how MyODBC should work. */ - char *pszSSLKEY; /* pathname to SSL key file */ - char *pszSSLCERT; /* pathname to SSL certificate file */ - char *pszSSLCA; /* pathname to SSL certificate authority file */ - char *pszSSLCAPATH; /* pathname to a directory that contains SSL ceritificate authority files */ - char *pszSSLCIPHER; /* pathname to a list of allowable ciphers */ + char *pszSSLKEY; /* pathname to SSL key file */ + char *pszSSLCERT; /* pathname to SSL certificate file */ + char *pszSSLCA; /* pathname to SSL certificate authority file */ + char *pszSSLCAPATH; /* pathname to a directory that contains SSL ceritificate authority files */ + char *pszSSLCIPHER; /* pathname to a list of allowable ciphers */ + char *pszSSLVERIFY; /* verify server certificate (see --ssl-verify-server-cert */ char *pszCHARSET; /* default charset to use for connection */ MYODBCUTIL_DATASOURCE_MODE nMode; /* ConfigDSN mode or SQLDriverConnect mode. */ Index: util/MYODBCUtilClearDataSource.c =================================================================== --- util/MYODBCUtilClearDataSource.c (revision 1036) +++ util/MYODBCUtilClearDataSource.c (working copy) @@ -104,6 +104,11 @@ _global_free (pDataSource->pszSSLCIPHER); pDataSource->pszSSLCIPHER = NULL; } + if( pDataSource->pszSSLVERIFY) + { + _global_free (pDataSource->pszSSLVERIFY); + pDataSource->pszSSLVERIFY = NULL; + } if( pDataSource->pszSSLKEY) { _global_free (pDataSource->pszSSLKEY); Index: util/MYODBCUtilDefaultDataSource.c =================================================================== --- util/MYODBCUtilDefaultDataSource.c (revision 1036) +++ util/MYODBCUtilDefaultDataSource.c (working copy) @@ -90,6 +90,11 @@ _global_free (pDataSource->pszSSLKEY); pDataSource->pszSSLKEY = NULL; } + if( pDataSource->pszSSLVERIFY && !pDataSource->pszSSLVERIFY[0] ) + { + _global_free (pDataSource->pszSSLVERIFY); + pDataSource->pszSSLVERIFY = NULL; + } if (pDataSource->pszCHARSET && !pDataSource->pszCHARSET[0] ) { _global_free(pDataSource->pszCHARSET); @@ -108,3 +113,4 @@ return TRUE; } + Index: util/MYODBCUtilReadConnectStr.c =================================================================== --- util/MYODBCUtilReadConnectStr.c (revision 1036) +++ util/MYODBCUtilReadConnectStr.c (working copy) @@ -63,7 +63,7 @@ /* To prevent a memory leak when use such connection strings UID=root;PWD=;SERVER=localhost;... */ if( pszName ) free( pszName ); - pszName = myodbc_strndup( pAnchorChar, pScanChar - pAnchorChar ); + pszName = sqlwchardup( pAnchorChar, pScanChar - pAnchorChar ); if ( *pScanChar == '=' ) nState = MYODBCUTIL_ATTR_PARSE_STATE_VALUE_START; @@ -197,6 +197,11 @@ if ( !pDataSource->pszSSLKEY ) pDataSource->pszSSLKEY = (char *)_global_strndup( pAnchorChar, pScanChar - pAnchorChar ); } + else if ( strcasecmp( pszName, "SSLVERIFY" ) == 0 ) + { + if ( !pDataSource->pszSSLVERIFY ) + pDataSource->pszSSLVERIFY = (char *)_global_strndup( pAnchorChar, pScanChar - pAnchorChar ); + } else if (strcasecmp(pszName, "CHARSET") == 0) { if (!pDataSource->pszCHARSET) @@ -243,3 +248,4 @@ } + Index: util/MYODBCUtilReadDataSource.c =================================================================== --- util/MYODBCUtilReadDataSource.c (revision 1036) +++ util/MYODBCUtilReadDataSource.c (working copy) @@ -211,6 +211,11 @@ if ( !pDataSource->pszSSLKEY ) pDataSource->pszSSLKEY = _global_strdup( szValue ); } + else if ( strcasecmp( pszEntryName, "SSLVERIFY" ) == 0 ) + { + if ( !pDataSource->pszSSLVERIFY ) + pDataSource->pszSSLVERIFY = _global_strdup( szValue ); + } else if (strcasecmp(pszEntryName, "CHARSET") == 0) { if (!pDataSource->pszCHARSET) @@ -279,3 +284,4 @@ return TRUE; } + Index: util/MYODBCUtilReadDataSourceStr.c =================================================================== --- util/MYODBCUtilReadDataSourceStr.c (revision 1036) +++ util/MYODBCUtilReadDataSourceStr.c (working copy) @@ -282,6 +282,11 @@ if ( !pDataSource->pszSSLKEY ) pDataSource->pszSSLKEY = (char *)_global_strndup( pAnchorChar, pScanChar - pAnchorChar ); } + else if ( strcasecmp( pszName, "SSLVERIFY" ) == 0 ) + { + if ( !pDataSource->pszSSLVERIFY ) + pDataSource->pszSSLVERIFY = (char *)_global_strndup( pAnchorChar, pScanChar - pAnchorChar ); + } else if (strcasecmp(pszName, "CHARSET") == 0) { if (!pDataSource->pszCHARSET) @@ -325,3 +330,4 @@ } + Index: util/MYODBCUtilWriteConnectStr.c =================================================================== --- util/MYODBCUtilWriteConnectStr.c (revision 1036) +++ util/MYODBCUtilWriteConnectStr.c (working copy) @@ -189,6 +189,16 @@ return FALSE; } + if ( pDataSource->pszSSLVERIFY ) + { + if ( !MYODBCUtilInsertStr( pszStr, "SSLVERIFY=", nMaxLen, &nIndex ) ) + return FALSE; + if ( !MYODBCUtilInsertStr( pszStr, pDataSource->pszSSLVERIFY, nMaxLen, &nIndex ) ) + return FALSE; + if ( nIndex && !MYODBCUtilInsertStr( pszStr, ";", nMaxLen, &nIndex ) ) + return FALSE; + } + if (pDataSource->pszCHARSET) { if (nIndex && !MYODBCUtilInsertStr(pszStr, ";", nMaxLen, &nIndex)) @@ -204,3 +214,4 @@ } + Index: util/MYODBCUtilWriteDataSource.c =================================================================== --- util/MYODBCUtilWriteDataSource.c (revision 1036) +++ util/MYODBCUtilWriteDataSource.c (working copy) @@ -85,6 +85,9 @@ if ( pDataSource->pszSSLKEY && !SQLWritePrivateProfileString( pDataSource->pszDSN, "SSLKEY", pDataSource->pszSSLKEY, "odbc.ini" ) ) return FALSE; + if ( pDataSource->pszSSLVERIFY && + !SQLWritePrivateProfileString( pDataSource->pszDSN, "SSLVERIFY", pDataSource->pszSSLVERIFY, "odbc.ini" ) ) + return FALSE; if (pDataSource->pszCHARSET && !SQLWritePrivateProfileString(pDataSource->pszDSN, "CHARSET", pDataSource->pszCHARSET, "odbc.ini")) @@ -94,3 +97,4 @@ } + Index: util/MYODBCUtilWriteDataSourceStr.c =================================================================== --- util/MYODBCUtilWriteDataSourceStr.c (revision 1036) +++ util/MYODBCUtilWriteDataSourceStr.c (working copy) @@ -212,6 +212,16 @@ return FALSE; } + if ( pDataSource->pszSSLVERIFY ) + { + MYODBCUTILWRITEDATASOURCESTR_DELIM; + + if ( !MYODBCUtilInsertStr( pszStr, "SSLVERIFY=", nMaxLen, &nIndex ) ) + return FALSE; + if ( !MYODBCUtilInsertStr( pszStr, pDataSource->pszSSLVERIFY, nMaxLen, &nIndex ) ) + return FALSE; + } + if (pDataSource->pszCHARSET) { MYODBCUTILWRITEDATASOURCESTR_DELIM; @@ -233,3 +243,4 @@ } +