MySQL 8.3.0
Source Code Documentation
keyring_load.h
Go to the documentation of this file.
1/* Copyright (c) 2021, 2023, 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 KEYRING_LOAD_INCLUDED
24#define KEYRING_LOAD_INCLUDED
25
27
28/**
29 @ingroup group_keyring_component_services_inventory
30
31 Keyring load service provides way to initialize or reiniitalize
32 keyring component. This must be implemented by any component
33 that aims at providing keyring functionality.
34 @code
35 bool initialize_keyring() {
36 my_service<SERVICE_TYPE(keyring_load)> keyring_load(
37 "keyring_load", m_reg_srv);
38 if (!keyring_load.is_valid()) {
39 log_error("Failed to obtain handle of keyring initialize service");
40 return true;
41 }
42
43 if (keyring_load->initialize(component_path, instance_path) == true) {
44 return true;
45 }
46 return false;
47 }
48 @endcode
49*/
50
52
53/**
54 Initialize or Reinitialize keyring
55
56 A call to (re)initialize service API should result into
57 - Reading keyring configuration from its source
58 - Connecting to keyring backend
59 - Fetch information about stored key and populate
60 new in-memory structures - as needed
61
62 Note: This routine should be called in following cases:
63 A. After loading keyring component
64 B. To refresh keyring component
65
66 @param [in] component_path Path to component's shared library. Non-null.
67 @param [in] instance_path Path for instance specific configuration.
68 If null, assumed as current working directory.
69
70 @retval Status of the operation
71 @retval false Success
72 @retval true Failure
73*/
74
76 (const char *component_path, const char *instance_path));
77
79#endif // !KEYRING_LOAD_INCLUDED
bool load(THD *, const dd::String_type &fname, dd::String_type *buf)
Read an sdi file from disk and store in a buffer.
Definition: sdi_file.cc:307
#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