| ... | ... |
@@ -16,9 +16,9 @@ import ( |
| 16 | 16 |
const CONFIGFILE = ".dockercfg" |
| 17 | 17 |
|
| 18 | 18 |
// Only used for user auth + account creation |
| 19 |
-//const INDEXSERVER = "https://index.docker.io/v1/" |
|
| 19 |
+const INDEXSERVER = "https://index.docker.io/v1/" |
|
| 20 | 20 |
|
| 21 |
-const INDEXSERVER = "https://indexstaging-docker.dotcloud.com/v1/" |
|
| 21 |
+//const INDEXSERVER = "https://indexstaging-docker.dotcloud.com/v1/" |
|
| 22 | 22 |
|
| 23 | 23 |
var ( |
| 24 | 24 |
ErrConfigFileMissing = errors.New("The Auth config file is missing")
|
| ... | ... |
@@ -145,13 +145,13 @@ func (ts *TarSum) Read(buf []byte) (int, error) {
|
| 145 | 145 |
func (ts *TarSum) Sum(extra []byte) string {
|
| 146 | 146 |
sort.Strings(ts.sums) |
| 147 | 147 |
h := sha256.New() |
| 148 |
+ if extra != nil {
|
|
| 149 |
+ h.Write(extra) |
|
| 150 |
+ } |
|
| 148 | 151 |
for _, sum := range ts.sums {
|
| 149 | 152 |
Debugf("-->%s<--", sum)
|
| 150 | 153 |
h.Write([]byte(sum)) |
| 151 | 154 |
} |
| 152 |
- if extra != nil {
|
|
| 153 |
- h.Write(extra) |
|
| 154 |
- } |
|
| 155 | 155 |
checksum := "tarsum+sha256:" + hex.EncodeToString(h.Sum(nil)) |
| 156 | 156 |
Debugf("checksum processed: %s", checksum)
|
| 157 | 157 |
return checksum |