summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslsocket_openssl_symbols_p.h
diff options
context:
space:
mode:
authorRichard J. Moore <rich@kde.org>2014-04-06 12:38:52 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-09 20:53:06 +0200
commit814a1c7b2b940cdf6b1716406b26063576ac0d95 (patch)
tree844bf3834f6c187d56963c082641729a01229f2e /src/network/ssl/qsslsocket_openssl_symbols_p.h
parent71de8c0df57ddee94da71fab4a613f1df003a18f (diff)
Support for DH and ECDH key exchange for QSslSocket servers
Despite supporting DH and ECDH key exchange as a client, Qt did not provide any default parameters which prevented them being used as a server. A future change should allow the user to control the parameters used, but these defaults should be okay for most users. [ChangeLog][Important Behavior Changes] Support for DH and ECDH key exchange cipher suites when acting as an SSL server has been made possible. This change means the you can now implement servers that offer forward-secrecy using Qt. Task-number: QTBUG-20666 Change-Id: I469163900e4313da9d2d0c3e1e5e47ef46320b17 Reviewed-by: Daniel Molkentin <daniel@molkentin.de> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Diffstat (limited to 'src/network/ssl/qsslsocket_openssl_symbols_p.h')
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols_p.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h
index 500fe9493b..1e68fdd6c2 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols_p.h
+++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h
@@ -427,6 +427,17 @@ int q_X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx);
X509 *q_X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx);
STACK_OF(X509) *q_X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx);
+// Diffie-Hellman support
+DH *q_DH_new();
+void q_DH_free(DH *dh);
+BIGNUM *q_BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
+#define q_SSL_CTX_set_tmp_dh(ctx, dh) q_SSL_CTX_ctrl((ctx), SSL_CTRL_SET_TMP_DH, 0, (char *)dh)
+
+// EC Diffie-Hellman support
+EC_KEY *q_EC_KEY_new_by_curve_name(int nid);
+void q_EC_KEY_free(EC_KEY *ecdh);
+#define q_SSL_CTX_set_tmp_ecdh(ctx, ecdh) q_SSL_CTX_ctrl((ctx), SSL_CTRL_SET_TMP_ECDH, 0, (char *)ecdh)
+
#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)
#ifdef SSLEAY_MACROS