about summary refs log tree commit diff stats
path: root/adapter/protocol/gemini.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-11-08 20:35:21 +0100
committerbptato <nincsnevem662@gmail.com>2024-11-08 20:35:21 +0100
commitb2f70da50f8934fea199150c35c1763e03f72d6d (patch)
tree0dbbcc4777dbb58e3468a10d8abf83563bed04d9 /adapter/protocol/gemini.nim
parent2ee9bc323c14de75c147c1d2051bdbf0cd6e28cf (diff)
downloadchawan-b2f70da50f8934fea199150c35c1763e03f72d6d.tar.gz
Fix some C warnings, more makefile vars, etc.
* add some more env vars to makefile
* remove fpermissive from GCC builds
* update Monoucha
* fix borked seccomp filter length safety check (ugh)
Diffstat (limited to 'adapter/protocol/gemini.nim')
-rw-r--r--adapter/protocol/gemini.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/adapter/protocol/gemini.nim b/adapter/protocol/gemini.nim
index a030428f..0dcefd08 100644
--- a/adapter/protocol/gemini.nim
+++ b/adapter/protocol/gemini.nim
@@ -104,7 +104,7 @@ proc checkCert(os: PosixStream; theirDigest, host: string;
 proc hashBuf(ibuf: openArray[uint8]): string =
   const HexTable = "0123456789ABCDEF"
   var len2: cuint = 0
-  var buf = newSeq[char](EVP_MAX_MD_SIZE)
+  var buf = newSeq[uint8](EVP_MAX_MD_SIZE)
   let mdctx = EVP_MD_CTX_new()
   if mdctx == nil:
     sdie("failed to initialize MD_CTX")
@@ -120,7 +120,7 @@ proc hashBuf(ibuf: openArray[uint8]): string =
   for i in 0 ..< int(len2):
     if i != 0:
       result &= ':'
-    let u = uint8(buf[i])
+    let u = buf[i]
     result &= HexTable[(u shr 4) and 0xF]
     result &= HexTable[u and 0xF]