Update client license etag to handle new features (#2716)

Этот коммит содержится в:
Joram Wilander
2016-04-15 08:48:14 -04:00
коммит произвёл Harrison Healey
родитель 9243b8761a
Коммит c6c3f1e478
6 изменённых файлов: 68 добавлений и 15 удалений

Просмотреть файл

@@ -5,11 +5,13 @@ package utils
import (
"crypto"
"crypto/md5"
"crypto/rsa"
"crypto/sha512"
"crypto/x509"
"encoding/base64"
"encoding/pem"
"fmt"
"strconv"
"strings"
@@ -129,3 +131,13 @@ func getClientLicense(l *model.License) map[string]string {
return props
}
func GetClientLicenseEtag() string {
value := ""
for k, v := range ClientLicense {
value += fmt.Sprintf("%s:%s;", k, v)
}
return model.Etag(fmt.Sprintf("%x", md5.Sum([]byte(value))))
}