aboutsummaryrefslogtreecommitdiff
path: root/crypto/crypto_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/crypto_test.go')
-rw-r--r--crypto/crypto_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/crypto/crypto_test.go b/crypto/crypto_test.go
index a069b1b..719db00 100644
--- a/crypto/crypto_test.go
+++ b/crypto/crypto_test.go
@@ -294,6 +294,20 @@ func TestRandomKeyGen(t *testing.T) {
}
}
+func TestBigKeyGen(t *testing.T) {
+ key, err := NewRandomKey(4096 * 4096)
+ switch err {
+ case nil:
+ key.Wipe()
+ return
+ case ErrKeyLock:
+ // Don't fail just because "ulimit -l" is too low.
+ return
+ default:
+ t.Fatal(err)
+ }
+}
+
// didCompress checks if the given data can be compressed. Specifically, it
// returns true if running zlib on the provided input produces a shorter output.
func didCompress(input []byte) bool {