summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-11-07 20:07:06 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-11-07 21:27:17 (GMT)
commita594eb3fef7e047d1eca7959d7734d4d10fd1eb7 (patch)
treef0c75a890caf231e18c963e6485d8c3fcf418324 /Swiften/TLS/Certificate.h
parent8cfb6d8f3492dd4180429f37dfb463b2fa48b0b8 (diff)
downloadswift-a594eb3fef7e047d1eca7959d7734d4d10fd1eb7.zip
swift-a594eb3fef7e047d1eca7959d7734d4d10fd1eb7.tar.bz2
Refactoring certificates & certificate checking.
Diffstat (limited to 'Swiften/TLS/Certificate.h')
-rw-r--r--Swiften/TLS/Certificate.h48
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;
+
};
}