crypto.math module utils: add some tests, fix quick_is_not_prime() for small primes (#733) (#734)

* Fix quick_is_not_prime() for small primes. Add some tests.

* Fix return value of convert_int_to_bytes(0, 0) on Python 2.

* Add some more test cases.

* Simplify the changelog and point out that these errors only happen for cases not happening in regular use.

(cherry picked from commit 0c62837296)
This commit is contained in:
Felix Fontein
2024-04-29 12:03:41 +02:00
committed by GitHub
parent ec7b6b4285
commit 0ef6494ad2
3 changed files with 81 additions and 2 deletions

View File

@@ -0,0 +1,2 @@
bugfixes:
- "crypto.math module utils - change return values for ``quick_is_not_prime()`` for special cases that do not appear when using the collection (https://github.com/ansible-collections/community.crypto/pull/733)."