blob: 09e948966e11a97fe9f129f489cb54fd66c0be85 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#ifndef CRYPTOIDENTITIY_HPP
#define CRYPTOIDENTITIY_HPP
#include <QObject>
#include <QSslCertificate>
#include <QSslKey>
//! Cryptographic user identitiy consisting
//! of a key-certificate pair and some user information.
struct CryptoIdentity
{
//! The certificate that is used for cryptography
QSslCertificate certificate;
//! The actual private key that is used for cryptography
QSslKey private_key;
//! The title with which the identity is presented to the user.
QString display_name;
//! Notes that the user can have per identity for improved identity management
QString user_notes;
//! True for long-lived identities
bool is_persistent = false;
bool isValid() const {
return (not this->certificate.isNull()) and (not this->private_key.isNull());
}
};
#endif // CRYPTOIDENTITIY_HPP
|