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
00e21d4f
Commit
00e21d4f
authored
Oct 02, 2017
by
Sietse Ringers
Browse files
Make lint happy
parent
4b7f1137
Changes
4
Hide whitespace changes
Inline
Side-by-side
manager.go
View file @
00e21d4f
...
...
@@ -349,7 +349,8 @@ func (cm *CredentialManager) IssuanceProofBuilders(request *IssuanceRequest) (ga
proofBuilders
:=
gabi
.
ProofBuilderList
([]
gabi
.
ProofBuilder
{})
for
_
,
futurecred
:=
range
request
.
Credentials
{
pk
,
err
:=
cm
.
ConfigurationStore
.
PublicKey
(
futurecred
.
Credential
.
IssuerIdentifier
(),
futurecred
.
KeyCounter
)
var
pk
*
gabi
.
PublicKey
pk
,
err
=
cm
.
ConfigurationStore
.
PublicKey
(
futurecred
.
Credential
.
IssuerIdentifier
(),
futurecred
.
KeyCounter
)
if
err
!=
nil
{
return
nil
,
err
}
...
...
session.go
View file @
00e21d4f
...
...
@@ -262,7 +262,7 @@ func (session *session) sendResponse(message interface{}) {
session
.
fail
(
&
SessionError
{
ErrorCode
:
ErrorRejected
,
Info
:
string
(
response
)})
return
}
log
,
err
=
session
.
createLogEntry
(
message
.
(
gabi
.
ProofList
))
// TODO err
log
,
_
=
session
.
createLogEntry
(
message
.
(
gabi
.
ProofList
))
// TODO err
case
ActionIssuing
:
response
:=
[]
*
gabi
.
IssueSignatureMessage
{}
if
err
=
session
.
transport
.
Post
(
"commitments"
,
&
response
,
message
);
err
!=
nil
{
...
...
@@ -273,7 +273,7 @@ func (session *session) sendResponse(message interface{}) {
session
.
fail
(
&
SessionError
{
ErrorCode
:
ErrorCrypto
,
Err
:
err
})
return
}
log
,
err
=
session
.
createLogEntry
(
message
)
// TODO err
log
,
_
=
session
.
createLogEntry
(
message
)
// TODO err
}
session
.
credManager
.
addLogEntry
(
log
,
true
)
// TODO err
...
...
session_test.go
View file @
00e21d4f
/// +build integration
package
irmago
// TODO +build integration
import
(
"crypto/rand"
"encoding/base64"
...
...
storage.go
View file @
00e21d4f
...
...
@@ -100,6 +100,9 @@ func NewCredentialManager(
}
exists
,
err
:=
PathExists
(
cm
.
irmaConfigurationPath
)
if
err
!=
nil
{
return
nil
,
err
}
if
!
exists
{
return
nil
,
errors
.
New
(
"irmaConfigurationPath does not exist"
)
}
...
...
@@ -154,6 +157,7 @@ func NewCredentialManager(
// in the file at updatesFile.
func
(
cm
*
CredentialManager
)
update
()
error
{
// Load and parse file containing info about already performed updates
var
err
error
exists
,
err
:=
PathExists
(
cm
.
path
(
updatesFile
))
if
err
!=
nil
{
return
err
...
...
@@ -161,7 +165,8 @@ func (cm *CredentialManager) update() error {
if
!
exists
{
cm
.
updates
=
[]
update
{}
}
else
{
bytes
,
err
:=
ioutil
.
ReadFile
(
cm
.
path
(
updatesFile
))
var
bytes
[]
byte
bytes
,
err
=
ioutil
.
ReadFile
(
cm
.
path
(
updatesFile
))
if
err
!=
nil
{
return
err
}
...
...
@@ -266,8 +271,7 @@ func (cm *CredentialManager) storeAttributes() error {
}
if
attrbytes
,
err
:=
json
.
Marshal
(
temp
);
err
==
nil
{
err
=
saveFile
(
cm
.
path
(
attributesFile
),
attrbytes
)
return
nil
return
saveFile
(
cm
.
path
(
attributesFile
),
attrbytes
)
}
else
{
return
err
}
...
...
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