diff options
| author | Joseph Richey <joerichey@google.com> | 2017-08-29 19:06:26 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-29 19:06:26 -0700 |
| commit | fe92c00f897c2c6b20d841c8a8f83ef6a247d18c (patch) | |
| tree | 5c4f78346701a89a4aec632aa919ea8724083b80 /crypto/crypto_test.go | |
| parent | b7f0e79d7a1dc4ff196d59e19a665a346082b542 (diff) | |
| parent | d41bac581c56be1891e7b54d64c8e5d68edd8ca0 (diff) | |
Merge pull request #49 from google/misc
Fix a wide variety of small issues and update documentation
Diffstat (limited to 'crypto/crypto_test.go')
| -rw-r--r-- | crypto/crypto_test.go | 14 |
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 { |