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

Add update for deleting faulty test scheme manager

parent 6ae56f89
...@@ -70,6 +70,10 @@ var clientUpdates = []func(client *Client) error{ ...@@ -70,6 +70,10 @@ var clientUpdates = []func(client *Client) error{
} }
return client.storage.StoreKeyshareServers(keyshareServers) return client.storage.StoreKeyshareServers(keyshareServers)
}, },
func(client *Client) (err error) {
return client.Configuration.DeleteSchemeManager(irma.NewSchemeManagerIdentifier("test"))
},
} }
// update performs any function from clientUpdates that has not // update performs any function from clientUpdates that has not
......
...@@ -283,6 +283,12 @@ func (conf *Configuration) parseIssuerFolders(manager *SchemeManager, path strin ...@@ -283,6 +283,12 @@ func (conf *Configuration) parseIssuerFolders(manager *SchemeManager, path strin
}) })
} }
func (conf *Configuration) DeleteSchemeManager(id SchemeManagerIdentifier) error {
delete(conf.SchemeManagers, id)
delete(conf.DisabledSchemeManagers, id)
return os.RemoveAll(filepath.Join(conf.Path, id.Name()))
}
// parse $schememanager/$issuer/PublicKeys/$i.xml for $i = 1, ... // parse $schememanager/$issuer/PublicKeys/$i.xml for $i = 1, ...
func (conf *Configuration) parseKeysFolder(manager *SchemeManager, issuerid IssuerIdentifier) error { func (conf *Configuration) parseKeysFolder(manager *SchemeManager, issuerid IssuerIdentifier) error {
path := fmt.Sprintf("%s/%s/%s/PublicKeys/*.xml", conf.Path, issuerid.SchemeManagerIdentifier().Name(), issuerid.Name()) path := fmt.Sprintf("%s/%s/%s/PublicKeys/*.xml", conf.Path, issuerid.SchemeManagerIdentifier().Name(), issuerid.Name())
......
Supports Markdown
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