MySQL 9.1.0
Source Code Documentation
keyring_load.h
Go to the documentation of this file.
1/* Copyright (c) 2021, 2024, 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 designed to work 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 either included with
13the program or referenced in the documentation.
14
15This program is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18GNU General Public License, version 2.0, for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef KEYRING_LOAD_INCLUDED
25#define KEYRING_LOAD_INCLUDED
26
28
29/**
30 @ingroup group_keyring_component_services_inventory
31
32 Keyring load service provides way to initialize or reiniitalize
33 keyring component. This must be implemented by any component
34 that aims at providing keyring functionality.
35 @code
36 bool initialize_keyring() {
37 my_service<SERVICE_TYPE(keyring_load)> keyring_load(
38 "keyring_load", m_reg_srv);
39 if (!keyring_load.is_valid()) {
40 log_error("Failed to obtain handle of keyring initialize service");
41 return true;
42 }
43
44 if (keyring_load->initialize(component_path, instance_path) == true) {
45 return true;
46 }
47 return false;
48 }
49 @endcode
50*/
51
53
54/**
55 Initialize or Reinitialize keyring
56
57 A call to (re)initialize service API should result into
58 - Reading keyring configuration from its source
59 - Connecting to keyring backend
60 - Fetch information about stored key and populate
61 new in-memory structures - as needed
62
63 Note: This routine should be called in following cases:
64 A. After loading keyring component
65 B. To refresh keyring component
66
67 @param [in] component_path Path to component's shared library. Non-null.
68 @param [in] instance_path Path for instance specific configuration.
69 If null, assumed as current working directory.
70
71 @retval Status of the operation
72 @retval false Success
73 @retval true Failure
74*/
75
77 (const char *component_path, const char *instance_path));
78
80#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:308
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:91
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:86
#define DECLARE_BOOL_METHOD(name, args)
Declares a method that returns bool as a part of the Service definition.
Definition: service.h:112