2 Copyright (C) 2017-2023 Ben Kibbey <bjk@luxsci.net>
4 This file is part of qpwmc.
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
26 #include <QTreeWidgetItem>
33 PwmdKey (bool = false, bool = false, bool = false, bool = false,
34 bool = false, bool = false, bool = false, bool = false,
35 bool = false, bool = false, int = 0, int = 0);
38 void setUserIds (QList
<PwmdUserId
*>);
39 QList
<PwmdUserId
*> userIds();
40 void setSubkeys (QList
<PwmdSubKey
*>);
41 QList
<PwmdSubKey
*> subKeys();
43 void setRevoked(bool = true);
45 void setExpired(bool = true);
47 void setDisabled(bool = true);
49 void setInvalid(bool = true);
51 void setCanEncrypt(bool = true);
53 void setCanSign(bool = true);
55 void setCanCertify(bool = true);
57 void setSecret(bool = true);
58 bool canAuthenticate();
59 void setCanAuthenticate(bool = true);
61 void setQualified(bool = true);
63 void setProtocol (int);
64 QString
issuerSerial ();
65 void setIssuerSerial (QString
);
66 QString
issuerName ();
67 void setIssuerName (QString
);
69 void setChainId (QString
);
71 void setOwnerTrust (int);
82 bool _canAuthenticate
;
85 QString _issuerSerial
;
89 QList
<PwmdUserId
*> _userIds
;
90 QList
<PwmdSubKey
*> _subKeys
;
93 class PwmdSubKey
: public PwmdKey
100 void setCardKey(bool = true);
102 void setPubkeyAlgo(int);
104 void setNBits (unsigned);
106 void setKeyId(QString
);
107 QString
fingerprint();
108 void setFingerprint(QString
);
110 void setKeygrip(QString
);
112 void setCreated(long);
114 void setExpires (long);
115 QString
cardNumber();
116 void setCardNumber (QString
);
118 void setCurve(QString
);
125 QString _fingerprint
;
140 void setRevoked (bool = true);
142 void setInvalid (bool = true);
144 void setValidity(int);
146 void setUserId(QString
);
148 void setName (QString
);
150 void setEmail (QString
);
152 void setComment (QString
);
164 class PwmdKeyItemData
167 PwmdKeyItemData (PwmdKey
*, PwmdSubKey
*);
170 PwmdSubKey
*subKey();
171 void setKey (PwmdKey
*);
172 void setSubKey (PwmdSubKey
*);
179 Q_DECLARE_METATYPE (PwmdKeyItemData
*);