Commit 00e21d4f authored by Sietse Ringers's avatar Sietse Ringers
Browse files

Make lint happy

parent 4b7f1137
......@@ -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
}
......
......@@ -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
......
/// +build integration
package irmago
// TODO +build integration
import (
"crypto/rand"
"encoding/base64"
......
......@@ -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
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment