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
cedac54e
Commit
cedac54e
authored
May 07, 2019
by
Sietse Ringers
Browse files
fix: don't try to load non-key files from privkeys path in irma server
Fixes #43
parent
469f015c
Changes
1
Hide whitespace changes
Inline
Side-by-side
internal/servercore/api.go
View file @
cedac54e
...
...
@@ -111,6 +111,10 @@ func (s *Server) verifyConfiguration(configuration *server.Configuration) error
}
for
_
,
file
:=
range
files
{
filename
:=
file
.
Name
()
if
filepath
.
Ext
(
filename
)
!=
".xml"
&&
strings
.
Count
(
filename
,
"."
)
!=
3
{
s
.
conf
.
Logger
.
Infof
(
"Skipping non-private key file %s encountered in private keys path"
,
filename
)
continue
}
issid
:=
irma
.
NewIssuerIdentifier
(
strings
.
TrimSuffix
(
filename
,
filepath
.
Ext
(
filename
)))
// strip .xml
if
_
,
ok
:=
s
.
conf
.
IrmaConfiguration
.
Issuers
[
issid
];
!
ok
{
return
server
.
LogError
(
errors
.
Errorf
(
"Private key %s belongs to an unknown issuer"
,
filename
))
...
...
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