diff options
| author | 2022-02-14 15:59:20 +0000 | |
|---|---|---|
| committer | 2022-02-14 20:28:08 +0000 | |
| commit | 4169e0e7993bb7820eea313ed60ebf0fe7770fbd (patch) | |
| tree | a6d516bd00e845b49ed49a8f00b8b41578d9c976 /include | |
| parent | Change delaymsg to use exemptchanops and have an oper priv (#1959). (diff) | |
Make the accessor methods in ssl_cert const.
Diffstat (limited to 'include')
| -rw-r--r-- | include/modules/ssl.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/include/modules/ssl.h b/include/modules/ssl.h index 84e2ab3ef..58a8bbbc4 100644 --- a/include/modules/ssl.h +++ b/include/modules/ssl.h @@ -53,7 +53,7 @@ class ssl_cert : public refcountbase /** Get certificate distinguished name * @return Certificate DN */ - const std::string& GetDN() + const std::string& GetDN() const { return dn; } @@ -61,7 +61,7 @@ class ssl_cert : public refcountbase /** Get Certificate issuer * @return Certificate issuer */ - const std::string& GetIssuer() + const std::string& GetIssuer() const { return issuer; } @@ -70,7 +70,7 @@ class ssl_cert : public refcountbase * @return The error associated with this users certificate, * or an empty string if there is no error. */ - const std::string& GetError() + const std::string& GetError() const { return error; } @@ -78,7 +78,7 @@ class ssl_cert : public refcountbase /** Get key fingerprint. * @return The key fingerprint as a hex string. */ - const std::string& GetFingerprint() + const std::string& GetFingerprint() const { return fingerprint; } @@ -87,7 +87,7 @@ class ssl_cert : public refcountbase * @return True if this is a trusted certificate * (the certificate chain validates) */ - bool IsTrusted() + bool IsTrusted() const { return trusted; } @@ -96,7 +96,7 @@ class ssl_cert : public refcountbase * @return True if the certificate itself is * correctly formed. */ - bool IsInvalid() + bool IsInvalid() const { return invalid; } @@ -105,7 +105,7 @@ class ssl_cert : public refcountbase * @return True if the certificate appears to be * self-signed. */ - bool IsUnknownSigner() + bool IsUnknownSigner() const { return unknownsigner; } @@ -115,7 +115,7 @@ class ssl_cert : public refcountbase * Note that this only works properly for GnuTLS * right now. */ - bool IsRevoked() + bool IsRevoked() const { return revoked; } @@ -123,7 +123,7 @@ class ssl_cert : public refcountbase /** Get certificate usability * @return True if the certificate is not expired nor revoked */ - bool IsUsable() + bool IsUsable() const { return !invalid && !revoked && error.empty(); } @@ -132,12 +132,12 @@ class ssl_cert : public refcountbase * @return True if the certificate is issued by a CA * and valid. */ - bool IsCAVerified() + bool IsCAVerified() const { return IsUsable() && trusted && !unknownsigner; } - std::string GetMetaLine() + std::string GetMetaLine() const { std::stringstream value; bool hasError = !error.empty(); |
