diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-11-07 20:07:06 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-11-07 21:27:17 (GMT) |
commit | a594eb3fef7e047d1eca7959d7734d4d10fd1eb7 (patch) | |
tree | f0c75a890caf231e18c963e6485d8c3fcf418324 /Swiften/TLS/Certificate.h | |
parent | 8cfb6d8f3492dd4180429f37dfb463b2fa48b0b8 (diff) | |
download | swift-contrib-a594eb3fef7e047d1eca7959d7734d4d10fd1eb7.zip swift-contrib-a594eb3fef7e047d1eca7959d7734d4d10fd1eb7.tar.bz2 |
Refactoring certificates & certificate checking.
Diffstat (limited to 'Swiften/TLS/Certificate.h')
-rw-r--r-- | Swiften/TLS/Certificate.h | 48 |
1 files changed, 11 insertions, 37 deletions
diff --git a/Swiften/TLS/Certificate.h b/Swiften/TLS/Certificate.h index 21ea0bd..3a812a8 100644 --- a/Swiften/TLS/Certificate.h +++ b/Swiften/TLS/Certificate.h @@ -15,42 +15,16 @@ namespace Swift { public: typedef boost::shared_ptr<Certificate> ref; - const String& getCommonName() const { - return commonName; - } - - void setCommonName(const String& commonName) { - this->commonName = commonName; - } - - const std::vector<String>& getSRVNames() const { - return srvNames; - } - - void addSRVName(const String& name) { - srvNames.push_back(name); - } - - const std::vector<String>& getDNSNames() const { - return dnsNames; - } - - void addDNSName(const String& name) { - dnsNames.push_back(name); - } - - const std::vector<String>& getXMPPAddresses() const { - return xmppAddresses; - } - - void addXMPPAddress(const String& addr) { - xmppAddresses.push_back(addr); - } - - private: - String commonName; - std::vector<String> dnsNames; - std::vector<String> xmppAddresses; - std::vector<String> srvNames; + virtual ~Certificate(); + + virtual String getCommonName() const = 0; + virtual std::vector<String> getSRVNames() const = 0; + virtual std::vector<String> getDNSNames() const = 0; + virtual std::vector<String> getXMPPAddresses() const = 0; + + protected: + static const char* ID_ON_XMPPADDR_OID; + static const char* ID_ON_DNSSRV_OID; + }; } |