Skip to content
GitLab
Menu
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
2e38ffc5
Commit
2e38ffc5
authored
Sep 16, 2019
by
Sietse Ringers
Browse files
refactor: remove superfluous helper
parent
46b482b0
Changes
2
Hide whitespace changes
Inline
Side-by-side
internal/sessiontest/server_test.go
View file @
2e38ffc5
...
...
@@ -64,11 +64,14 @@ func StartRevocationServer(t *testing.T) {
revocationServer
,
err
=
irmaserver
.
New
(
conf
)
require
.
NoError
(
t
,
err
)
sk
,
err
:=
conf
.
IrmaConfiguration
.
RevocationStorage
.
PrivateKey
(
cred
.
IssuerIdentifier
())
sk
,
err
:=
conf
.
PrivateKey
(
cred
.
IssuerIdentifier
())
require
.
NoError
(
t
,
err
)
require
.
NotNil
(
t
,
sk
)
revsk
,
err
:=
sk
.
RevocationKey
()
require
.
NoError
(
t
,
err
)
db
,
err
:=
conf
.
IrmaConfiguration
.
RevocationStorage
.
DB
(
cred
)
require
.
NoError
(
t
,
err
)
err
=
db
.
EnableRevocation
(
sk
)
err
=
db
.
EnableRevocation
(
rev
sk
)
require
.
NoError
(
t
,
err
)
mux
:=
http
.
NewServeMux
()
...
...
revocation.go
View file @
2e38ffc5
...
...
@@ -314,21 +314,6 @@ func (rs *RevocationStorage) loadDB(credid CredentialTypeIdentifier) (*DB, error
return
db
,
nil
}
func
(
rs
*
RevocationStorage
)
PrivateKey
(
issid
IssuerIdentifier
)
(
*
revocation
.
PrivateKey
,
error
)
{
pk
,
err
:=
rs
.
conf
.
PrivateKey
(
issid
)
if
err
!=
nil
{
return
nil
,
err
}
if
pk
==
nil
{
return
nil
,
errors
.
Errorf
(
"unknown public key: %s"
,
issid
)
}
revpk
,
err
:=
pk
.
RevocationKey
()
if
err
!=
nil
{
return
nil
,
err
}
return
revpk
,
nil
}
func
(
rs
*
RevocationStorage
)
PublicKey
(
issid
IssuerIdentifier
,
counter
uint
)
(
*
revocation
.
PublicKey
,
error
)
{
pk
,
err
:=
rs
.
conf
.
PublicKey
(
issid
,
int
(
counter
))
if
err
!=
nil
{
...
...
@@ -506,14 +491,6 @@ func (rs *RevocationStorage) Close() error {
func
(
rs
*
RevocationStorage
)
keystore
(
issuerid
IssuerIdentifier
)
keystore
{
return
func
(
counter
uint
)
(
*
revocation
.
PublicKey
,
error
)
{
key
,
err
:=
rs
.
conf
.
PublicKey
(
issuerid
,
int
(
counter
))
if
err
!=
nil
{
return
nil
,
err
}
revkey
,
err
:=
key
.
RevocationKey
()
if
err
!=
nil
{
return
nil
,
err
}
return
revkey
,
nil
return
rs
.
PublicKey
(
issuerid
,
counter
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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