Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irmago
Commits
31d3413e
Commit
31d3413e
authored
Oct 27, 2017
by
Sietse Ringers
Browse files
Check schema version of xml files in irma_configuration
parent
0ced297e
Changes
1
Hide whitespace changes
Inline
Side-by-side
irmaconfig.go
View file @
31d3413e
...
...
@@ -68,11 +68,14 @@ func (conf *Configuration) ParseFolder() error {
if
err
!=
nil
{
return
err
}
if
exists
{
conf
.
SchemeManagers
[
manager
.
Identifier
()]
=
manager
return
conf
.
parseIssuerFolders
(
dir
)
if
!
exists
{
return
nil
}
return
nil
if
manager
.
XMLVersion
<
7
{
return
errors
.
New
(
"Unsupported scheme manager description"
)
}
conf
.
SchemeManagers
[
manager
.
Identifier
()]
=
manager
return
conf
.
parseIssuerFolders
(
dir
)
})
if
err
!=
nil
{
return
err
...
...
@@ -116,13 +119,14 @@ func (conf *Configuration) parseIssuerFolders(path string) error {
if
err
!=
nil
{
return
err
}
if
exists
{
conf
.
Issuers
[
issuer
.
Identifier
()]
=
issuer
if
err
=
conf
.
parseCredentialsFolder
(
dir
+
"/Issues/"
);
err
!=
nil
{
return
err
}
if
!
exists
{
return
nil
}
return
nil
if
issuer
.
XMLVersion
<
4
{
return
errors
.
New
(
"Unsupported issuer description"
)
}
conf
.
Issuers
[
issuer
.
Identifier
()]
=
issuer
return
conf
.
parseCredentialsFolder
(
dir
+
"/Issues/"
)
})
}
...
...
@@ -160,11 +164,15 @@ func (conf *Configuration) parseCredentialsFolder(path string) error {
if
err
!=
nil
{
return
err
}
if
exists
{
credid
:=
cred
.
Identifier
()
conf
.
CredentialTypes
[
credid
]
=
cred
conf
.
addReverseHash
(
credid
)
if
!
exists
{
return
nil
}
if
cred
.
XMLVersion
<
4
{
return
errors
.
New
(
"Unsupported credential type description"
)
}
credid
:=
cred
.
Identifier
()
conf
.
CredentialTypes
[
credid
]
=
cred
conf
.
addReverseHash
(
credid
)
return
nil
})
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment