Skip to content

Commit

Permalink
Tests will use a non-empty AAD value. SoftHSM doesn't like empty AAD …
Browse files Browse the repository at this point in the history
…values on FC33.
  • Loading branch information
gamringer committed Jan 30, 2021
1 parent 2444dae commit e0a62bd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/0141-sym-encrypt-aes-gcm.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $key = $session->generateKey(new Pkcs11\Mechanism(Pkcs11\CKM_AES_KEY_GEN), [
]);

$iv = random_bytes(16);
$aad = '';
$aad = 'foo';
$gcmParams = new Pkcs11\GcmParams($iv, $aad, 128);

$data = 'Hello World!';
Expand Down
6 changes: 3 additions & 3 deletions tests/0145-sym-encrypt-aes-gcm-update.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $key = $session->createObject([
]);

$iv = str_repeat('0', 16);
$aad = '';
$aad = 'foo';
$gcmParams = new Pkcs11\GcmParams($iv, $aad, 128);
$mechanism = new Pkcs11\Mechanism(Pkcs11\CKM_AES_GCM, $gcmParams);

Expand Down Expand Up @@ -61,7 +61,7 @@ $session->logout();
--EXPECTF--
string(32) "83541da26b31a09d92c1fe7994c545e0"
string(64) "83541da26b31a09d92c1fe7994c545e020f6bf42face8af788a4dc6157fca675"
string(96) "83541da26b31a09d92c1fe7994c545e020f6bf42face8af788a4dc6157fca675daf8d4b5731df66c12b2b806a64daa25"
string(96) "83541da26b31a09d92c1fe7994c545e020f6bf42face8af788a4dc6157fca675478306d04bed85fdcca38052fb855b1c"
string(0) ""
string(0) ""
string(64) "3030303030303030303030303030303031313131313131313131313131313131"
string(64) "3030303030303030303030303030303031313131313131313131313131313131"
2 changes: 1 addition & 1 deletion tests/0165-rsa-encrypt-oaep-wrap.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ $key = $session->generateKey(new Pkcs11\Mechanism(Pkcs11\CKM_AES_KEY_GEN), [
]);

$iv = random_bytes(16);
$aad = '';
$aad = 'foo';
$gcmParams = new Pkcs11\GcmParams($iv, $aad, 128);
$mechanismEnc = new Pkcs11\Mechanism(Pkcs11\CKM_AES_GCM, $gcmParams);

Expand Down

0 comments on commit e0a62bd

Please sign in to comment.