Certificate.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2025 The Squid Software Foundation and contributors
3  *
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.
7  */
8 
9 #ifndef SQUID_SRC_SECURITY_CERTIFICATE_H
10 #define SQUID_SRC_SECURITY_CERTIFICATE_H
11 
12 #include "sbuf/forward.h"
13 #include "security/forward.h"
14 
15 // The accessing/testing functions below require a non-constant Certificate when
16 // it is modified by an underlying library implementation (e.g., GnuTLS).
17 
18 namespace Security
19 {
20 
23 
26 
31 bool IssuedBy(Certificate &cert, Certificate &issuer);
32 
34 inline bool SelfSigned(Certificate &c) { return IssuedBy(c, c); }
35 
36 } // namespace Security
37 
38 // Declared outside Security because all underlying Security::Certificate types
39 // are declared inside global namespace.
41 std::ostream &operator <<(std::ostream &, Security::Certificate &);
42 
43 #endif /* SQUID_SRC_SECURITY_CERTIFICATE_H */
44 
Definition: SBuf.h:93
SBuf SubjectName(Certificate &)
The SubjectName field of the given certificate (if found) or an empty SBuf.
Definition: Certificate.cc:68
SBuf IssuerName(Certificate &)
The Issuer field of the given certificate (if found) or an empty SBuf.
Definition: Certificate.cc:28
bool IssuedBy(Certificate &cert, Certificate &issuer)
Definition: Certificate.cc:108
X509 Certificate
Definition: forward.h:79
bool SelfSigned(Certificate &c)
Whether the given certificate is self-signed.
Definition: Certificate.h:34
std::ostream & operator<<(std::ostream &, Security::Certificate &)
reports a one-line gist of the Certificate Subject Name (for debugging)
Definition: Certificate.cc:132
Network/connection security abstraction layer.
Definition: Connection.h:33

 

Introduction

Documentation

Support

Miscellaneous