MySQL 8.4.0
Source Code Documentation
authentication_webauthn_clientopt-vars.h
Go to the documentation of this file.
1/* Copyright (c) 2023, 2024, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef AUTHENTICATION_WEBAUTH_CLIENTOPT_VARS_H
25#define AUTHENTICATION_WEBAUTH_CLIENTOPT_VARS_H
26
27#include <cstdio>
28#include "mysql.h"
29
30using std::snprintf;
32
34 size_t error_size) {
36 struct st_mysql_client_plugin *webauthn_client_plugin =
37 mysql_client_find_plugin(mysql, "authentication_webauthn_client",
39 if (!webauthn_client_plugin) {
40 snprintf(error, error_size,
41 "Failed to load authentication_webauthn_client.");
42 return 1;
43 }
44
46 webauthn_client_plugin,
47 "authentication_webauthn_client_preserve_privacy",
49 snprintf(error, error_size,
50 "Failed to set value 'TRUE' for "
51 "--plugin-authentication-webauthn-client-preserve-privacy");
52 return 1;
53 }
54 }
55 return 0;
56}
57#endif /* AUTHENTICATION_WEBAUTH_CLIENTOPT_VARS_H */
static int set_authentication_webauthn_options(MYSQL *mysql, char *error, size_t error_size)
Definition: authentication_webauthn_clientopt-vars.h:33
bool opt_authentication_webauthn_client_preserve_privacy
Definition: authentication_webauthn_clientopt-vars.h:31
int mysql_plugin_options(struct st_mysql_client_plugin *plugin, const char *option, const void *value)
set plugin options
Definition: client_plugin.cc:657
struct st_mysql_client_plugin * mysql_client_find_plugin(struct MYSQL *mysql, const char *name, int type)
finds an already loaded plugin by name, or loads it, if necessary
Definition: client_plugin.cc:630
#define MYSQL_CLIENT_AUTHENTICATION_PLUGIN
Definition: client_plugin.h:80
This file defines the client API to MySQL and also the ABI of the dynamically linked libmysqlclient.
void error(const char *format,...)
Definition: instrumented_condition_variable.h:32
Definition: mysql.h:300
Definition: client_plugin.h:114