diff options
Diffstat (limited to 'Swiften/TLS/TLSContext.cpp')
-rw-r--r-- | Swiften/TLS/TLSContext.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Swiften/TLS/TLSContext.cpp b/Swiften/TLS/TLSContext.cpp index 026ae70..d461d91 100644 --- a/Swiften/TLS/TLSContext.cpp +++ b/Swiften/TLS/TLSContext.cpp @@ -11,4 +11,9 @@ namespace Swift { TLSContext::~TLSContext() { } +Certificate::ref TLSContext::getPeerCertificate() const { + std::vector<Certificate::ref> chain = getPeerCertificateChain(); + return chain.empty() ? Certificate::ref() : chain[0]; +} + } |