Tests: re-enable decryption tests with invalid passwords
This commit is contained in:
parent
cf38d6f111
commit
e71df20a42
1 changed files with 8 additions and 5 deletions
|
|
@ -41,11 +41,14 @@
|
||||||
(check-props/for-all [val check-gen/any]
|
(check-props/for-all [val check-gen/any]
|
||||||
(= val (thaw (freeze val)))))))
|
(= val (thaw (freeze val)))))))
|
||||||
|
|
||||||
;;; Trying to decrypt random (invalid) data can actually crash JVM
|
(expect Exception (thaw (freeze test-data {:password "malformed"})))
|
||||||
;; (expect Exception (thaw (freeze test-data {:password "malformed"})))
|
(expect Exception (thaw (freeze test-data {:password [:salted "p"]})
|
||||||
;; (expect Exception (thaw (freeze test-data {:password [:salted "p"]})))
|
{;; Necessary to prevent against JVM segfault due to
|
||||||
;; (expect Exception (thaw (freeze test-data {:password [:salted "p"]})
|
;; https://goo.gl/t0OUIo:
|
||||||
;; {:compressor nil}))
|
:v1-compatibility? false}))
|
||||||
|
(expect Exception (thaw (freeze test-data {:password [:salted "p"]})
|
||||||
|
{:v1-compatibility? false ; Ref. https://goo.gl/t0OUIo
|
||||||
|
:compressor nil}))
|
||||||
|
|
||||||
(expect ; Snappy lib compatibility (for legacy versions of Nippy)
|
(expect ; Snappy lib compatibility (for legacy versions of Nippy)
|
||||||
(let [^bytes raw-ba (freeze test-data {:compressor nil})
|
(let [^bytes raw-ba (freeze test-data {:compressor nil})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue