Commit d03f7f3c authored by Sietse Ringers's avatar Sietse Ringers
Browse files

Check if we have all scheme mangers on new session

parent c0a1415d
......@@ -103,6 +103,8 @@ const (
ErrorUnknownCredentialType = ErrorType("unknownCredentialType")
// Error during downloading of credential type, issuer, or public keys
ErrorConfigurationStoreDownload = ErrorType("configurationStoreDownload")
// IRMA requests refers to unknown scheme manager
ErrorUnknownSchemeManager = ErrorType("unknownSchemeManager")
)
func (e *SessionError) Error() string {
......
......@@ -187,7 +187,12 @@ func (session *session) start() {
// Check if we are registered to all involved keyshare servers
for id := range session.irmaSession.Identifiers().SchemeManagers {
distributed := session.credManager.ConfigurationStore.SchemeManagers[id].Distributed()
manager, ok := session.credManager.ConfigurationStore.SchemeManagers[id]
if !ok {
session.fail(&SessionError{ErrorType: ErrorUnknownSchemeManager, Info: id.String()})
return
}
distributed := manager.Distributed()
_, registered := session.credManager.keyshareServers[id]
if distributed && !registered {
session.transport.Delete()
......
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