Compare commits

...

5 Commits

Author SHA1 Message Date
Jerry (Xinyu Hou)
1e8e48d65b Use corresponding Bonjour libs for different versions of OS 2018-03-20 11:41:38 +00:00
Andrew Nelless
5bd12f2376 v1.9.0-stable 2018-03-19 12:21:20 +00:00
Andrew Nelless
1d3e86dd55 Update OpenSSL to v1.0.2n 2018-03-19 11:27:34 +00:00
Andrew Nelless
4a3a5d5b0f #6251 Attempt to fix Windows event loop hang 2018-03-18 20:50:26 +00:00
Andrew Nelless
a2929a7920 Bump Qt version 2018-02-28 01:14:41 +00:00
50 changed files with 217 additions and 16 deletions

View File

@@ -4,4 +4,4 @@
SYNERGY_VERSION_MAJOR = 1 SYNERGY_VERSION_MAJOR = 1
SYNERGY_VERSION_MINOR = 9 SYNERGY_VERSION_MINOR = 9
SYNERGY_VERSION_PATCH = 0 SYNERGY_VERSION_PATCH = 0
SYNERGY_VERSION_STAGE = snapshot SYNERGY_VERSION_STAGE = stable

View File

@@ -2,7 +2,7 @@
<Include> <Include>
<?define Name="Synergy" ?> <?define Name="Synergy" ?>
<?define Version="@SYNERGY_VERSION@" ?> <?define Version="@SYNERGY_VERSION@" ?>
<?define QtVersion="5.9.3" ?> <!-- TODO: Configure this externally //--> <?define QtVersion="5.9.4" ?> <!-- TODO: Configure this externally //-->
<?define Author="Symless Ltd" ?> <?define Author="Symless Ltd" ?>
<?define BinPath="@CMAKE_RUNTIME_OUTPUT_DIRECTORY@/$(var.Configuration)" ?> <?define BinPath="@CMAKE_RUNTIME_OUTPUT_DIRECTORY@/$(var.Configuration)" ?>
<?define ResPath="@CMAKE_CURRENT_SOURCE_DIR@/res" ?> <?define ResPath="@CMAKE_CURRENT_SOURCE_DIR@/res" ?>

View File

@@ -257,11 +257,13 @@ DH *DH_get_1024_160(void);
DH *DH_get_2048_224(void); DH *DH_get_2048_224(void);
DH *DH_get_2048_256(void); DH *DH_get_2048_256(void);
# ifndef OPENSSL_NO_CMS
/* RFC2631 KDF */ /* RFC2631 KDF */
int DH_KDF_X9_42(unsigned char *out, size_t outlen, int DH_KDF_X9_42(unsigned char *out, size_t outlen,
const unsigned char *Z, size_t Zlen, const unsigned char *Z, size_t Zlen,
ASN1_OBJECT *key_oid, ASN1_OBJECT *key_oid,
const unsigned char *ukm, size_t ukmlen, const EVP_MD *md); const unsigned char *ukm, size_t ukmlen, const EVP_MD *md);
# endif
# define EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx, len) \ # define EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx, len) \
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \

View File

@@ -1363,6 +1363,98 @@ void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth,
const char *type, const char *type,
const char *value)); const char *value));
void EVP_PKEY_meth_get_init(EVP_PKEY_METHOD *pmeth,
int (**pinit) (EVP_PKEY_CTX *ctx));
void EVP_PKEY_meth_get_copy(EVP_PKEY_METHOD *pmeth,
int (**pcopy) (EVP_PKEY_CTX *dst,
EVP_PKEY_CTX *src));
void EVP_PKEY_meth_get_cleanup(EVP_PKEY_METHOD *pmeth,
void (**pcleanup) (EVP_PKEY_CTX *ctx));
void EVP_PKEY_meth_get_paramgen(EVP_PKEY_METHOD *pmeth,
int (**pparamgen_init) (EVP_PKEY_CTX *ctx),
int (**pparamgen) (EVP_PKEY_CTX *ctx,
EVP_PKEY *pkey));
void EVP_PKEY_meth_get_keygen(EVP_PKEY_METHOD *pmeth,
int (**pkeygen_init) (EVP_PKEY_CTX *ctx),
int (**pkeygen) (EVP_PKEY_CTX *ctx,
EVP_PKEY *pkey));
void EVP_PKEY_meth_get_sign(EVP_PKEY_METHOD *pmeth,
int (**psign_init) (EVP_PKEY_CTX *ctx),
int (**psign) (EVP_PKEY_CTX *ctx,
unsigned char *sig, size_t *siglen,
const unsigned char *tbs,
size_t tbslen));
void EVP_PKEY_meth_get_verify(EVP_PKEY_METHOD *pmeth,
int (**pverify_init) (EVP_PKEY_CTX *ctx),
int (**pverify) (EVP_PKEY_CTX *ctx,
const unsigned char *sig,
size_t siglen,
const unsigned char *tbs,
size_t tbslen));
void EVP_PKEY_meth_get_verify_recover(EVP_PKEY_METHOD *pmeth,
int (**pverify_recover_init) (EVP_PKEY_CTX
*ctx),
int (**pverify_recover) (EVP_PKEY_CTX
*ctx,
unsigned char
*sig,
size_t *siglen,
const unsigned
char *tbs,
size_t tbslen));
void EVP_PKEY_meth_get_signctx(EVP_PKEY_METHOD *pmeth,
int (**psignctx_init) (EVP_PKEY_CTX *ctx,
EVP_MD_CTX *mctx),
int (**psignctx) (EVP_PKEY_CTX *ctx,
unsigned char *sig,
size_t *siglen,
EVP_MD_CTX *mctx));
void EVP_PKEY_meth_get_verifyctx(EVP_PKEY_METHOD *pmeth,
int (**pverifyctx_init) (EVP_PKEY_CTX *ctx,
EVP_MD_CTX *mctx),
int (**pverifyctx) (EVP_PKEY_CTX *ctx,
const unsigned char *sig,
int siglen,
EVP_MD_CTX *mctx));
void EVP_PKEY_meth_get_encrypt(EVP_PKEY_METHOD *pmeth,
int (**pencrypt_init) (EVP_PKEY_CTX *ctx),
int (**pencryptfn) (EVP_PKEY_CTX *ctx,
unsigned char *out,
size_t *outlen,
const unsigned char *in,
size_t inlen));
void EVP_PKEY_meth_get_decrypt(EVP_PKEY_METHOD *pmeth,
int (**pdecrypt_init) (EVP_PKEY_CTX *ctx),
int (**pdecrypt) (EVP_PKEY_CTX *ctx,
unsigned char *out,
size_t *outlen,
const unsigned char *in,
size_t inlen));
void EVP_PKEY_meth_get_derive(EVP_PKEY_METHOD *pmeth,
int (**pderive_init) (EVP_PKEY_CTX *ctx),
int (**pderive) (EVP_PKEY_CTX *ctx,
unsigned char *key,
size_t *keylen));
void EVP_PKEY_meth_get_ctrl(EVP_PKEY_METHOD *pmeth,
int (**pctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
void *p2),
int (**pctrl_str) (EVP_PKEY_CTX *ctx,
const char *type,
const char *value));
void EVP_add_alg_module(void); void EVP_add_alg_module(void);
/* BEGIN ERROR CODES */ /* BEGIN ERROR CODES */

View File

@@ -30,11 +30,11 @@ extern "C" {
* (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
* major minor fix final patch/beta) * major minor fix final patch/beta)
*/ */
# define OPENSSL_VERSION_NUMBER 0x100020cfL # define OPENSSL_VERSION_NUMBER 0x100020efL
# ifdef OPENSSL_FIPS # ifdef OPENSSL_FIPS
# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2l-fips 25 May 2017" # define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2n-fips 7 Dec 2017"
# else # else
# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2l 25 May 2017" # define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2n 7 Dec 2017"
# endif # endif
# define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT # define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT

View File

@@ -1727,7 +1727,7 @@ extern "C" {
# define SSL_ST_BEFORE 0x4000 # define SSL_ST_BEFORE 0x4000
# define SSL_ST_OK 0x03 # define SSL_ST_OK 0x03
# define SSL_ST_RENEGOTIATE (0x04|SSL_ST_INIT) # define SSL_ST_RENEGOTIATE (0x04|SSL_ST_INIT)
# define SSL_ST_ERR 0x05 # define SSL_ST_ERR (0x05|SSL_ST_INIT)
# define SSL_CB_LOOP 0x01 # define SSL_CB_LOOP 0x01
# define SSL_CB_EXIT 0x02 # define SSL_CB_EXIT 0x02

View File

@@ -280,6 +280,8 @@
# define OPENSSL_add_all_algorithms_conf OPENSSL_add_all_algo_conf # define OPENSSL_add_all_algorithms_conf OPENSSL_add_all_algo_conf
# undef EVP_PKEY_meth_set_verify_recover # undef EVP_PKEY_meth_set_verify_recover
# define EVP_PKEY_meth_set_verify_recover EVP_PKEY_meth_set_vrfy_recover # define EVP_PKEY_meth_set_verify_recover EVP_PKEY_meth_set_vrfy_recover
# undef EVP_PKEY_meth_get_verify_recover
# define EVP_PKEY_meth_get_verify_recover EVP_PKEY_meth_get_vrfy_recover
/* Hack some long EC names */ /* Hack some long EC names */
# undef EC_GROUP_set_point_conversion_form # undef EC_GROUP_set_point_conversion_form

View File

@@ -317,7 +317,7 @@ int SSL_get_servername_type(const SSL *s);
*/ */
int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen, int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,
const char *label, size_t llen, const char *label, size_t llen,
const unsigned char *p, size_t plen, const unsigned char *context, size_t contextlen,
int use_context); int use_context);
int SSL_get_sigalgs(SSL *s, int idx, int SSL_get_sigalgs(SSL *s, int idx,

View File

@@ -257,11 +257,13 @@ DH *DH_get_1024_160(void);
DH *DH_get_2048_224(void); DH *DH_get_2048_224(void);
DH *DH_get_2048_256(void); DH *DH_get_2048_256(void);
# ifndef OPENSSL_NO_CMS
/* RFC2631 KDF */ /* RFC2631 KDF */
int DH_KDF_X9_42(unsigned char *out, size_t outlen, int DH_KDF_X9_42(unsigned char *out, size_t outlen,
const unsigned char *Z, size_t Zlen, const unsigned char *Z, size_t Zlen,
ASN1_OBJECT *key_oid, ASN1_OBJECT *key_oid,
const unsigned char *ukm, size_t ukmlen, const EVP_MD *md); const unsigned char *ukm, size_t ukmlen, const EVP_MD *md);
# endif
# define EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx, len) \ # define EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx, len) \
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \

View File

@@ -1363,6 +1363,98 @@ void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth,
const char *type, const char *type,
const char *value)); const char *value));
void EVP_PKEY_meth_get_init(EVP_PKEY_METHOD *pmeth,
int (**pinit) (EVP_PKEY_CTX *ctx));
void EVP_PKEY_meth_get_copy(EVP_PKEY_METHOD *pmeth,
int (**pcopy) (EVP_PKEY_CTX *dst,
EVP_PKEY_CTX *src));
void EVP_PKEY_meth_get_cleanup(EVP_PKEY_METHOD *pmeth,
void (**pcleanup) (EVP_PKEY_CTX *ctx));
void EVP_PKEY_meth_get_paramgen(EVP_PKEY_METHOD *pmeth,
int (**pparamgen_init) (EVP_PKEY_CTX *ctx),
int (**pparamgen) (EVP_PKEY_CTX *ctx,
EVP_PKEY *pkey));
void EVP_PKEY_meth_get_keygen(EVP_PKEY_METHOD *pmeth,
int (**pkeygen_init) (EVP_PKEY_CTX *ctx),
int (**pkeygen) (EVP_PKEY_CTX *ctx,
EVP_PKEY *pkey));
void EVP_PKEY_meth_get_sign(EVP_PKEY_METHOD *pmeth,
int (**psign_init) (EVP_PKEY_CTX *ctx),
int (**psign) (EVP_PKEY_CTX *ctx,
unsigned char *sig, size_t *siglen,
const unsigned char *tbs,
size_t tbslen));
void EVP_PKEY_meth_get_verify(EVP_PKEY_METHOD *pmeth,
int (**pverify_init) (EVP_PKEY_CTX *ctx),
int (**pverify) (EVP_PKEY_CTX *ctx,
const unsigned char *sig,
size_t siglen,
const unsigned char *tbs,
size_t tbslen));
void EVP_PKEY_meth_get_verify_recover(EVP_PKEY_METHOD *pmeth,
int (**pverify_recover_init) (EVP_PKEY_CTX
*ctx),
int (**pverify_recover) (EVP_PKEY_CTX
*ctx,
unsigned char
*sig,
size_t *siglen,
const unsigned
char *tbs,
size_t tbslen));
void EVP_PKEY_meth_get_signctx(EVP_PKEY_METHOD *pmeth,
int (**psignctx_init) (EVP_PKEY_CTX *ctx,
EVP_MD_CTX *mctx),
int (**psignctx) (EVP_PKEY_CTX *ctx,
unsigned char *sig,
size_t *siglen,
EVP_MD_CTX *mctx));
void EVP_PKEY_meth_get_verifyctx(EVP_PKEY_METHOD *pmeth,
int (**pverifyctx_init) (EVP_PKEY_CTX *ctx,
EVP_MD_CTX *mctx),
int (**pverifyctx) (EVP_PKEY_CTX *ctx,
const unsigned char *sig,
int siglen,
EVP_MD_CTX *mctx));
void EVP_PKEY_meth_get_encrypt(EVP_PKEY_METHOD *pmeth,
int (**pencrypt_init) (EVP_PKEY_CTX *ctx),
int (**pencryptfn) (EVP_PKEY_CTX *ctx,
unsigned char *out,
size_t *outlen,
const unsigned char *in,
size_t inlen));
void EVP_PKEY_meth_get_decrypt(EVP_PKEY_METHOD *pmeth,
int (**pdecrypt_init) (EVP_PKEY_CTX *ctx),
int (**pdecrypt) (EVP_PKEY_CTX *ctx,
unsigned char *out,
size_t *outlen,
const unsigned char *in,
size_t inlen));
void EVP_PKEY_meth_get_derive(EVP_PKEY_METHOD *pmeth,
int (**pderive_init) (EVP_PKEY_CTX *ctx),
int (**pderive) (EVP_PKEY_CTX *ctx,
unsigned char *key,
size_t *keylen));
void EVP_PKEY_meth_get_ctrl(EVP_PKEY_METHOD *pmeth,
int (**pctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
void *p2),
int (**pctrl_str) (EVP_PKEY_CTX *ctx,
const char *type,
const char *value));
void EVP_add_alg_module(void); void EVP_add_alg_module(void);
/* BEGIN ERROR CODES */ /* BEGIN ERROR CODES */

View File

@@ -30,11 +30,11 @@ extern "C" {
* (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
* major minor fix final patch/beta) * major minor fix final patch/beta)
*/ */
# define OPENSSL_VERSION_NUMBER 0x100020cfL # define OPENSSL_VERSION_NUMBER 0x100020efL
# ifdef OPENSSL_FIPS # ifdef OPENSSL_FIPS
# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2l-fips 25 May 2017" # define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2n-fips 7 Dec 2017"
# else # else
# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2l 25 May 2017" # define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2n 7 Dec 2017"
# endif # endif
# define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT # define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT

View File

@@ -1727,7 +1727,7 @@ extern "C" {
# define SSL_ST_BEFORE 0x4000 # define SSL_ST_BEFORE 0x4000
# define SSL_ST_OK 0x03 # define SSL_ST_OK 0x03
# define SSL_ST_RENEGOTIATE (0x04|SSL_ST_INIT) # define SSL_ST_RENEGOTIATE (0x04|SSL_ST_INIT)
# define SSL_ST_ERR 0x05 # define SSL_ST_ERR (0x05|SSL_ST_INIT)
# define SSL_CB_LOOP 0x01 # define SSL_CB_LOOP 0x01
# define SSL_CB_EXIT 0x02 # define SSL_CB_EXIT 0x02

View File

@@ -280,6 +280,8 @@
# define OPENSSL_add_all_algorithms_conf OPENSSL_add_all_algo_conf # define OPENSSL_add_all_algorithms_conf OPENSSL_add_all_algo_conf
# undef EVP_PKEY_meth_set_verify_recover # undef EVP_PKEY_meth_set_verify_recover
# define EVP_PKEY_meth_set_verify_recover EVP_PKEY_meth_set_vrfy_recover # define EVP_PKEY_meth_set_verify_recover EVP_PKEY_meth_set_vrfy_recover
# undef EVP_PKEY_meth_get_verify_recover
# define EVP_PKEY_meth_get_verify_recover EVP_PKEY_meth_get_vrfy_recover
/* Hack some long EC names */ /* Hack some long EC names */
# undef EC_GROUP_set_point_conversion_form # undef EC_GROUP_set_point_conversion_form

View File

@@ -317,7 +317,7 @@ int SSL_get_servername_type(const SSL *s);
*/ */
int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen, int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,
const char *label, size_t llen, const char *label, size_t llen,
const unsigned char *p, size_t plen, const unsigned char *context, size_t contextlen,
int use_context); int use_context);
int SSL_get_sigalgs(SSL *s, int idx, int SSL_get_sigalgs(SSL *s, int idx,

View File

@@ -25,9 +25,16 @@ target_link_libraries (synergy shared)
if (WIN32) if (WIN32)
include_directories ($ENV{BONJOUR_SDK_HOME}/Include) include_directories ($ENV{BONJOUR_SDK_HOME}/Include)
find_library (DNSSD_LIB dnssd.lib if (CMAKE_SIZEOF_VOID_P EQUAL 8)
find_library (DNSSD_LIB dnssd.lib
HINTS ENV BONJOUR_SDK_HOME HINTS ENV BONJOUR_SDK_HOME
PATH_SUFFIXES "Lib/x64") PATH_SUFFIXES "Lib/x64")
else()
find_library (DNSSD_LIB dnssd.lib
HINTS ENV BONJOUR_SDK_HOME
PATH_SUFFIXES "Lib/Win32")
endif()
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
target_link_libraries (synergy dns_sd) target_link_libraries (synergy dns_sd)
endif() endif()

View File

@@ -62,7 +62,7 @@ MSWindowsEventQueueBuffer::waitForEvent(double timeout)
// MsgWaitForMultipleObjects() will block even if the queue isn't // MsgWaitForMultipleObjects() will block even if the queue isn't
// empty if the messages in the queue were there before the last // empty if the messages in the queue were there before the last
// call to GetMessage()/PeekMessage(). // call to GetMessage()/PeekMessage().
if (HIWORD(GetQueueStatus(QS_ALLINPUT)) != 0) { if (HIWORD(GetQueueStatus(QS_ALLPOSTMESSAGE)) != 0) {
return; return;
} }
@@ -79,12 +79,14 @@ MSWindowsEventQueueBuffer::waitForEvent(double timeout)
// cancellation but that's okay because we're run in the main // cancellation but that's okay because we're run in the main
// thread and we never cancel that thread. // thread and we never cancel that thread.
HANDLE dummy[1]; HANDLE dummy[1];
MsgWaitForMultipleObjects(0, dummy, FALSE, t, QS_ALLINPUT); MsgWaitForMultipleObjects(0, dummy, FALSE, t, QS_ALLPOSTMESSAGE);
} }
IEventQueueBuffer::Type IEventQueueBuffer::Type
MSWindowsEventQueueBuffer::getEvent(Event& event, UInt32& dataID) MSWindowsEventQueueBuffer::getEvent(Event& event, UInt32& dataID)
{ {
// NOTE: QS_ALLINPUT was replaced with QS_ALLPOSTMESSAGE.
//
// peek at messages first. waiting for QS_ALLINPUT will return // peek at messages first. waiting for QS_ALLINPUT will return
// if a message has been sent to our window but GetMessage will // if a message has been sent to our window but GetMessage will
// dispatch that message behind our backs and block. PeekMessage // dispatch that message behind our backs and block. PeekMessage
@@ -128,7 +130,7 @@ MSWindowsEventQueueBuffer::addEvent(UInt32 dataID)
bool bool
MSWindowsEventQueueBuffer::isEmpty() const MSWindowsEventQueueBuffer::isEmpty() const
{ {
return (HIWORD(GetQueueStatus(QS_ALLINPUT)) == 0); return (HIWORD(GetQueueStatus(QS_ALLPOSTMESSAGE)) == 0);
} }
EventQueueTimer* EventQueueTimer*