comparison ui/certificate.h @ 1101:2b3526ef2d69

(issue111) Keep manually changed certificates in the manually changed list. This invents the new property "active certificate" an inactive certificate is a certificate that is displayed but has no impact on the store.
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 15 Sep 2014 13:55:47 +0200
parents da00099aef5d
children 9bb9932bb819
comparison
equal deleted inserted replaced
1100:77afafd23a1b 1101:2b3526ef2d69
134 static QList<Certificate> fromFileName (const QString& file_name); 134 static QList<Certificate> fromFileName (const QString& file_name);
135 135
136 friend inline bool operator==(const Certificate& lhs, const Certificate& rhs) { 136 friend inline bool operator==(const Certificate& lhs, const Certificate& rhs) {
137 return lhs.base64Line() == rhs.base64Line(); 137 return lhs.base64Line() == rhs.base64Line();
138 } 138 }
139
140 /** @brief Wether or not the certificate is Active.
141 *
142 * This property is mainly for the manually changed certificate list.
143 * A certificate is active if it should be counted as change in a list
144 * and if it should be written to a certificate store.
145 *
146 * An inctive certificate will only be shown in the manual changes list
147 * but not counted as a changed or changed in the certificate list. */
148 bool isActive() const { return mActive; }
149
150 /** @brief set the active state of a certificate.
151 *
152 * See isActive() for details. */
153 void setActive(bool active) { mActive = active; }
139 private: 154 private:
140 /** @brief Helper function to parse the details of a certificate **/ 155 /** @brief Helper function to parse the details of a certificate **/
141 void parseDetails(const QByteArray& cert); 156 void parseDetails(const QByteArray& cert);
142 157
143 bool mValid; 158 bool mValid;
144 /* bool mInstCert; */ 159 /* bool mInstCert; */
145 bool mEditable; 160 bool mEditable;
161 bool mActive;
146 162
147 QString mSubjectOU, 163 QString mSubjectOU,
148 mSubjectCN, 164 mSubjectCN,
149 mSubjectO, 165 mSubjectO,
150 mSubjectSN, 166 mSubjectSN,

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