24#ifndef KEYRING_GENERATOR_SERVICE_IMPL_TEMPLATE_INCLUDED
25#define KEYRING_GENERATOR_SERVICE_IMPL_TEMPLATE_INCLUDED
32#include <mysqld_error.h>
39namespace service_implementation {
59template <
typename Backend,
typename Data_extension = data::Data>
61 const char *data_id,
const char *auth_id,
const char *data_type,
66 if (
callbacks.keyring_initialized() ==
false) {
70 if (data_id ==
nullptr || !*data_id) {
77 ER_NOTE_KEYRING_COMPONENT_WRITE_MAXIMUM_DATA_LENGTH,
83 if (keyring_operations.
generate(metadata, data_type, data_size) ==
true) {
85 ER_NOTE_KEYRING_COMPONENT_GENERATE_FAILED, data_id,
86 (auth_id ==
nullptr || !*auth_id) ?
"NULL" : auth_id);
91 LogComponentErr(
ERROR_LEVEL, ER_KEYRING_COMPONENT_EXCEPTION,
"generate",
static const sasl_callback_t callbacks[]
Definition: auth_ldap_sasl_client.h:45
Keyring operations A class to perform operations on keyring.
Definition: operations.h:483
bool generate(const meta::Metadata &metadata, const data::Type type, size_t length)
Generate API.
Definition: operations.h:633
size_t maximum_data_length() const
Maximum data length supported.
Definition: operations.h:779
Definition: service_requirements.h:36
@ ERROR_LEVEL
Definition: my_loglevel.h:43
@ INFORMATION_LEVEL
Definition: my_loglevel.h:45
bool generate_template(const char *data_id, const char *auth_id, const char *data_type, size_t data_size, Keyring_operations< Backend, Data_extension > &keyring_operations, Component_callbacks &callbacks)
Generate data and store in keyring.
Definition: keyring_generator_service_impl_template.h:60
Definition: keyring_encryption_service_definition.h:32