12#ifndef OPENVPN_PKI_X509TRACK_H
13#define OPENVPN_PKI_X509TRACK_H
42static const char *
const names[] = {
61 if (type >= 0 && type <
N_TYPES)
68 for (
size_t i = 0; i <
N_TYPES; ++i)
84 full_chain = (!spec.empty() && spec[0] ==
'+');
87 throw Exception(
"cannot parse attribute '" + spec +
"'");
113 const bool include_serial,
114 const bool include_serial_hex)
119 for (
const auto &i : *xt)
125 emplace_back(o.
get(1, 64));
127 catch (
const std::exception &e)
129 throw x509_track_error(e.what());
135 emplace_back(
SERIAL,
true);
142 for (
auto &c : *
this)
151 for (
auto &c : *
this)
153 ret += c.to_string();
164 std::string value_arg)
167 value(std::move(value_arg))
176 ret +=
">CLIENT:ENV,";
201struct Set :
public std::vector<KeyValue>
207 for (
auto &kv : *
this)
209 ret += kv.to_string(omi_form);
const IndexList * get_index_ptr(const std::string &name) const
void touch(bool lightly=false) const
const std::string & get(const size_t index, const size_t max_len) const
#define OPENVPN_EXCEPTION(C)
static const char *const names[]
const char * name(const Type type)
Type parse_type(const std::string &name)
std::string reduce_spaces(const std::string &str, const char rep)
constexpr std::size_t array_size(T(&)[N])
std::string to_string(const T &t)
Convert a value to a string.
std::string to_string() const
bool exists(const Type t) const
ConfigSet(const OptionList &opt, const bool include_serial, const bool include_serial_hex)
bool depth_match(const int depth) const
Config(const Type type_arg, const bool full_chain_arg)
std::string to_string() const
Config(const std::string &spec)
std::string key_name() const
std::string to_string(const bool omi_form) const
KeyValue(const Type type_arg, const int depth_arg, std::string value_arg)
std::string to_string(const bool omi_form) const