mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-07 18:50:27 +08:00
增强加密密钥兼容性
This commit is contained in:
@@ -34,7 +34,11 @@ func init() {
|
|||||||
nodeConfig, _ := nodeconfigs.SharedNodeConfig()
|
nodeConfig, _ := nodeconfigs.SharedNodeConfig()
|
||||||
if nodeConfig != nil {
|
if nodeConfig != nil {
|
||||||
defaultNodeEncryptKey = stringutil.Md5(nodeConfig.NodeId + "@" + nodeConfig.Secret)
|
defaultNodeEncryptKey = stringutil.Md5(nodeConfig.NodeId + "@" + nodeConfig.Secret)
|
||||||
defaultClusterEncryptKey = stringutil.Md5(nodeConfig.ClusterSecret)
|
if len(nodeConfig.ClusterSecret) == 0 {
|
||||||
|
defaultClusterEncryptKey = defaultNodeEncryptKey
|
||||||
|
} else {
|
||||||
|
defaultClusterEncryptKey = stringutil.Md5(nodeConfig.ClusterSecret)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user