summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2015-01-02 18:32:33 +0100
committerChristian Beier <dontmind@freeshell.org>2015-01-02 18:32:33 +0100
commit57c524dfe2c3f0808a6e24cb97cb7f4a0b55c13d (patch)
tree464e08fb9b2e05e73d8ee060508f158af535faba
parent108c26fddebfc56909fd7f8815951133aef30bdf (diff)
parent4674d4632b9ffc6779d9c9f79b8ebb53c12e29b2 (diff)
downloadlibvncserver-57c524dfe2c3f0808a6e24cb97cb7f4a0b55c13d.zip
libvncserver-57c524dfe2c3f0808a6e24cb97cb7f4a0b55c13d.tar.gz
Merge pull request #51 from maxnet/master
Initialize libgcrypt before use
-rw-r--r--libvncclient/rfbproto.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libvncclient/rfbproto.c b/libvncclient/rfbproto.c
index f653850..aa74c23 100644
--- a/libvncclient/rfbproto.c
+++ b/libvncclient/rfbproto.c
@@ -857,6 +857,16 @@ HandleARDAuth(rfbClient *client)
rfbCredential *cred = NULL;
rfbBool result = FALSE;
+ if (!gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P))
+ {
+ /* Application did not initialize gcrypt, so we should */
+ if (!gcry_check_version(GCRYPT_VERSION))
+ {
+ /* Older version of libgcrypt is installed on system than compiled against */
+ rfbClientLog("libgcrypt version mismatch.\n");
+ }
+ }
+
while (1)
{
if (!ReadFromRFBServer(client, (char *)gen, 2))
OpenPOWER on IntegriCloud