Commit 451653a8 authored by Tomas's avatar Tomas
Browse files

unenrolledKeyshareServers is actually of type SchemeManagerIdentifier

parent d1aa53ac
......@@ -46,11 +46,11 @@ type CredentialManager struct {
storage storage
// Other state
ConfigurationStore *ConfigurationStore
UnenrolledKeyshareServers []SchemeManagerIdentifier
irmaConfigurationPath string
androidStoragePath string
handler ClientHandler
ConfigurationStore *ConfigurationStore
UnenrolledSchemeManagers []SchemeManagerIdentifier
irmaConfigurationPath string
androidStoragePath string
handler ClientHandler
}
// KeyshareHandler is used for asking the user for his email address and PIN,
......@@ -142,8 +142,8 @@ func NewCredentialManager(
cm.paillierKey(false)
}
cm.UnenrolledKeyshareServers = cm.unenrolledKeyshareServers()
if len(cm.UnenrolledKeyshareServers) > 1 {
cm.UnenrolledSchemeManagers = cm.unenrolledSchemeManagers()
if len(cm.UnenrolledSchemeManagers) > 1 {
return nil, errors.New("Too many keyshare servers")
}
......@@ -592,7 +592,7 @@ func (cm *CredentialManager) paillierKeyWorker(wait bool, ch chan bool) {
}
}
func (cm *CredentialManager) unenrolledKeyshareServers() []SchemeManagerIdentifier {
func (cm *CredentialManager) unenrolledSchemeManagers() []SchemeManagerIdentifier {
list := []SchemeManagerIdentifier{}
for name, manager := range cm.ConfigurationStore.SchemeManagers {
if _, contains := cm.keyshareServers[name]; manager.Distributed() && !contains {
......@@ -614,7 +614,7 @@ func (cm *CredentialManager) KeyshareEnroll(manager SchemeManagerIdentifier, ema
}()
err := cm.keyshareEnrollWorker(manager, email, pin)
cm.UnenrolledKeyshareServers = cm.unenrolledKeyshareServers()
cm.UnenrolledSchemeManagers = cm.unenrolledSchemeManagers()
if err != nil {
cm.handler.EnrollmentError(manager, err)
} else {
......
......@@ -380,7 +380,7 @@ func (session *session) managerSession() {
return
}
if manager.Distributed() {
session.credManager.UnenrolledKeyshareServers = session.credManager.unenrolledKeyshareServers()
session.credManager.UnenrolledSchemeManagers = session.credManager.unenrolledSchemeManagers()
}
session.credManager.handler.UpdateConfigurationStore(
&IrmaIdentifierSet{
......
......@@ -156,7 +156,7 @@ func (cm *CredentialManager) ParseAndroidStorage() (present bool, err error) {
return
}
}
cm.UnenrolledKeyshareServers = cm.unenrolledKeyshareServers()
cm.UnenrolledSchemeManagers = cm.unenrolledSchemeManagers()
if err = cm.storage.StorePaillierKeys(cm.paillierKeyCache); err != nil {
return
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment