20 validAttributesStr(attrs),
21 attributeIsOptional(optionalAttr),
22 sslAttributeCall(sslStrategy)
26 size_t next = std::string::npos;
27 std::string valid(attrs);
29 next = valid.find_first_of(
"|", current);
30 validAttributes.push_back(valid.substr( current, (next == std::string::npos ? std::string::npos : next - current)));
32 }
while (next != std::string::npos);
47 return strcmp ((
char *)l,(
char *)r);
96 if (*it ==
"*" || *it == newAttribute) {
112 if (strcasecmp(newAttribute,
"DN") != 0) {
113 int nid = OBJ_txt2nid(newAttribute);
115 const size_t span = strspn(newAttribute,
"0123456789.");
116 if(newAttribute[span] ==
'\0') {
123 nid = OBJ_create(newAttribute, newAttribute, newAttribute);
124 debugs(28, 7,
"New SSL certificate attribute created with name: " << newAttribute <<
" and nid: " << nid);
128 debugs(28,
DBG_CRITICAL,
"FATAL: Not valid SSL certificate attribute name or numerical OID: " << newAttribute);
int splaystrcmp(T &l, T &r)
bool match(X509 *) override
bool empty() const override
bool attributeIsOptional
True if the attribute is optional (-xxx options)
Ssl::GETX509ATTRIBUTE * sslAttributeCall
The callback used to retrieve the data from X509 cert.
ACLCertificateData(Ssl::GETX509ATTRIBUTE *, const char *attributes, bool optionalAttr=false)
const char * validAttributesStr
SBufList dump() const override
std::list< std::string > validAttributes
Parsed list of valid attribute names.
bool match(char const *) override
void insert(const char *)
Insert a string data value.
bool empty() const override
SBufList dump() const override
static char * strtokFile()
#define debugs(SECTION, LEVEL, CONTENT)
char const * GETX509ATTRIBUTE(X509 *, const char *)
void SetKey(SBuf &keyStorage, const char *keyParameterName, const char *newKey)
std::list< SBuf > SBufList