]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/transport.h
Find the right variable so it actually works, too.
[user/henk/code/inspircd.git] / src / modules / transport.h
index f4cf3f4a5e70c1d07527fa1d86d7bba57e02cd78..9f29ab3d8b7646d3696fca4dbd1337a19e83f3e6 100644 (file)
@@ -104,6 +104,19 @@ class ssl_cert
        {
                return revoked;
        }
+
+       std::string GetMetaLine()
+       {
+               std::stringstream value;
+               bool hasError = error.length();
+               value << (IsInvalid() ? "v" : "V") << (IsTrusted() ? "T" : "t") << (IsRevoked() ? "R" : "r")
+                       << (IsUnknownSigner() ? "s" : "S") << (hasError ? "E" : "e") << " ";
+               if (hasError)
+                       value << GetError();
+               else
+                       value << GetFingerprint() << " " << GetDN() << " " << GetIssuer();
+               return value.str();
+       }
 };
 
 /** Used to represent a request to a transport provider module