1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Switch json/payload order

This commit is contained in:
Guillaume J. Charmes 2013-07-22 16:16:31 -07:00
parent 0f134b4bf8
commit 394941b6b0
2 changed files with 5 additions and 5 deletions

View file

@ -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")

View file

@ -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