summary refs log tree commit diff stats
path: root/lib/wrappers/openssl.nim
diff options
context:
space:
mode:
authorClyybber <darkmine956@gmail.com>2019-10-08 14:15:47 +0200
committerAndreas Rumpf <rumpf_a@web.de>2019-10-08 14:15:47 +0200
commit00c31e87660d9db813871f5aa23661bf6b9bbdcb (patch)
tree4d8e57bbfae60c0a21acc16934a257f57ee70eee /lib/wrappers/openssl.nim
parentedb24b7ce0882faaaec406f20c70723ac653ca2e (diff)
downloadNim-00c31e87660d9db813871f5aa23661bf6b9bbdcb.tar.gz
Fixes #12187 (#12321)
* Fixes #12187
* Point to fork of compactdict
Since the original repo is now archived / read-only
Diffstat (limited to 'lib/wrappers/openssl.nim')
-rw-r--r--lib/wrappers/openssl.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/wrappers/openssl.nim b/lib/wrappers/openssl.nim
index 482062617..46c9d7bd8 100644
--- a/lib/wrappers/openssl.nim
+++ b/lib/wrappers/openssl.nim
@@ -712,7 +712,7 @@ proc md5_File*(file: string): string {.raises: [IOError,Exception].} =
 
   discard md5_Init(ctx)
   while(let bytes = f.readChars(buf, 0, sz); bytes > 0):
-    discard md5_Update(ctx, buf[0].addr, bytes)
+    discard md5_Update(ctx, buf[0].addr, csize bytes)
 
   discard md5_Final(buf[0].addr, ctx)
   f.close
@@ -731,7 +731,7 @@ proc md5_Str*(str: string): string =
   var i = 0
   while i < str.len:
     let L = min(str.len - i, 512)
-    discard md5_Update(ctx, input[i].addr, L)
+    discard md5_Update(ctx, input[i].addr, csize L)
     i += L
 
   discard md5_Final(addr res, ctx)