mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-04 20:51:44 +00:00
Switch json/payload order
This commit is contained in:
+2
-2
@@ -16,9 +16,9 @@ import (
|
||||
const CONFIGFILE = ".dockercfg"
|
||||
|
||||
// Only used for user auth + account creation
|
||||
//const INDEXSERVER = "https://index.docker.io/v1/"
|
||||
const INDEXSERVER = "https://index.docker.io/v1/"
|
||||
|
||||
const INDEXSERVER = "https://indexstaging-docker.dotcloud.com/v1/"
|
||||
//const INDEXSERVER = "https://indexstaging-docker.dotcloud.com/v1/"
|
||||
|
||||
var (
|
||||
ErrConfigFileMissing = errors.New("The Auth config file is missing")
|
||||
|
||||
+3
-3
@@ -145,13 +145,13 @@ func (ts *TarSum) Read(buf []byte) (int, error) {
|
||||
func (ts *TarSum) Sum(extra []byte) string {
|
||||
sort.Strings(ts.sums)
|
||||
h := sha256.New()
|
||||
if extra != nil {
|
||||
h.Write(extra)
|
||||
}
|
||||
for _, sum := range ts.sums {
|
||||
Debugf("-->%s<--", sum)
|
||||
h.Write([]byte(sum))
|
||||
}
|
||||
if extra != nil {
|
||||
h.Write(extra)
|
||||
}
|
||||
checksum := "tarsum+sha256:" + hex.EncodeToString(h.Sum(nil))
|
||||
Debugf("checksum processed: %s", checksum)
|
||||
return checksum
|
||||
|
||||
Reference in New Issue
Block a user