diff options
author | Jocelyn Le Sage <jocelyn@le-sage.com> | 2017-02-21 06:36:15 -0500 |
---|---|---|
committer | Jocelyn Le Sage <jocelyn.lesage@hpe.com> | 2017-06-13 06:24:10 -0400 |
commit | e8a1ca20352f14bf3b527bb1f148610fc1fb5247 (patch) | |
tree | 40a87d260b041f2d8f7ed12e5b1bf2f4b9ecc62e /libvncserver/websockets.c | |
parent | ada4b4fc5a27eb733c1eaad9d5bce42930e0f4ed (diff) | |
download | libtdevnc-e8a1ca20352f14bf3b527bb1f148610fc1fb5247.tar.gz libtdevnc-e8a1ca20352f14bf3b527bb1f148610fc1fb5247.zip |
Fixed compilation of websockets on system where there is no implementation of base64 functions.
Diffstat (limited to 'libvncserver/websockets.c')
-rw-r--r-- | libvncserver/websockets.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libvncserver/websockets.c b/libvncserver/websockets.c index b9947c4..4ebff72 100644 --- a/libvncserver/websockets.c +++ b/libvncserver/websockets.c @@ -52,7 +52,7 @@ #include "rfbssl.h" #include "rfbcrypto.h" #include "ws_decode.h" - +#include "base64.h" #if 0 #include <sys/syscall.h> @@ -117,8 +117,8 @@ static void webSocketsGenSha1Key(char *target, int size, char *key) iov[1].iov_base = GUID; iov[1].iov_len = sizeof(GUID) - 1; digestsha1(iov, 2, hash); - if (-1 == b64_ntop(hash, sizeof(hash), target, size)) - rfbErr("b64_ntop failed\n"); + if (-1 == rfbBase64NtoP(hash, sizeof(hash), target, size)) + rfbErr("rfbBase64NtoP failed\n"); } /* @@ -412,7 +412,7 @@ webSocketsEncodeHybi(rfbClientPtr cl, const char *src, int len, char **dst) } if (wsctx->base64) { - if (-1 == (ret = b64_ntop((unsigned char *)src, len, wsctx->codeBufEncode + sz, sizeof(wsctx->codeBufEncode) - sz))) { + if (-1 == (ret = rfbBase64NtoP((unsigned char *)src, len, wsctx->codeBufEncode + sz, sizeof(wsctx->codeBufEncode) - sz))) { rfbErr("%s: Base 64 encode failed\n", __func__); } else { if (ret != blen) |