diff options
| author | Felix (xq) Queißner <git@mq32.de> | 2020-06-10 21:38:05 +0200 |
|---|---|---|
| committer | Felix (xq) Queißner <git@mq32.de> | 2020-06-10 21:38:05 +0200 |
| commit | ab3e5ad5f25862985c17ba557163a1902b54747f (patch) | |
| tree | ab91f5b8a245a6b506a00e9b0533b096d0753ea4 /src/cryptoidentity.hpp | |
| parent | feb37f7d6b8730e94821fc6d70fb742ff393517d (diff) | |
| download | kristall-ab3e5ad5f25862985c17ba557163a1902b54747f.tar.gz | |
Adds install target to makefile, adds support for transient client certificates.
Diffstat (limited to 'src/cryptoidentity.hpp')
| -rw-r--r-- | src/cryptoidentity.hpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/cryptoidentity.hpp b/src/cryptoidentity.hpp new file mode 100644 index 0000000..a5fbb7f --- /dev/null +++ b/src/cryptoidentity.hpp @@ -0,0 +1,24 @@ +#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 +{ + QSslCertificate certificate; + QSslKey private_key; + QString display_name; + + bool is_persistent = false; + + bool isValid() const { + return (not this->certificate.isNull()) and (not this->private_key.isNull()); + } +}; + +#endif // CRYPTOIDENTITIY_HPP |
