Get tests passing with latest wycheproof clone (#5076)

* Get tests passing with latest wycheproof clone

* Fix x25519 wycheproof tests

* Fix for acme repo changes
This commit is contained in:
Alex Gaynor 2019-11-25 22:48:35 -05:00 committed by Paul Kehrer
parent 21eb6f4c8b
commit 9dc710e65a
3 changed files with 6 additions and 3 deletions

View file

@ -5,8 +5,8 @@ case "${1}" in
git clone --depth=1 https://github.com/certbot/certbot
cd certbot
git rev-parse HEAD
pip install -e acme[dev]
pip install -e .[dev]
pip install -e ./acme[dev]
pip install -e ./certbot[dev]
;;
run)
cd certbot

View file

@ -21,6 +21,7 @@ _CURVES = {
"secp256r1": ec.SECP256R1(),
"secp384r1": ec.SECP384R1(),
"secp521r1": ec.SECP521R1(),
"secp224k1": None,
"secp256k1": ec.SECP256K1(),
"brainpoolP224r1": None,
"brainpoolP256r1": ec.BrainpoolP256R1(),

View file

@ -19,7 +19,9 @@ from cryptography.hazmat.primitives.asymmetric.x25519 import (
)
@pytest.mark.wycheproof_tests("x25519_test.json")
def test_x25519(backend, wycheproof):
assert list(wycheproof.testgroup.items()) == [("curve", "curve25519")]
assert set(wycheproof.testgroup.items()) == {
("curve", "curve25519"), ("type", "XdhComp")
}
private_key = X25519PrivateKey.from_private_bytes(
binascii.unhexlify(wycheproof.testcase["private"])