]>
Commit | Line | Data |
---|---|---|
3841dd46 | 1 | /* |
f70aedc4 | 2 | * Copyright (C) 1996-2021 The Squid Software Foundation and contributors |
3841dd46 | 3 | * |
bbc27441 AJ |
4 | * Squid software is distributed under GPLv2+ license and includes |
5 | * contributions from numerous individuals and organizations. | |
6 | * Please see the COPYING and CONTRIBUTORS files for details. | |
3841dd46 | 7 | */ |
8 | ||
9 | #ifndef SQUID_ACLCERTIFICATEDATA_H | |
10 | #define SQUID_ACLCERTIFICATEDATA_H | |
63be0a78 | 11 | |
3ad63615 AR |
12 | #include "acl/Acl.h" |
13 | #include "acl/Data.h" | |
3ad63615 | 14 | #include "acl/StringData.h" |
602d9612 | 15 | #include "ssl/support.h" |
00352183 AR |
16 | #include <string> |
17 | #include <list> | |
3841dd46 | 18 | |
63be0a78 | 19 | /// \ingroup ACLAPI |
00352183 | 20 | class ACLCertificateData : public ACLData<X509 *> |
62e76326 | 21 | { |
b001e822 | 22 | MEMPROXY_CLASS(ACLCertificateData); |
3841dd46 | 23 | |
741c2986 | 24 | public: |
00352183 | 25 | ACLCertificateData(Ssl::GETX509ATTRIBUTE *, const char *attributes, bool optionalAttr = false); |
5dee515e | 26 | ACLCertificateData(ACLCertificateData const &); |
27 | ACLCertificateData &operator= (ACLCertificateData const &); | |
3841dd46 | 28 | virtual ~ACLCertificateData(); |
00352183 | 29 | bool match(X509 *); |
2cb8d372 | 30 | virtual SBufList dump() const; |
3841dd46 | 31 | void parse(); |
65092baf | 32 | bool empty() const; |
00352183 | 33 | virtual ACLData<X509 *> *clone() const; |
62e76326 | 34 | |
00352183 AR |
35 | /// A '|'-delimited list of valid ACL attributes. |
36 | /// A "*" item means that any attribute is acceptable. | |
37 | /// Assumed to be a const-string and is never duped/freed. | |
38 | /// Nil unless ACL form is: acl Name type attribute value1 ... | |
39 | const char *validAttributesStr; | |
40 | /// Parsed list of valid attribute names | |
41 | std::list<std::string> validAttributes; | |
42 | /// True if the attribute is optional (-xxx options) | |
43 | bool attributeIsOptional; | |
3841dd46 | 44 | char *attribute; |
b0dd28ba | 45 | ACLStringData values; |
62e76326 | 46 | |
47 | private: | |
00352183 AR |
48 | /// The callback used to retrieve the data from X509 cert |
49 | Ssl::GETX509ATTRIBUTE *sslAttributeCall; | |
3841dd46 | 50 | }; |
51 | ||
52 | #endif /* SQUID_ACLCERTIFICATEDATA_H */ | |
f53969cc | 53 |