@@ -1436,27 +1436,40 @@ void MySQL_Connection::init(ConnectOptionsMap & properties)
1436
1436
" fido_messages_callback" ,
1437
1437
(const void *)fido_callback_func
1438
1438
);
1439
+ } catch (sql::MethodNotImplementedException &) {
1440
+ // If failed, authentication_fido_client is no longer present... skip
1441
+ } catch (sql::InvalidArgumentException &e) {
1442
+ throw ::sql::SQLException (
1443
+ " Failed to set fido message callback for "
1444
+ " authentication_fido_client plugin" );
1445
+ }
1446
+
1447
+ try
1448
+ {
1449
+ fido_callback_instance = callback;
1450
+ proxy->plugin_option (MYSQL_CLIENT_AUTHENTICATION_PLUGIN,
1451
+ " authentication_webauthn_client" ,
1452
+ " webauthn_messages_callback" ,
1453
+ (const void *)fido_callback_func);
1439
1454
1440
1455
}
1441
1456
catch (sql::InvalidArgumentException& e) {
1442
- throw ::sql::SQLUnsupportedOptionException (
1443
- " Failed to set fido message callback for authentication_fido_client plugin" ,
1444
- OPT_OCI_CONFIG_FILE
1445
- );
1457
+ throw ::sql::SQLException (
1458
+ " Failed to set webauthn message callback for "
1459
+ " authentication_webauthn_client plugin" );
1446
1460
}
1447
1461
}
1448
1462
}
1449
1463
1450
- ~Fido_Callback_Setter ()
1464
+ ~Fido_Callback_Setter ()
1465
+ {
1466
+ if (fido_callback_instance && proxy)
1451
1467
{
1452
- if (fido_callback_instance && proxy)
1468
+ try
1453
1469
{
1454
- try
1455
- {
1456
- proxy->plugin_option (MYSQL_CLIENT_AUTHENTICATION_PLUGIN,
1457
- " authentication_fido_client" ,
1458
- " fido_messages_callback" ,
1459
- nullptr );
1470
+ proxy->plugin_option (MYSQL_CLIENT_AUTHENTICATION_PLUGIN,
1471
+ " authentication_webauthn_client" ,
1472
+ " webauthn_messages_callback" , nullptr );
1460
1473
}
1461
1474
catch (...) {}
1462
1475
fido_callback_instance = nullptr ;
0 commit comments