Commit 4674d463 authored by Floris Bos's avatar Floris Bos

Initialize libgcrypt before use

https://www.gnupg.org/documentation/manuals/gcrypt/Initializing-the-library.html
"Before the library can be used, it must initialize itself.
This is achieved by invoking the function gcry_check_version"

Closes issue #45
Tested with krdc + libgcrypt 1.6.1 (libgcrypt20-dev Ubunutu package)
connecting to a Mac Mini.
Signed-off-by: 's avatarFloris Bos <bos@je-eigen-domein.nl>
parent ac63d743
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment