X509_Context::Config Struct Reference

Public Member Functions

EVENTSVC_DLL bool set_ldap_url (const std::string &)
 
EVENTSVC_DLL bool operator!= (const Config &) const
 

Data Fields

std::string ident_file
 
std::string ident_pphr_file
 
std::list< std::string > certs
 
std::list< std::string > trust_anchors
 
std::string ldap_host
 
int ldap_port
 
int check_revocation
 
bool OCSPnonce
 whether to use (and require) nonces
 
std::string OCSPuri
 URI for an OCSP trusted responder.
 
std::string OCSPresponder
 name of file for certificate of trusted responder signer
 
int lookup_flags
 Things not to use for lookup.
 

Detailed Description

Definition at line 28 of file X509Context.h.

Constructor & Destructor Documentation

◆ Config()

EVENTSVC_DLL X509_Context::Config::Config ( )
inline

Definition at line 41 of file X509Context.h.

41: ldap_port(389), check_revocation(0), OCSPnonce(false), lookup_flags(0) {}
int lookup_flags
Things not to use for lookup.
Definition X509Context.h:39
bool OCSPnonce
whether to use (and require) nonces
Definition X509Context.h:36

Member Function Documentation

◆ set_ldap_url()

bool X509_Context::Config::set_ldap_url ( const std::string &  url)

Definition at line 40 of file X509Context.C.

40 {
41 if (url.compare(0, 7, "ldap://") != 0) {
42 return false;
43 }
44 ldap_host = "";
45 size_t pos = 7;
46 while (pos < url.length() && url[pos] != ':' && url[pos] != '/') {
47 ldap_host += url[pos];
48 ++pos;
49 }
50 if (pos == url.length() || url[pos] == '/') {
51 return true;
52 }
53 std::string port(url.substr(pos+1));
54 if (port[port.length()-1] == '/')
55 port = port.substr(0, port.length()-1);
56 for (pos=0; pos < port.length(); ++pos)
57 if (!std::isdigit(port[pos]))
58 return false;
59 ldap_port = atoi(port.c_str());
60 return true;
61 }

◆ operator!=()

bool X509_Context::Config::operator!= ( const Config that) const

Definition at line 124 of file X509Context.C.

124 {
125 if (ident_file != that.ident_file)
126 return true;
127 if (ident_pphr_file != that.ident_pphr_file)
128 return true;
129 if (ldap_host != that.ldap_host)
130 return true;
131 if (ldap_port != that.ldap_port)
132 return true;
133 if (check_revocation != that.check_revocation)
134 return true;
135 if (!lists_equiv(certs, that.certs))
136 return true;
137 if (!lists_equiv(trust_anchors, that.trust_anchors))
138 return true;
139
140 return false;
141 }

Field Documentation

◆ ident_file

std::string X509_Context::Config::ident_file

Definition at line 29 of file X509Context.h.

◆ ident_pphr_file

std::string X509_Context::Config::ident_pphr_file

Definition at line 30 of file X509Context.h.

◆ certs

std::list<std::string> X509_Context::Config::certs

Definition at line 31 of file X509Context.h.

◆ trust_anchors

std::list<std::string> X509_Context::Config::trust_anchors

Definition at line 32 of file X509Context.h.

◆ ldap_host

std::string X509_Context::Config::ldap_host

Definition at line 33 of file X509Context.h.

◆ ldap_port

int X509_Context::Config::ldap_port

Definition at line 34 of file X509Context.h.

◆ check_revocation

int X509_Context::Config::check_revocation

Definition at line 35 of file X509Context.h.

◆ OCSPnonce

bool X509_Context::Config::OCSPnonce

whether to use (and require) nonces

Definition at line 36 of file X509Context.h.

◆ OCSPuri

std::string X509_Context::Config::OCSPuri

URI for an OCSP trusted responder.

Definition at line 37 of file X509Context.h.

◆ OCSPresponder

std::string X509_Context::Config::OCSPresponder

name of file for certificate of trusted responder signer

Definition at line 38 of file X509Context.h.

◆ lookup_flags

int X509_Context::Config::lookup_flags

Things not to use for lookup.

Definition at line 39 of file X509Context.h.


The documentation for this struct was generated from the following files:

All rights reserved © 2002 - 2024 Isode Ltd.