qt6/qtbase: simplify and reduce the diff for LibreSSL

We don't care about unsupported versions and we don't care about
OPENSSL_NO_DEPRECATED_3_0 either.

discussed with rsadowski
This commit is contained in:
tb 2024-02-08 16:34:07 +00:00
parent 852afbf6f3
commit 47a99769dc
6 changed files with 32 additions and 165 deletions

View File

@ -13,6 +13,8 @@ PKGNAME-psql = qt6-postgresql-${VERSION}
PKG_ARCH-global = *
REVISION-main = 0
DPB_PROPERTIES = parallel
SHARED_LIBS += Qt6Concurrent 0.1 # 6.6

View File

@ -1,15 +1,21 @@
disable EVP_PKEY_param_check
use old sk_num, ..., sk_value
use old signature of CRYPTO_free
disable SSL_CONF_CTX
... and resolve accordingly
Index: src/plugins/tls/openssl/qsslsocket_openssl_symbols.cpp
--- src/plugins/tls/openssl/qsslsocket_openssl_symbols.cpp.orig
+++ src/plugins/tls/openssl/qsslsocket_openssl_symbols.cpp
@@ -112,23 +112,36 @@ DEFINEFUNC(const BIO_METHOD *, BIO_s_mem, void, DUMMYA
DEFINEFUNC2(int, BN_is_word, BIGNUM *a, a, BN_ULONG w, w, return 0, return)
@@ -113,14 +113,25 @@ DEFINEFUNC2(int, BN_is_word, BIGNUM *a, a, BN_ULONG w,
DEFINEFUNC(int, EVP_CIPHER_CTX_reset, EVP_CIPHER_CTX *c, c, return 0, return)
DEFINEFUNC(int, EVP_PKEY_up_ref, EVP_PKEY *a, a, return 0, return)
+#ifdef OPENSSL_NO_DEPRECATED_3_0
DEFINEFUNC2(EVP_PKEY_CTX *, EVP_PKEY_CTX_new, EVP_PKEY *pkey, pkey, ENGINE *e, e, return nullptr, return)
+#ifndef LIBRESSL_VERSION_NUMBER
DEFINEFUNC(int, EVP_PKEY_param_check, EVP_PKEY_CTX *ctx, ctx, return 0, return)
+#endif
DEFINEFUNC(void, EVP_PKEY_CTX_free, EVP_PKEY_CTX *ctx, ctx, return, return)
+#endif // OPENSSL_NO_DEPRECATED_3_0
+#ifndef LIBRESSL_VERSION_NUMBER
DEFINEFUNC(int, OPENSSL_sk_num, OPENSSL_STACK *a, a, return -1, return)
DEFINEFUNC2(void, OPENSSL_sk_pop_free, OPENSSL_STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
@ -28,17 +34,7 @@ Index: src/plugins/tls/openssl/qsslsocket_openssl_symbols.cpp
DEFINEFUNC(int, SSL_session_reused, SSL *a, a, return 0, return)
DEFINEFUNC2(qssloptions, SSL_CTX_set_options, SSL_CTX *ctx, ctx, qssloptions op, op, return 0, return)
using info_callback = void (*) (const SSL *ssl, int type, int val);
DEFINEFUNC2(void, SSL_set_info_callback, SSL *ssl, ssl, info_callback cb, cb, return, return)
DEFINEFUNC(const char *, SSL_alert_type_string, int value, value, return nullptr, return)
DEFINEFUNC(const char *, SSL_alert_desc_string_long, int value, value, return nullptr, return)
+#ifndef LIBRESSL_VERSION_NUMBER
DEFINEFUNC(int, SSL_CTX_get_security_level, const SSL_CTX *ctx, ctx, return -1, return)
DEFINEFUNC2(void, SSL_CTX_set_security_level, SSL_CTX *ctx, ctx, int level, level, return, return)
+#endif // LIBRESSL_VERSION_NUMBER
#ifdef TLS1_3_VERSION
DEFINEFUNC2(int, SSL_CTX_set_ciphersuites, SSL_CTX *ctx, ctx, const char *str, str, return 0, return)
DEFINEFUNC2(void, SSL_set_psk_use_session_callback, SSL *ssl, ssl, q_SSL_psk_use_session_cb_func_t callback, callback, return, DUMMYARG)
@@ -154,7 +167,11 @@ DEFINEFUNC2(void, X509_STORE_set_verify_cb, X509_STORE
@@ -154,7 +165,11 @@ DEFINEFUNC2(void, X509_STORE_set_verify_cb, X509_STORE
DEFINEFUNC3(int, X509_STORE_set_ex_data, X509_STORE *a, a, int idx, idx, void *data, data, return 0, return)
DEFINEFUNC2(void *, X509_STORE_get_ex_data, X509_STORE *r, r, int idx, idx, return nullptr, return)
DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get0_chain, X509_STORE_CTX *a, a, return nullptr, return)
@ -50,27 +46,7 @@ Index: src/plugins/tls/openssl/qsslsocket_openssl_symbols.cpp
DEFINEFUNC3(int, CRYPTO_memcmp, const void * in_a, in_a, const void * in_b, in_b, size_t len, len, return 1, return);
DEFINEFUNC(long, OpenSSL_version_num, void, DUMMYARG, return 0, return)
DEFINEFUNC(const char *, OpenSSL_version, int a, a, return nullptr, return)
@@ -193,7 +210,9 @@ DEFINEFUNC5(int, OCSP_id_get0_info, ASN1_OCTET_STRING
ASN1_OCTET_STRING **piKeyHash, piKeyHash, ASN1_INTEGER **pserial, pserial, OCSP_CERTID *cid, cid,
return 0, return)
DEFINEFUNC2(OCSP_RESPONSE *, OCSP_response_create, int status, status, OCSP_BASICRESP *bs, bs, return nullptr, return)
+#if !defined(LIBRESSL_VERSION_NUMBER) || (LIBRESSL_VERSION_NUMBER >= 0x3050000fL)
DEFINEFUNC(const STACK_OF(X509) *, OCSP_resp_get0_certs, const OCSP_BASICRESP *bs, bs, return nullptr, return)
+#endif
DEFINEFUNC2(int, OCSP_id_cmp, OCSP_CERTID *a, a, OCSP_CERTID *b, b, return -1, return)
DEFINEFUNC7(OCSP_SINGLERESP *, OCSP_basic_add1_status, OCSP_BASICRESP *r, r, OCSP_CERTID *c, c, int s, s,
int re, re, ASN1_TIME *rt, rt, ASN1_TIME *t, t, ASN1_TIME *n, n, return nullptr, return)
@@ -214,7 +233,9 @@ DEFINEFUNC(long, ASN1_INTEGER_get, ASN1_INTEGER *a, a,
DEFINEFUNC2(int, ASN1_INTEGER_cmp, const ASN1_INTEGER *a, a, const ASN1_INTEGER *b, b, return 1, return)
DEFINEFUNC(int, ASN1_STRING_length, ASN1_STRING *a, a, return 0, return)
DEFINEFUNC2(int, ASN1_STRING_to_UTF8, unsigned char **a, a, ASN1_STRING *b, b, return 0, return)
+#if !defined(LIBRESSL_VERSION_NUMBER) || (LIBRESSL_VERSION_NUMBER >= 0x3060000fL)
DEFINEFUNC2(int, ASN1_TIME_to_tm, const ASN1_TIME *s, s, struct tm *tm, tm, return 0, return)
+#endif
DEFINEFUNC4(long, BIO_ctrl, BIO *a, a, int b, b, long c, c, void *d, d, return -1, return)
DEFINEFUNC(int, BIO_free, BIO *a, a, return 0, return)
DEFINEFUNC2(BIO *, BIO_new_mem_buf, void *a, a, int b, b, return nullptr, return)
@@ -289,12 +310,14 @@ DEFINEFUNC3(int, SSL_CTX_use_certificate_file, SSL_CTX
@@ -289,12 +304,14 @@ DEFINEFUNC3(int, SSL_CTX_use_certificate_file, SSL_CTX
DEFINEFUNC2(int, SSL_CTX_use_PrivateKey, SSL_CTX *a, a, EVP_PKEY *b, b, return -1, return)
DEFINEFUNC3(int, SSL_CTX_use_PrivateKey_file, SSL_CTX *a, a, const char *b, b, int c, c, return -1, return)
DEFINEFUNC(X509_STORE *, SSL_CTX_get_cert_store, const SSL_CTX *a, a, return nullptr, return)
@ -85,15 +61,14 @@ Index: src/plugins/tls/openssl/qsslsocket_openssl_symbols.cpp
DEFINEFUNC(void, SSL_free, SSL *a, a, return, DUMMYARG)
DEFINEFUNC(STACK_OF(SSL_CIPHER) *, SSL_get_ciphers, const SSL *a, a, return nullptr, return)
DEFINEFUNC(const SSL_CIPHER *, SSL_get_current_cipher, SSL *a, a, return nullptr, return)
@@ -865,15 +888,26 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(EVP_CIPHER_CTX_reset)
@@ -866,14 +883,25 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(AUTHORITY_INFO_ACCESS_free)
RESOLVEFUNC(EVP_PKEY_up_ref)
+#ifdef OPENSSL_NO_DEPRECATED_3_0
RESOLVEFUNC(EVP_PKEY_CTX_new)
+#ifndef LIBRESSL_VERSION_NUMBER
RESOLVEFUNC(EVP_PKEY_param_check)
+#endif
RESOLVEFUNC(EVP_PKEY_CTX_free)
+#endif // OPENSSL_NO_DEPRECATED_3_0
+#ifndef LIBRESSL_VERSION_NUMBER
RESOLVEFUNC(OPENSSL_sk_new_null)
RESOLVEFUNC(OPENSSL_sk_push)
@ -112,17 +87,7 @@ Index: src/plugins/tls/openssl/qsslsocket_openssl_symbols.cpp
RESOLVEFUNC(SSL_CTX_set_options)
RESOLVEFUNC(SSL_set_info_callback)
RESOLVEFUNC(SSL_alert_type_string)
@@ -961,7 +995,9 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(OCSP_check_validity)
RESOLVEFUNC(OCSP_cert_to_id)
RESOLVEFUNC(OCSP_id_get0_info)
+#if !defined(LIBRESSL_VERSION_NUMBER) || (LIBRESSL_VERSION_NUMBER >= 0x3050000fL)
RESOLVEFUNC(OCSP_resp_get0_certs)
+#endif
RESOLVEFUNC(OCSP_basic_sign)
RESOLVEFUNC(OCSP_response_create)
RESOLVEFUNC(i2d_OCSP_RESPONSE)
@@ -1056,12 +1092,14 @@ bool q_resolveOpenSslSymbols()
@@ -1056,12 +1087,14 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(SSL_CTX_use_PrivateKey)
RESOLVEFUNC(SSL_CTX_use_PrivateKey_file)
RESOLVEFUNC(SSL_CTX_get_cert_store);
@ -137,13 +102,3 @@ Index: src/plugins/tls/openssl/qsslsocket_openssl_symbols.cpp
RESOLVEFUNC(SSL_accept)
RESOLVEFUNC(SSL_clear)
RESOLVEFUNC(SSL_connect)
@@ -1121,7 +1159,9 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(RSA_free)
RESOLVEFUNC(DH_bits)
+#if !defined(LIBRESSL_VERSION_NUMBER) || (LIBRESSL_VERSION_NUMBER >= 0x3050000fL)
RESOLVEFUNC(DSA_bits)
+#endif
RESOLVEFUNC(RSA_bits)
#ifndef OPENSSL_NO_EC

View File

@ -9,23 +9,11 @@ Index: src/plugins/tls/openssl/qsslcontext_openssl.cpp
+#if defined(TLS1_3_VERSION) && !defined(LIBRESSL_VERSION_NUMBER)
extern "C" int q_ssl_sess_set_new_cb(SSL *context, SSL_SESSION *session);
-#endif // TLS1_3_VERSION
+#endif // TLS1_3_VERSION && LIBRESSL_VERSION_NUMBE
+#endif // TLS1_3_VERSION && LIBRESSL_VERSION_NUMBER
static inline QString msgErrorSettingBackendConfig(const QString &why)
{
@@ -370,9 +370,11 @@ QT_WARNING_POP
return;
}
+#ifndef LIBRESSL_VERSION_NUMBER
// A nasty hacked OpenSSL using a level that will make our auto-tests fail:
if (q_SSL_CTX_get_security_level(sslContext->ctx) > 1 && *forceSecurityLevel())
q_SSL_CTX_set_security_level(sslContext->ctx, 1);
+#endif // LIBRESSL_VERSION_NUMBER
const long anyVersion =
#if QT_CONFIG(dtls)
@@ -663,14 +665,14 @@ QT_WARNING_POP
@@ -663,14 +663,14 @@ QT_WARNING_POP
q_SSL_CTX_set_verify(sslContext->ctx, verificationMode, verificationCallback);
}
@ -42,7 +30,7 @@ Index: src/plugins/tls/openssl/qsslcontext_openssl.cpp
#if QT_CONFIG(dtls)
// DTLS cookies:
@@ -758,6 +760,7 @@ void QSslContext::applyBackendConfig(QSslContext *sslC
@@ -758,6 +758,7 @@ void QSslContext::applyBackendConfig(QSslContext *sslC
}
#endif // ocsp
@ -50,7 +38,7 @@ Index: src/plugins/tls/openssl/qsslcontext_openssl.cpp
QSharedPointer<SSL_CONF_CTX> cctx(q_SSL_CONF_CTX_new(), &q_SSL_CONF_CTX_free);
if (cctx) {
q_SSL_CONF_CTX_set_ssl_ctx(cctx.data(), sslContext->ctx);
@@ -804,7 +807,9 @@ void QSslContext::applyBackendConfig(QSslContext *sslC
@@ -804,7 +805,9 @@ void QSslContext::applyBackendConfig(QSslContext *sslC
sslContext->errorStr = msgErrorSettingBackendConfig(QSslSocket::tr("SSL_CONF_finish() failed"));
sslContext->errorCode = QSslError::UnspecifiedError;
}

View File

@ -1,7 +1,7 @@
Index: src/plugins/tls/openssl/qsslsocket_openssl_symbols_p.h
--- src/plugins/tls/openssl/qsslsocket_openssl_symbols_p.h.orig
+++ src/plugins/tls/openssl/qsslsocket_openssl_symbols_p.h
@@ -46,6 +46,13 @@ QT_BEGIN_NAMESPACE
@@ -46,6 +46,12 @@ QT_BEGIN_NAMESPACE
#define DUMMYARG
@ -9,25 +9,20 @@ Index: src/plugins/tls/openssl/qsslsocket_openssl_symbols_p.h
+typedef _STACK STACK;
+typedef STACK OPENSSL_STACK;
+typedef void OPENSSL_INIT_SETTINGS;
+typedef int (*X509_STORE_CTX_verify_cb)(int ok,X509_STORE_CTX *ctx);
+#endif
+
#if !defined QT_LINKED_OPENSSL
// **************** Shared declarations ******************
// ret func(arg)
@@ -203,15 +210,32 @@ const BIO_METHOD *q_BIO_s_mem();
void q_AUTHORITY_INFO_ACCESS_free(AUTHORITY_INFO_ACCESS *a);
int q_EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *c);
@@ -205,6 +211,7 @@ int q_EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *c);
int q_EVP_PKEY_up_ref(EVP_PKEY *a);
+#ifdef OPENSSL_NO_DEPRECATED_3_0
EVP_PKEY_CTX *q_EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
void q_EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
+#endif // OPENSSL_NO_DEPRECATED_3_0
int q_EVP_PKEY_param_check(EVP_PKEY_CTX *ctx);
+#ifndef LIBRESSL_VERSION_NUMBER
int q_EVP_PKEY_param_check(EVP_PKEY_CTX *ctx);
int q_OPENSSL_sk_num(OPENSSL_STACK *a);
void q_OPENSSL_sk_pop_free(OPENSSL_STACK *a, void (*b)(void *));
OPENSSL_STACK *q_OPENSSL_sk_new_null();
@@ -212,6 +219,20 @@ OPENSSL_STACK *q_OPENSSL_sk_new_null();
void q_OPENSSL_sk_push(OPENSSL_STACK *st, void *data);
void q_OPENSSL_sk_free(OPENSSL_STACK *a);
void * q_OPENSSL_sk_value(OPENSSL_STACK *a, int b);
@ -48,7 +43,7 @@ Index: src/plugins/tls/openssl/qsslsocket_openssl_symbols_p.h
int q_SSL_session_reused(SSL *a);
qssloptions q_SSL_CTX_set_options(SSL_CTX *ctx, qssloptions op);
int q_OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
@@ -237,8 +261,13 @@ STACK_OF(X509) *q_X509_STORE_CTX_get0_chain(X509_STORE
@@ -237,8 +258,13 @@ STACK_OF(X509) *q_X509_STORE_CTX_get0_chain(X509_STORE
# define q_SSL_load_error_strings() q_OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS \
| OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL)
@ -62,7 +57,7 @@ Index: src/plugins/tls/openssl/qsslsocket_openssl_symbols_p.h
#define q_OPENSSL_add_all_algorithms_conf() q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \
| OPENSSL_INIT_ADD_ALL_DIGESTS \
@@ -423,12 +452,14 @@ int q_SSL_CTX_use_certificate_file(SSL_CTX *a, const c
@@ -423,12 +449,14 @@ int q_SSL_CTX_use_certificate_file(SSL_CTX *a, const c
int q_SSL_CTX_use_PrivateKey(SSL_CTX *a, EVP_PKEY *b);
int q_SSL_CTX_use_PrivateKey_file(SSL_CTX *a, const char *b, int c);
X509_STORE *q_SSL_CTX_get_cert_store(const SSL_CTX *a);
@ -77,7 +72,7 @@ Index: src/plugins/tls/openssl/qsslsocket_openssl_symbols_p.h
void q_SSL_free(SSL *a);
STACK_OF(SSL_CIPHER) *q_SSL_get_ciphers(const SSL *a);
const SSL_CIPHER *q_SSL_get_current_cipher(SSL *a);
@@ -536,14 +567,26 @@ void q_PKCS12_free(PKCS12 *pkcs12);
@@ -536,14 +564,26 @@ void q_PKCS12_free(PKCS12 *pkcs12);
#define q_BIO_get_mem_data(b, pp) (int)q_BIO_ctrl(b,BIO_CTRL_INFO,0,(char *)pp)
#define q_BIO_pending(b) (int)q_BIO_ctrl(b,BIO_CTRL_PENDING,0,NULL)
#define q_SSL_CTX_set_mode(ctx,op) q_SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,(op),NULL)
@ -104,19 +99,7 @@ Index: src/plugins/tls/openssl/qsslsocket_openssl_symbols_p.h
#define q_sk_SSL_CIPHER_value(st, i) q_SKM_sk_value(SSL_CIPHER, (st), (i))
#define q_SSL_CTX_add_extra_chain_cert(ctx,x509) \
q_SSL_CTX_ctrl(ctx,SSL_CTRL_EXTRA_CHAIN_CERT,0,(char *)x509)
@@ -645,7 +688,11 @@ int q_OCSP_check_validity(ASN1_GENERALIZEDTIME *thisup
int q_OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd, ASN1_OCTET_STRING **pikeyHash,
ASN1_INTEGER **pserial, OCSP_CERTID *cid);
+#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x3050000fL
+#define q_OCSP_resp_get0_certs(bs) ((bs)->certs)
+#else
const STACK_OF(X509) *q_OCSP_resp_get0_certs(const OCSP_BASICRESP *bs);
+#endif
OCSP_CERTID *q_OCSP_cert_to_id(const EVP_MD *dgst, X509 *subject, X509 *issuer);
void q_OCSP_CERTID_free(OCSP_CERTID *cid);
int q_OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b);
@@ -664,8 +711,13 @@ int q_OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b);
@@ -664,8 +704,13 @@ int q_OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b);
void *q_CRYPTO_malloc(size_t num, const char *file, int line);
#define q_OPENSSL_malloc(num) q_CRYPTO_malloc(num, "", 0)
@ -130,15 +113,3 @@ Index: src/plugins/tls/openssl/qsslsocket_openssl_symbols_p.h
int q_CRYPTO_memcmp(const void * in_a, const void * in_b, size_t len);
void q_SSL_set_info_callback(SSL *ssl, void (*cb) (const SSL *ssl, int type, int val));
@@ -729,7 +781,11 @@ int q_EVP_PKEY_set1_DH(EVP_PKEY *a, DH *b);
int q_DH_bits(DH *dh);
int q_RSA_bits(RSA *a);
+#if defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER < 0x3050000fL)
+#define q_DSA_bits(dsa) q_BN_num_bits((dsa)->p)
+#else
int q_DSA_bits(DSA *a);
+#endif
int q_EVP_PKEY_assign(EVP_PKEY *a, int b, void *r);
int q_EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);

View File

@ -1,19 +0,0 @@
Index: src/plugins/tls/openssl/qtls_openssl.cpp
--- src/plugins/tls/openssl/qtls_openssl.cpp.orig
+++ src/plugins/tls/openssl/qtls_openssl.cpp
@@ -1438,13 +1438,13 @@ bool TlsCryptographOpenSSL::initSslContext()
else if (mode == QSslSocket::SslServerMode)
q_SSL_set_psk_server_callback(ssl, &q_ssl_psk_server_callback);
-#if OPENSSL_VERSION_NUMBER >= 0x10101006L
+#if OPENSSL_VERSION_NUMBER >= 0x10101006L && !defined(LIBRESSL_VERSION_NUMBER)
// Set the client callback for TLSv1.3 PSK
if (mode == QSslSocket::SslClientMode
&& QSslSocket::sslLibraryBuildVersionNumber() >= 0x10101006L) {
q_SSL_set_psk_use_session_callback(ssl, &q_ssl_psk_use_session_callback);
}
-#endif // openssl version >= 0x10101006L
+#endif // OPENSSL_VERSION_NUMBER >= 0x10101006L && !defined(LIBRESSL_VERSION_NUMBER)
#endif // OPENSSL_NO_PSK

View File

@ -1,5 +1,3 @@
ASN1_time_parse() will become internal-only. Use q_ASN1_TIME_to_tm() instead.
Index: src/plugins/tls/openssl/qx509_openssl.cpp
--- src/plugins/tls/openssl/qx509_openssl.cpp.orig
+++ src/plugins/tls/openssl/qx509_openssl.cpp
@ -16,35 +14,7 @@ Index: src/plugins/tls/openssl/qx509_openssl.cpp
}
return info;
@@ -75,11 +79,27 @@ QDateTime dateTimeFromASN1(const ASN1_TIME *aTime)
QDateTime result;
tm lTime;
+#if defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER < 0x3060000fL)
+ const char *data;
+ size_t len;
+ int type;
+
+ data = (const char*)ASN1_STRING_get0_data((const ASN1_STRING *)aTime);
+ len = ASN1_STRING_length(aTime);
+ type = ASN1_STRING_type(aTime);
+
+ if (ASN1_time_parse(data, len, &lTime, type) == type) {
+ QDate resDate(lTime.tm_year + 1900, lTime.tm_mon + 1, lTime.tm_mday);
+ QTime resTime(lTime.tm_hour, lTime.tm_min, lTime.tm_sec);
+ result = QDateTime(resDate, resTime, Qt::UTC);
+ }
+#else
if (q_ASN1_TIME_to_tm(aTime, &lTime)) {
QDate resDate(lTime.tm_year + 1900, lTime.tm_mon + 1, lTime.tm_mday);
QTime resTime(lTime.tm_hour, lTime.tm_min, lTime.tm_sec);
result = QDateTime(resDate, resTime, QTimeZone::UTC);
}
+#endif
return result;
}
@@ -190,7 +210,11 @@ QVariant x509UnknownExtensionToValue(X509_EXTENSION *e
@@ -190,7 +194,11 @@ QVariant x509UnknownExtensionToValue(X509_EXTENSION *e
QVariantList list;
bool isMap = false;
@ -56,7 +26,7 @@ Index: src/plugins/tls/openssl/qx509_openssl.cpp
CONF_VALUE *nval = q_SKM_sk_value(CONF_VALUE, val, j);
if (nval->name && nval->value) {
isMap = true;
@@ -286,7 +310,11 @@ QVariant x509ExtensionToValue(X509_EXTENSION *ext)
@@ -286,7 +294,11 @@ QVariant x509ExtensionToValue(X509_EXTENSION *ext)
if (!info)
return {};
QVariantMap result;