mirror of
https://github.com/python/cpython.git
synced 2025-10-03 05:35:59 +00:00
Issue 27744: AES-CBC and DRBG need Kernel 3.19+
This commit is contained in:
parent
942889aae2
commit
04960a21fb
1 changed files with 2 additions and 0 deletions
|
@ -5372,6 +5372,7 @@ class LinuxKernelCryptoAPI(unittest.TestCase):
|
||||||
op.sendall(b"what do ya want for nothing?")
|
op.sendall(b"what do ya want for nothing?")
|
||||||
self.assertEqual(op.recv(512), expected)
|
self.assertEqual(op.recv(512), expected)
|
||||||
|
|
||||||
|
@support.requires_linux_version(3, 19)
|
||||||
def test_aes_cbc(self):
|
def test_aes_cbc(self):
|
||||||
key = bytes.fromhex('06a9214036b8a15b512e03d534120006')
|
key = bytes.fromhex('06a9214036b8a15b512e03d534120006')
|
||||||
iv = bytes.fromhex('3dafba429d9eb430b422da802c9fac41')
|
iv = bytes.fromhex('3dafba429d9eb430b422da802c9fac41')
|
||||||
|
@ -5476,6 +5477,7 @@ class LinuxKernelCryptoAPI(unittest.TestCase):
|
||||||
res = op.recv(len(msg))
|
res = op.recv(len(msg))
|
||||||
self.assertEqual(plain, res[assoclen:-taglen])
|
self.assertEqual(plain, res[assoclen:-taglen])
|
||||||
|
|
||||||
|
@support.requires_linux_version(3, 19)
|
||||||
def test_drbg_pr_sha256(self):
|
def test_drbg_pr_sha256(self):
|
||||||
# deterministic random bit generator, prediction resistance, sha256
|
# deterministic random bit generator, prediction resistance, sha256
|
||||||
with self.create_alg('rng', 'drbg_pr_sha256') as algo:
|
with self.create_alg('rng', 'drbg_pr_sha256') as algo:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue