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
17
namespace
EasySSL
{
18
23
struct
SslSrtData
{
24
QString
country
=
"BY"
;
25
QString
organization
=
"QuasarApp"
;
26
QString
commonName
=
""
;
27
long
long
endTime
= 31536000L;
//1 year
28
};
29
33
struct
EASYSSL_EXPORT
SelfSignedSertificate
{
34
SelfSignedSertificate
(){}
35
SelfSignedSertificate
(
const
SelfSignedSertificate
& other) {
36
crt = other.
crt
;
37
key = other.
key
;
38
};
39
QSslCertificate
crt
;
40
QSslKey
key
;
41
};
42
47
class
EASYSSL_EXPORT
ICertificate
48
{
49
public
:
50
51
ICertificate
(
const
QSharedPointer<ICrypto>& generator);
52
58
virtual
SelfSignedSertificate
create
(
const
SslSrtData
& certificateData)
const
= 0;
59
60
protected
:
65
const
QSharedPointer<ICrypto>& keyGenerator()
const
;
66
67
private
:
68
QSharedPointer<ICrypto> _keyGenerator;
69
};
70
71
}
72
#endif
// ICERTIFICATE_H
EasySSL::ICertificate
The ICertificate class is base interface for all certificate generators classes.
Definition
icertificate.h:48
EasySSL::ICertificate::create
virtual SelfSignedSertificate create(const SslSrtData &certificateData) const =0
create This method create a self signed certificate.
global.h
EASYSSL_EXPORT
#define EASYSSL_EXPORT
Definition
global.h:18
icrypto.h
EasySSL
Definition
easysslutils.cpp:15
EasySSL::SelfSignedSertificate
The SelfSignedSertificate struct contains qt certificate object and private key of them.
Definition
icertificate.h:33
EasySSL::SelfSignedSertificate::SelfSignedSertificate
SelfSignedSertificate(const SelfSignedSertificate &other)
Definition
icertificate.h:35
EasySSL::SelfSignedSertificate::key
QSslKey key
Definition
icertificate.h:40
EasySSL::SelfSignedSertificate::SelfSignedSertificate
SelfSignedSertificate()
Definition
icertificate.h:34
EasySSL::SelfSignedSertificate::crt
QSslCertificate crt
Definition
icertificate.h:39
EasySSL::SslSrtData
The SslSrtData struct This structure contains base information to generate self-signed SSL certificat...
Definition
icertificate.h:23
EasySSL::SslSrtData::endTime
long long endTime
Definition
icertificate.h:27
EasySSL::SslSrtData::country
QString country
Definition
icertificate.h:24
EasySSL::SslSrtData::organization
QString organization
Definition
icertificate.h:25
EasySSL::SslSrtData::commonName
QString commonName
Definition
icertificate.h:26
src
lib
src
public
easyssl
icertificate.h
Generated by
1.9.8