00001
00002
00003
00004
00005
00006
00007 #pragma once
00008
00009 #include <boost/shared_ptr.hpp>
00010
00011 #include <string>
00012 #include <Swiften/Base/API.h>
00013 #include <Swiften/Base/ByteArray.h>
00014
00015 namespace Swift {
00016 class SWIFTEN_API Certificate {
00017 public:
00018 typedef boost::shared_ptr<Certificate> ref;
00019
00020 virtual ~Certificate();
00021
00026 virtual std::string getSubjectName() const = 0;
00027
00028 virtual std::vector<std::string> getCommonNames() const = 0;
00029 virtual std::vector<std::string> getSRVNames() const = 0;
00030 virtual std::vector<std::string> getDNSNames() const = 0;
00031 virtual std::vector<std::string> getXMPPAddresses() const = 0;
00032
00033 virtual ByteArray toDER() const = 0;
00034
00035 virtual std::string getSHA1Fingerprint() const;
00036
00037 protected:
00038 static const char* ID_ON_XMPPADDR_OID;
00039 static const char* ID_ON_DNSSRV_OID;
00040
00041 };
00042 }