easyssl 0.50.142aaef
EasySSL is base back end library for your c++ Qt projects.
easysslutils.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#include <openssl/types.h>
9
10#include <QByteArray>
11namespace EasySSL {
12
17
18public:
19
23 static void printlastOpenSSlError();
24
30 static QByteArray bignumToArray(const BIGNUM* num);
31
38 [[nodiscard("The result pointer will not be free automatically. Please free the returned pointer after using.")]]
39 static BIGNUM* bignumFromArray(const QByteArray& array);
40
46 static QByteArray bioToByteArray(BIO *bio);
47
54 [[nodiscard("This pointer will not free automatically. Please free returned pointer after using.")]]
55 static BIO *byteArrayToBio(const QByteArray &byteArray);
56
62 static QByteArray extractPublcKey(EVP_PKEY* ssl_keys);
63
69 static QByteArray extractPrivateKey(EVP_PKEY* ssl_keys);
70
71};
72
73
74
75};
The EasySSLUtils class These are basic utils for work with the opwnssl library.
static BIO * byteArrayToBio(const QByteArray &byteArray)
byteArrayToBio This method creates the BIO struct from the Qt QByteArray object.
static QByteArray bignumToArray(const BIGNUM *num)
bignumToArray This method converts openssl BIGNUM into byteArray
static void printlastOpenSSlError()
printlastOpenSSlError This method prints the latest ssl error message.
static QByteArray extractPublcKey(EVP_PKEY *ssl_keys)
extractPublcKey This method extracts the public key from the ssl (pem) structure.
static BIGNUM * bignumFromArray(const QByteArray &array)
bignumFromArray This method converts the Qt bytes array into the opensll big num.
static QByteArray bioToByteArray(BIO *bio)
bioToByteArray This method converts the openssl BIO to the QByteArry
static QByteArray extractPrivateKey(EVP_PKEY *ssl_keys)
extractPrivateKey This method extracts the private key from the ssl (pem) structure.