diff ui/certificate.h @ 355:5f1494fab517

merged.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 10 Apr 2014 16:03:23 +0200
parents b0a274f4f9e2 a49766196a7d
children d56f952ba817
line wrap: on
line diff
--- a/ui/certificate.h	Thu Apr 10 15:57:26 2014 +0200
+++ b/ui/certificate.h	Thu Apr 10 16:03:23 2014 +0200
@@ -36,6 +36,12 @@
      **/
     Certificate(const QString& b64Line = QString());
 
+    /** @brief construct a certificate from a byte array of DER data
+     *
+     *  @param[in] derData a der encoded certificate.
+     **/
+    Certificate(const QByteArray& derData);
+
     /** @brief check if this certificate could be parsed */
     bool isValid() const {return mValid;}
 
@@ -94,6 +100,18 @@
     /** @brief get the date the certificate expires */
     QDateTime validTo() const {return mValidTo;}
 
+    /** @brief construct certificate objects from a file
+     *
+     *  Constructs a new Certificate Object from a file containing either
+     *  one DER encoded certificate or one or many PEM certificates.
+     *  If no certificate could be parsed from that file an empty list is
+     *  returned.
+     *
+     *  The size restrictions for the certificate list file also apply
+     *  for this file.
+     **/
+    static QList<Certificate> fromFileName (const QString& file_name);
+
 private:
     /** @brief Helper function to parse the details of a certificate **/
     void parseDetails(const QByteArray& cert);

http://wald.intevation.org/projects/trustbridge/