Skip to content

Commit c9c33b6

Browse files
author
Hemant Dangi
committed
wl#7972: Added connection option "rsaKey" to specify RSA public key path name.
1 parent 6fc05b8 commit c9c33b6

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

CHANGES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ GA 1.1.4 -
3737
fields. (Bug#18803414/72700)
3838
- Missing collation info in the column metadata methods for a result.
3939
(Bug#18803345/72698)
40+
- Added connection option "rsaKey" to specify RSA public key path name
41+
(wl#7972).
4042

4143
- Built against libmysql 5.6.
4244

driver/mysql_connection.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,8 @@ static const String2IntMap stringOptions[]=
247247
{
248248
{"preInit", MYSQL_INIT_COMMAND},
249249
{"sslCRL", MYSQL_OPT_SSL_CRL},
250-
{"sslCRLPath", MYSQL_OPT_SSL_CRLPATH}
250+
{"sslCRLPath", MYSQL_OPT_SSL_CRLPATH},
251+
{"rsaKey", MYSQL_SERVER_PUBLIC_KEY}
251252
};
252253

253254
template<class T>

test/unit/classes/connection.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,19 @@ void connection::connectUsingMapWrongTypes()
899899
}
900900
connection_properties.erase("sslCRLPath");
901901

902+
try
903+
{
904+
connection_properties["rsaKey"]=(boolval);
905+
created_objects.clear();
906+
con.reset(driver->connect(connection_properties));
907+
FAIL("No exception XXXIII - rsaKey");
908+
}
909+
catch (sql::InvalidArgumentException)
910+
{
911+
/* expected */
912+
}
913+
connection_properties.erase("rsaKey");
914+
902915
}
903916
catch (sql::SQLException &e)
904917
{

0 commit comments

Comments
 (0)