44 #include <QtNetwork/private/qsslsocket_p.h>
46 #include <QtCore/qscopeguard.h>
47 #include <QtCore/qbytearray.h>
48 #include <QtCore/qiodevice.h>
49 #include <QtCore/qdebug.h>
51 #include <openssl/bn.h>
52 #include <openssl/dh.h>
56 #ifndef OPENSSL_NO_DEPRECATED_3_0
87 const BIGNUM *
p =
nullptr;
88 const BIGNUM *
q =
nullptr;
89 const BIGNUM *
g =
nullptr;
94 if (residue == 11 || residue == 23)
95 status &= ~DH_NOT_SUITABLE_GENERATOR;
98 bad |= DH_CHECK_P_NOT_PRIME;
99 bad |= DH_CHECK_P_NOT_SAFE_PRIME;
100 bad |= DH_NOT_SUITABLE_GENERATOR;
102 return !(status & bad);
111 #ifndef OPENSSL_NO_DEPRECATED_3_0
117 const unsigned char *
data =
reinterpret_cast<const unsigned char *
>(der.
data());
138 qCWarning(lcTlsBackend,
"Diffie-Hellman parameters are not supported, because OpenSSL v3 was built with deprecated API removed");
145 #ifndef OPENSSL_NO_DEPRECATED_3_0
189 qCWarning(lcTlsBackend,
"Diffie-Hellman parameters are not supported, because OpenSSL v3 was built with deprecated API removed");
The QByteArray class provides an array of bytes.
qsizetype size() const noexcept
bool isEmpty() const noexcept
static void ensureInitialized()
typedef QByteArray(EGLAPIENTRYP PFNQGSGETDISPLAYSPROC)()
#define qCWarning(category,...)
GLenum GLuint GLenum GLsizei const GLchar * buf
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLdouble GLdouble GLdouble GLdouble q
QScopeGuard< typename std::decay< F >::type > qScopeGuard(F &&f)
[qScopeGuard]
int q_DH_check(DH *dh, int *codes)
BN_ULONG q_BN_mod_word(const BIGNUM *a, BN_ULONG w)
int q_i2d_DHparams(DH *a, unsigned char **p)
int q_BN_is_word(BIGNUM *a, BN_ULONG w)
DH * q_PEM_read_bio_DHparams(BIO *a, DH **b, pem_password_cb *c, void *d)
DH * q_d2i_DHparams(DH **a, const unsigned char **pp, long length)
void q_DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g)
BIO * q_BIO_new_mem_buf(void *a, int b)