easyssl 0.50.142aaef
EasySSL is base back end library for your c++ Qt projects.
icertificate.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021-2025 QuasarApp.
3 * Distributed under the GPLv3 software license, see the accompanying
4 * Everyone is permitted to copy and distribute verbatim copies
5 * of this license document, but changing it is not allowed.
6*/
7
8#ifndef ICERTIFICATE_H
9#define ICERTIFICATE_H
10
11#include <QSslCertificate>
12#include <QSslKey>
13#include "easyssl/icrypto.h"
14#include "global.h"
15#include <QByteArray>
16
17namespace EasySSL {
18
23struct SslSrtData {
24 QString country = "BY";
25 QString organization = "QuasarApp";
26 QString commonName = "";
27 long long endTime = 31536000L; //1 year
28};
29
36 crt = other.crt;
37 key = other.key;
38 };
39 QSslCertificate crt;
40 QSslKey key;
41};
42
48{
49public:
50
51 ICertificate(const QSharedPointer<ICrypto>& generator);
52
58 virtual SelfSignedSertificate create(const SslSrtData& certificateData) const = 0;
59
60protected:
65 const QSharedPointer<ICrypto>& keyGenerator() const;
66
67private:
68 QSharedPointer<ICrypto> _keyGenerator;
69};
70
71}
72#endif // ICERTIFICATE_H
The ICertificate class is base interface for all certificate generators classes.
virtual SelfSignedSertificate create(const SslSrtData &certificateData) const =0
create This method create a self signed certificate.
#define EASYSSL_EXPORT
Definition global.h:18
The SelfSignedSertificate struct contains qt certificate object and private key of them.
SelfSignedSertificate(const SelfSignedSertificate &other)
The SslSrtData struct This structure contains base information to generate self-signed SSL certificat...