summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/TLS/PKCS12Certificate.h')
-rw-r--r--Swiften/TLS/PKCS12Certificate.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/Swiften/TLS/PKCS12Certificate.h b/Swiften/TLS/PKCS12Certificate.h
new file mode 100644
index 0000000..4b0e708
--- /dev/null
+++ b/Swiften/TLS/PKCS12Certificate.h
@@ -0,0 +1,37 @@
+#ifndef SWIFTEN_PKCS12Certificate_H
+#define SWIFTEN_PKCS12Certificate_H
+
+#include "Swiften/Base/ByteArray.h"
+
+namespace Swift {
+ class PKCS12Certificate {
+ public:
+ PKCS12Certificate() {}
+
+ PKCS12Certificate(const String& filename, const String& password) : password_(password) {
+ data_.readFromFile(filename);
+ }
+
+ bool isNull() const {
+ return data_.isEmpty();
+ }
+
+ const ByteArray& getData() const {
+ return data_;
+ }
+
+ void setData(const ByteArray& data) {
+ data_ = data;
+ }
+
+ const String& getPassword() const {
+ return password_;
+ }
+
+ private:
+ ByteArray data_;
+ String password_;
+ };
+}
+
+#endif