summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordreijer <dreijer@echobit.net>2012-03-22 14:17:38 (GMT)
committerdreijer <dreijer@echobit.net>2012-03-22 15:56:31 (GMT)
commit5f9e12d9d197195a859ad523a39fdb752f2c4cff (patch)
tree827b31bc062cfef1432eb4b984760ec48d9e32b0 /Swiften/TLS/Schannel/SchannelCertificate.h
parent2fa37f2976b933ca0bcf5f85dd1615805776d67d (diff)
downloadswift-contrib-dreijer/schannel.zip
swift-contrib-dreijer/schannel.tar.bz2
Manual certificate verification.dreijer/schannel
Added two additional TLS errors related to revocation. License: This patch is BSD-licensed, see http://www.opensource.org/licenses/bsd-license.php
Diffstat (limited to 'Swiften/TLS/Schannel/SchannelCertificate.h')
-rw-r--r--Swiften/TLS/Schannel/SchannelCertificate.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Swiften/TLS/Schannel/SchannelCertificate.h b/Swiften/TLS/Schannel/SchannelCertificate.h
index f531cff..395d3ec 100644
--- a/Swiften/TLS/Schannel/SchannelCertificate.h
+++ b/Swiften/TLS/Schannel/SchannelCertificate.h
@@ -16,66 +16,71 @@ namespace Swift
{
class SchannelCertificate : public Certificate
{
public:
typedef boost::shared_ptr<SchannelCertificate> ref;
public:
SchannelCertificate(const ScopedCertContext& certCtxt);
SchannelCertificate(const ByteArray& der);
std::string getSubjectName() const
{
return m_subjectName;
}
std::vector<std::string> getCommonNames() const
{
return m_commonNames;
}
std::vector<std::string> getSRVNames() const
{
return m_srvNames;
}
std::vector<std::string> getDNSNames() const
{
return m_dnsNames;
}
std::vector<std::string> getXMPPAddresses() const
{
return m_xmppAddresses;
}
- ByteArray toDER() const;
+ ScopedCertContext getCertContext() const
+ {
+ return m_cert;
+ }
+ ByteArray toDER() const;
+
private:
void parse();
std::string wstrToStr(const std::wstring& wstr);
void addSRVName(const std::string& name)
{
m_srvNames.push_back(name);
}
void addDNSName(const std::string& name)
{
m_dnsNames.push_back(name);
}
void addXMPPAddress(const std::string& addr)
{
m_xmppAddresses.push_back(addr);
}
private:
ScopedCertContext m_cert;
std::string m_subjectName;
std::vector<std::string> m_commonNames;
std::vector<std::string> m_dnsNames;
std::vector<std::string> m_xmppAddresses;
std::vector<std::string> m_srvNames;
};
}