aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/utils.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-05-16 10:21:39 -0400
committerAlex Gaynor <alex.gaynor@gmail.com>2014-05-16 10:21:39 -0400
commit59bcae860e9b0b2d603608965e5ef3d913b2c92e (patch)
treee628e26852fa8692b45fc475fd83f6efb1ce4341 /tests/hazmat/primitives/utils.py
parente653e490b4d648daf3cb85d8050d04b47469a939 (diff)
parentd1c0fb8bbe0984d54ba0f4b7a8861bca0e446e19 (diff)
downloadcryptography-59bcae860e9b0b2d603608965e5ef3d913b2c92e.tar.gz
cryptography-59bcae860e9b0b2d603608965e5ef3d913b2c92e.tar.bz2
cryptography-59bcae860e9b0b2d603608965e5ef3d913b2c92e.zip
Merge branch 'master' into pypy-2.3
Diffstat (limited to 'tests/hazmat/primitives/utils.py')
-rw-r--r--tests/hazmat/primitives/utils.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/hazmat/primitives/utils.py b/tests/hazmat/primitives/utils.py
index 6c3f4c95..a496459b 100644
--- a/tests/hazmat/primitives/utils.py
+++ b/tests/hazmat/primitives/utils.py
@@ -26,7 +26,7 @@ from cryptography.exceptions import (
from cryptography.hazmat.primitives import hashes, hmac
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.hazmat.primitives.ciphers import Cipher
-from cryptography.hazmat.primitives.kdf.hkdf import HKDF
+from cryptography.hazmat.primitives.kdf.hkdf import HKDF, HKDFExpand
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
from ...utils import load_vectors_from_file
@@ -347,15 +347,14 @@ def hkdf_extract_test(backend, algorithm, params):
def hkdf_expand_test(backend, algorithm, params):
- hkdf = HKDF(
+ hkdf = HKDFExpand(
algorithm,
int(params["l"]),
- salt=binascii.unhexlify(params["salt"]) or None,
info=binascii.unhexlify(params["info"]) or None,
backend=backend
)
- okm = hkdf._expand(binascii.unhexlify(params["prk"]))
+ okm = hkdf.derive(binascii.unhexlify(params["prk"]))
assert okm == binascii.unhexlify(params["okm"])