@@ -1,9 +1,10 @@ #! /usr/bin/env tclsh package require http 2.7 package require sqlite3 +package require sha1 namespace eval ::appfs { variable cachedir "/tmp/appfs-cache" variable ttl 3600 variable nttl 60 @@ -45,13 +46,13 @@ } close $fd if {$keyIsHash} { + set hash "__UNABLE_TO_COMPUTE_HASH__" catch { - set hash [string tolower [exec openssl sha1 $tmpfile]] - regsub {.*= *} $hash {} hash + set hash [string tolower [sha1::sha1 -hex -file $tmpfile]] } } else { set hash $key }