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
fd1fc494
Commit
fd1fc494
authored
May 28, 2019
by
David Venhoek
Committed by
Sietse Ringers
Aug 23, 2019
Browse files
Changed private key code to run on every update that changes files.
parent
6d25eaad
Changes
3
Hide whitespace changes
Inline
Side-by-side
descriptions.go
View file @
fd1fc494
...
...
@@ -18,6 +18,7 @@ type SchemeManager struct {
Name
TranslatedString
`xml:"Name"`
URL
string
`xml:"Url"`
Contact
string
`xml:"contact"`
Demo
bool
`xml:"Demo"`
// Decides whether to download private keys
Description
TranslatedString
MinimumAppVersion
SchemeAppVersion
KeyshareServer
string
...
...
irmaconfig.go
View file @
fd1fc494
...
...
@@ -1261,6 +1261,14 @@ func (conf *Configuration) UpdateSchemeManager(id SchemeManagerIdentifier, downl
}
manager
.
index
=
newIndex
if
manager
.
Demo
{
// Download private keys if needed.
// These are unsigned so partial download isn't really an option.
if
err
:=
conf
.
downloadPrivateKeys
(
manager
);
err
!=
nil
{
return
err
}
}
return
}
...
...
schemes.go
View file @
fd1fc494
...
...
@@ -9,14 +9,12 @@ import (
// including its (pinned) public key.
type
SchemeManagerPointer
struct
{
Url
string
// URL to download scheme from
Demo
bool
// Whether or not this is a demo scheme; if true, private keys are also downloaded
Publickey
[]
byte
// Public key of scheme against which to verify files after they have been downloaded
}
var
DefaultSchemeManagers
=
[
2
]
SchemeManagerPointer
{
{
Url
:
"https://privacybydesign.foundation/schememanager/irma-demo"
,
Demo
:
true
,
Url
:
"https://privacybydesign.foundation/schememanager/irma-demo"
,
Publickey
:
[]
byte
(
`-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEHVnmAY+kGkFZn7XXozdI4HY8GOjm
54ngh4chTfn6WsTCf2w5rprfIqML61z2VTE4k8yJ0Z1QbyW6cdaao8obTQ==
...
...
@@ -42,11 +40,6 @@ func (conf *Configuration) DownloadDefaultSchemes() error {
if
err
:=
conf
.
InstallSchemeManager
(
scheme
,
s
.
Publickey
);
err
!=
nil
{
return
err
}
if
s
.
Demo
{
if
err
:=
conf
.
downloadPrivateKeys
(
scheme
);
err
!=
nil
{
return
err
}
}
}
Logger
.
Info
(
"Finished downloading schemes"
)
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