12#ifndef OPENVPN_PKI_X509TRACK_H
13#define OPENVPN_PKI_X509TRACK_H
42static const char *
const names[] = {
61 if (type >= 0 && type <
N_TYPES)
69 for (
size_t i = 0; i <
N_TYPES; ++i)
85 full_chain = (spec.length() > 0 && spec[0] ==
'+');
88 throw Exception(
"cannot parse attribute '" + spec +
"'");
116 const bool include_serial,
117 const bool include_serial_hex)
122 for (
const auto &i : *xt)
128 emplace_back(o.
get(1, 64));
130 catch (
const std::exception &e)
132 throw x509_track_error(e.what());
138 emplace_back(
SERIAL,
true);
145 for (
auto &c : *
this)
154 for (
auto &c : *
this)
156 ret += c.to_string();
167 std::string value_arg)
170 value(std::move(value_arg))
179 ret +=
">CLIENT:ENV,";
204struct Set :
public std::vector<KeyValue>
210 for (
auto &kv : *
this)
212 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