MySQL 8.0.31
Source Code Documentation
mysql_authentication_registration.h
Go to the documentation of this file.
1/* Copyright (c) 2021, 2022, Oracle and/or its affiliates.
2
3This program is free software; you can redistribute it and/or modify
4it under the terms of the GNU General Public License, version 2.0,
5as published by the Free Software Foundation.
6
7This program is also distributed with certain software (including
8but not limited to OpenSSL) that is licensed under separate terms,
9as designated in a particular file or component or in included license
10documentation. The authors of MySQL hereby grant you an additional
11permission to link the program and your derivative works with the
12separately licensed software that they have included with MySQL.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU General Public License, version 2.0, for more details.
18
19You should have received a copy of the GNU General Public License
20along with this program; if not, write to the Free Software
21Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef MYSQL_AUTHENTICATION_REGISTRATION_H
24#define MYSQL_AUTHENTICATION_REGISTRATION_H
25
27
28/**
29 @ingroup group_components_services_inventory
30
31 A service to do registration of fido device.
32*/
33BEGIN_SERVICE_DEFINITION(mysql_authentication_registration)
34
35/**
36 This method performs initiate registration step.
37
38 @param[out] outbuf Buffer to hold challenge
39 @param[in] outbuflen Length of buffer
40
41 @return
42 @retval FALSE Succeeded.
43 @retval TRUE Failed.
44*/
45DECLARE_BOOL_METHOD(init, (unsigned char **outbuf, unsigned int outbuflen));
46
47/**
48 This method performs finish registration step.
49
50 @param [in] buf Buffer holding signed challenge
51 @param [in] buflen Length of signed challenge
52 @param [in] challenge Buffer to hold random challenge
53 @param [in] challenge_length Length of random challenge
54 @param [out] challenge_response Buffer to hold challenge response
55 @param [out] challenge_response_length Length of challenge response
56
57 @return
58 @retval FALSE Succeeded.
59 @retval TRUE Failed.
60*/
61DECLARE_BOOL_METHOD(finish, (unsigned char *buf, unsigned int buflen,
62 const unsigned char *challenge,
63 unsigned int challenge_length,
64 unsigned char *challenge_response,
65 unsigned int *challenge_response_length));
66
67/**
68 This method calculates length of challenge required for server to allocate
69 buffer which needs to be passed to init() to extract challenge.
70
71 @param [out] outbuflen Buffer to hold length of challenge
72*/
73DECLARE_METHOD(void, get_challenge_length, (unsigned int *outbuflen));
74
75END_SERVICE_DEFINITION(mysql_authentication_registration)
76
77#endif /* MYSQL_AUTHENTICATION_REGISTRATION_H */
static mysql_service_status_t init()
Component initialization.
Definition: audit_api_message_emit.cc:570
Definition: buf0block_hint.cc:29
#define DECLARE_METHOD(retval, name, args)
Declares a method as a part of the Service definition.
Definition: service.h:102
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:90
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:85
#define DECLARE_BOOL_METHOD(name, args)
Declares a method that returns bool as a part of the Service definition.
Definition: service.h:111