mirror of
https://github.com/slackhq/nebula.git
synced 2026-07-01 19:10:29 +02:00
more cleanup
This commit is contained in:
@@ -33,10 +33,13 @@ func TestNewAESGCM(t *testing.T) {
|
||||
assert.Equal(t, expected, dst)
|
||||
|
||||
// We expect this to fail since we are re-encrypting with a repeat IV
|
||||
// TODO: the error message has changed between fips module versions, best way to verify it?
|
||||
// assert.PanicsWithValue(t, "crypto/cipher: counter decreased", func() {
|
||||
// assert.PanicsWithValue(t, "crypto/cipher: counter decreased or remained the same", func() {
|
||||
assert.Panics(t, func() {
|
||||
dst = aead.Seal([]byte{}, iv, plaintext, aad)
|
||||
})
|
||||
if fips140.Version() == "v1.0.0" {
|
||||
assert.PanicsWithValue(t, "crypto/cipher: counter decreased", func() {
|
||||
dst = aead.Seal([]byte{}, iv, plaintext, aad)
|
||||
})
|
||||
} else {
|
||||
assert.PanicsWithValue(t, "crypto/cipher: counter decreased or remained the same", func() {
|
||||
dst = aead.Seal([]byte{}, iv, plaintext, aad)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user