зеркало из https://github.com/microsoft/docker.git
Switch json/payload order
This commit is contained in:
Родитель
0f134b4bf8
Коммит
394941b6b0
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче