comparison ui/certificate.h @ 349:a49766196a7d

Add certificateFromFile method Currently untested
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 10 Apr 2014 15:08:54 +0200
parents 36c68dfb821d
children 5f1494fab517
comparison
equal deleted inserted replaced
348:e6aa82466420 349:a49766196a7d
33 * the command. I: or R: 33 * the command. I: or R:
34 * 34 *
35 * @param[in] b64Line The line from the certificate list. 35 * @param[in] b64Line The line from the certificate list.
36 **/ 36 **/
37 Certificate(const QString& b64Line = QString()); 37 Certificate(const QString& b64Line = QString());
38
39 /** @brief construct a certificate from a byte array of DER data
40 *
41 * @param[in] derData a der encoded certificate.
42 **/
43 Certificate(const QByteArray& derData);
38 44
39 /** @brief check if this certificate could be parsed */ 45 /** @brief check if this certificate could be parsed */
40 bool isValid() const {return mValid;} 46 bool isValid() const {return mValid;}
41 47
42 /** @brief get a short description of the certificate 48 /** @brief get a short description of the certificate
86 QDateTime validFrom() const {return mValidFrom;} 92 QDateTime validFrom() const {return mValidFrom;}
87 93
88 /** @brief get the date the certificate expires */ 94 /** @brief get the date the certificate expires */
89 QDateTime validTo() const {return mValidTo;} 95 QDateTime validTo() const {return mValidTo;}
90 96
97 /** @brief construct certificate objects from a file
98 *
99 * Constructs a new Certificate Object from a file containing either
100 * one DER encoded certificate or one or many PEM certificates.
101 * If no certificate could be parsed from that file an empty list is
102 * returned.
103 *
104 * The size restrictions for the certificate list file also apply
105 * for this file.
106 **/
107 static QList<Certificate> fromFileName (const QString& file_name);
108
91 private: 109 private:
92 /** @brief Helper function to parse the details of a certificate **/ 110 /** @brief Helper function to parse the details of a certificate **/
93 void parseDetails(const QByteArray& cert); 111 void parseDetails(const QByteArray& cert);
94 112
95 bool mValid; 113 bool mValid;

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