]> Cypherpunks.ru repositories - gocheese.git/commitdiff
Warehouse renamed blake2_256 to blake2b_256
authorSergey Matveev <stargrave@stargrave.org>
Sat, 3 Jun 2023 16:03:40 +0000 (19:03 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sat, 3 Jun 2023 17:10:11 +0000 (20:10 +0300)
One should rename all existing checksum files (zsh example):
    for i (**.blake2_256) mv $i $i:r.blake2b_256

doc/storage.texi
refresh.go
upload.go

index 573fe8ac745482e21fbbe27c75f04eab99f1cb7a..d549f512d20804aae20d6311b05d98a6de641867 100644 (file)
@@ -8,17 +8,17 @@ root
   +-- public-package
   |     +- .metadata.rec
   |     +- public-package-0.1.tar.gz.md5
-  |     +- public-package-0.1.tar.gz.blake2_256
-  |     +- public-package-0.1.1.tar.gz.blake2_256
+  |     +- public-package-0.1.tar.gz.blake2b_256
+  |     +- public-package-0.1.1.tar.gz.blake2b_256
   |     +- public-package-0.2.tar.gz
   |     +- public-package-0.2.tar.gz.sha256
-  |     +- public-package-0.2.tar.gz.blake2_256
+  |     +- public-package-0.2.tar.gz.blake2b_256
   +-- private-package
   |     +- .internal
   |     +- .metadata.rec
   |     +- private-package-0.1.tar.gz
   |     +- private-package-0.1.tar.gz.sha256
-  |     +- private-package-0.1.tar.gz.blake2_256
+  |     +- private-package-0.1.tar.gz.blake2b_256
   |...
 @end verbatim
 
@@ -26,7 +26,7 @@ Each directory is a normalized package name. When you try to list non
 existent directory contents (you are downloading package you have not
 seen before), then GoCheese will download information about package's
 versions with checksums and write them in corresponding
-@file{.sha256}, @file{.blake2_256}, @file{.sha512}, @file{.md5} files.
+@file{.sha256}, @file{.blake2b_256}, @file{.sha512}, @file{.md5} files.
 However no package package tarball is downloaded.
 
 If JSON API is enabled, then metadata is also downloaded and stored in
index 78a8ca4b3c4de6cd2bbe647c9d2ae81968ff2f68..e60f7d9a864eb9284bd012987289db1f4856d276 100644 (file)
@@ -43,7 +43,7 @@ import (
 
 const (
        HashAlgoSHA256     = "sha256"
-       HashAlgoBLAKE2b256 = "blake2_256"
+       HashAlgoBLAKE2b256 = "blake2b_256"
        HashAlgoSHA512     = "sha512"
        HashAlgoMD5        = "md5"
        InternalFlag       = ".internal"
index a0068db483d95556268566e1256c4234ab24113c..72c00d37a1a4c987f9458cf05f6acf3b03ba6a7c 100644 (file)
--- a/upload.go
+++ b/upload.go
@@ -164,7 +164,7 @@ func serveUpload(w http.ResponseWriter, r *http.Request) {
                                log.Println(r.RemoteAddr, filename, "good BLAKE2b-256 checksum received")
                        } else {
                                log.Println(r.RemoteAddr, filename, "bad BLAKE2b-256 checksum received")
-                               http.Error(w, "bad blake2_256 checksum", http.StatusBadRequest)
+                               http.Error(w, "bad blake2b_256 checksum", http.StatusBadRequest)
                                os.Remove(dst.Name())
                                return
                        }