Skip to content

Commit

Permalink
Linter-driven cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Kettlewell authored and Richard Kettlewell committed Oct 2, 2018
1 parent 9eefe06 commit d6a96b7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
5 changes: 0 additions & 5 deletions hmac_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ func TestHmac(t *testing.T) {
func testHmac(t *testing.T, keytype int, mech int, length int, xlength int) {
var err error
var key *PKCS11SecretKey
var id []byte
t.Run("Generate", func(t *testing.T) {
if key, err = GenerateSecretKey(256, Ciphers[keytype]); err != nil {
t.Errorf("crypto11.GenerateSecretKey: %v", err)
Expand All @@ -64,10 +63,6 @@ func testHmac(t *testing.T, keytype int, mech int, length int, xlength int) {
t.Errorf("crypto11.GenerateSecretKey: returned nil but no error")
return
}
if id, _, err = key.Identify(); err != nil {
t.Errorf("crypto11.PKCS11SecretKey.Identify: %v", err)
return
}
})
if key == nil {
return
Expand Down
3 changes: 1 addition & 2 deletions symmetric.go
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,8 @@ func (g genericAead) Open(dst, nonce, ciphertext, additionalData []byte) ([]byte
return
}); err != nil {
return nil, err
} else {
dst = append(dst, result...)
}
dst = append(dst, result...)
return dst, nil
}

Expand Down

0 comments on commit d6a96b7

Please sign in to comment.