summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/sodium/tests/bug78114.phpt6
-rw-r--r--ext/sodium/tests/bug78516.phpt3
-rw-r--r--ext/sodium/tests/crypto_aead.phpt3
-rw-r--r--ext/sodium/tests/crypto_auth.phpt4
-rw-r--r--ext/sodium/tests/crypto_box.phpt4
-rw-r--r--ext/sodium/tests/crypto_generichash.phpt4
-rw-r--r--ext/sodium/tests/crypto_hex.phpt4
-rw-r--r--ext/sodium/tests/crypto_kdf.phpt4
-rw-r--r--ext/sodium/tests/crypto_kx.phpt4
-rw-r--r--ext/sodium/tests/crypto_scalarmult.phpt4
-rw-r--r--ext/sodium/tests/crypto_secretbox.phpt4
-rw-r--r--ext/sodium/tests/crypto_secretstream.phpt3
-rw-r--r--ext/sodium/tests/crypto_shorthash.phpt4
-rw-r--r--ext/sodium/tests/crypto_sign.phpt4
-rw-r--r--ext/sodium/tests/crypto_stream.phpt4
-rw-r--r--ext/sodium/tests/exception_trace_without_args.phpt4
-rw-r--r--ext/sodium/tests/inc_add.phpt4
-rw-r--r--ext/sodium/tests/installed.phpt4
-rw-r--r--ext/sodium/tests/pwhash_argon2i.phpt4
-rw-r--r--ext/sodium/tests/pwhash_scrypt.phpt4
-rw-r--r--ext/sodium/tests/sodium_error_001.phpt4
-rw-r--r--ext/sodium/tests/utils.phpt4
-rw-r--r--ext/sodium/tests/version.phpt4
23 files changed, 48 insertions, 43 deletions
diff --git a/ext/sodium/tests/bug78114.phpt b/ext/sodium/tests/bug78114.phpt
index 6d7df4348f..b988c09ec2 100644
--- a/ext/sodium/tests/bug78114.phpt
+++ b/ext/sodium/tests/bug78114.phpt
@@ -1,9 +1,7 @@
--TEST--
Bug #78114 (segfault when calling sodium_* functions from eval)
---SKIPIF--
-<?php
-if (!extension_loaded('sodium')) die('skip sodium extension not available');
-?>
+--EXTENSIONS--
+sodium
--FILE--
<?php
try {
diff --git a/ext/sodium/tests/bug78516.phpt b/ext/sodium/tests/bug78516.phpt
index 0347d33273..90852a6967 100644
--- a/ext/sodium/tests/bug78516.phpt
+++ b/ext/sodium/tests/bug78516.phpt
@@ -1,8 +1,9 @@
--TEST--
Bug #78516 (password_hash(): Memory cost is not in allowed range)
+--EXTENSIONS--
+sodium
--SKIPIF--
<?php
-if (!extension_loaded('sodium')) die('skip sodium extension not available');
if (!defined('PASSWORD_ARGON2ID')) die('skip PASSWORD_ARGON2ID not available');
?>
--FILE--
diff --git a/ext/sodium/tests/crypto_aead.phpt b/ext/sodium/tests/crypto_aead.phpt
index a54a1c7dc6..0da84194bb 100644
--- a/ext/sodium/tests/crypto_aead.phpt
+++ b/ext/sodium/tests/crypto_aead.phpt
@@ -1,8 +1,9 @@
--TEST--
Check for libsodium AEAD
+--EXTENSIONS--
+sodium
--SKIPIF--
<?php
-if (!extension_loaded("sodium")) print "skip extension not loaded";
if (!defined('SODIUM_CRYPTO_AEAD_AES256GCM_NPUBBYTES')) print "skip libsodium without AESGCM";
?>
--FILE--
diff --git a/ext/sodium/tests/crypto_auth.phpt b/ext/sodium/tests/crypto_auth.phpt
index 58d8350078..8f262414be 100644
--- a/ext/sodium/tests/crypto_auth.phpt
+++ b/ext/sodium/tests/crypto_auth.phpt
@@ -1,7 +1,7 @@
--TEST--
Check for libsodium auth
---SKIPIF--
-<?php if (!extension_loaded("sodium")) print "skip"; ?>
+--EXTENSIONS--
+sodium
--FILE--
<?php
$msg = random_bytes(1000);
diff --git a/ext/sodium/tests/crypto_box.phpt b/ext/sodium/tests/crypto_box.phpt
index 3a55717d53..f77ec1601c 100644
--- a/ext/sodium/tests/crypto_box.phpt
+++ b/ext/sodium/tests/crypto_box.phpt
@@ -1,7 +1,7 @@
--TEST--
Check for libsodium box
---SKIPIF--
-<?php if (!extension_loaded("sodium")) print "skip"; ?>
+--EXTENSIONS--
+sodium
--FILE--
<?php
$keypair = sodium_crypto_box_keypair();
diff --git a/ext/sodium/tests/crypto_generichash.phpt b/ext/sodium/tests/crypto_generichash.phpt
index 5a7b0c4285..58f519af5c 100644
--- a/ext/sodium/tests/crypto_generichash.phpt
+++ b/ext/sodium/tests/crypto_generichash.phpt
@@ -1,7 +1,7 @@
--TEST--
Check for libsodium generichash
---SKIPIF--
-<?php if (!extension_loaded("sodium")) print "skip"; ?>
+--EXTENSIONS--
+sodium
--FILE--
<?php
$q = sodium_crypto_generichash('msg');
diff --git a/ext/sodium/tests/crypto_hex.phpt b/ext/sodium/tests/crypto_hex.phpt
index 0f872ee867..3f989a1f11 100644
--- a/ext/sodium/tests/crypto_hex.phpt
+++ b/ext/sodium/tests/crypto_hex.phpt
@@ -1,7 +1,7 @@
--TEST--
Check for libsodium bin2hex
---SKIPIF--
-<?php if (!extension_loaded("sodium")) print "skip"; ?>
+--EXTENSIONS--
+sodium
--FILE--
<?php
$bin = random_bytes(random_int(1, 1000));
diff --git a/ext/sodium/tests/crypto_kdf.phpt b/ext/sodium/tests/crypto_kdf.phpt
index c9f0949ed0..970a87988d 100644
--- a/ext/sodium/tests/crypto_kdf.phpt
+++ b/ext/sodium/tests/crypto_kdf.phpt
@@ -1,7 +1,7 @@
--TEST--
Check for libsodium KDF
---SKIPIF--
-<?php if (!extension_loaded("sodium")) print "skip"; ?>
+--EXTENSIONS--
+sodium
--FILE--
<?php
$key = sodium_crypto_kdf_keygen();
diff --git a/ext/sodium/tests/crypto_kx.phpt b/ext/sodium/tests/crypto_kx.phpt
index a1dd00a0a7..5a278f685b 100644
--- a/ext/sodium/tests/crypto_kx.phpt
+++ b/ext/sodium/tests/crypto_kx.phpt
@@ -1,7 +1,7 @@
--TEST--
Check for libsodium-based key exchange
---SKIPIF--
-<?php if (!extension_loaded("sodium")) print "skip"; ?>
+--EXTENSIONS--
+sodium
--FILE--
<?php
$client_seed = sodium_hex2bin('0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef');
diff --git a/ext/sodium/tests/crypto_scalarmult.phpt b/ext/sodium/tests/crypto_scalarmult.phpt
index 2636963e32..8dda46c99e 100644
--- a/ext/sodium/tests/crypto_scalarmult.phpt
+++ b/ext/sodium/tests/crypto_scalarmult.phpt
@@ -1,7 +1,7 @@
--TEST--
Check for libsodium scalarmult
---SKIPIF--
-<?php if (!extension_loaded("sodium")) print "skip"; ?>
+--EXTENSIONS--
+sodium
--FILE--
<?php
$n = sodium_hex2bin("5dab087e624a8a4b79e17f8b83800ee66f3bb1292618b6fd1c2f8b27ff88e0eb");
diff --git a/ext/sodium/tests/crypto_secretbox.phpt b/ext/sodium/tests/crypto_secretbox.phpt
index b9d4d1ccfe..075b0c60e3 100644
--- a/ext/sodium/tests/crypto_secretbox.phpt
+++ b/ext/sodium/tests/crypto_secretbox.phpt
@@ -1,7 +1,7 @@
--TEST--
Check for libsodium secretbox
---SKIPIF--
-<?php if (!extension_loaded("sodium")) print "skip"; ?>
+--EXTENSIONS--
+sodium
--FILE--
<?php
$nonce = random_bytes(SODIUM_CRYPTO_SECRETBOX_NONCEBYTES);
diff --git a/ext/sodium/tests/crypto_secretstream.phpt b/ext/sodium/tests/crypto_secretstream.phpt
index 24896e15b2..1267ecd8af 100644
--- a/ext/sodium/tests/crypto_secretstream.phpt
+++ b/ext/sodium/tests/crypto_secretstream.phpt
@@ -1,8 +1,9 @@
--TEST--
Check for libsodium secretstream
+--EXTENSIONS--
+sodium
--SKIPIF--
<?php
-if (!extension_loaded("sodium")) print "skip extension not loaded";
if (!defined('SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_ABYTES')) print "skip libsodium without secretbytes";
?>
--FILE--
diff --git a/ext/sodium/tests/crypto_shorthash.phpt b/ext/sodium/tests/crypto_shorthash.phpt
index 68bffc823b..c5cc2334a6 100644
--- a/ext/sodium/tests/crypto_shorthash.phpt
+++ b/ext/sodium/tests/crypto_shorthash.phpt
@@ -1,7 +1,7 @@
--TEST--
Check for libsodium shorthash
---SKIPIF--
-<?php if (!extension_loaded("sodium")) print "skip"; ?>
+--EXTENSIONS--
+sodium
--FILE--
<?php
$m1 = 'message';
diff --git a/ext/sodium/tests/crypto_sign.phpt b/ext/sodium/tests/crypto_sign.phpt
index 14e0c49e91..e1a2343a20 100644
--- a/ext/sodium/tests/crypto_sign.phpt
+++ b/ext/sodium/tests/crypto_sign.phpt
@@ -1,7 +1,7 @@
--TEST--
Check for libsodium ed25519 signatures
---SKIPIF--
-<?php if (!extension_loaded("sodium")) print "skip"; ?>
+--EXTENSIONS--
+sodium
--FILE--
<?php
$keypair = sodium_crypto_sign_keypair();
diff --git a/ext/sodium/tests/crypto_stream.phpt b/ext/sodium/tests/crypto_stream.phpt
index 27e163c071..46f174e15b 100644
--- a/ext/sodium/tests/crypto_stream.phpt
+++ b/ext/sodium/tests/crypto_stream.phpt
@@ -1,7 +1,7 @@
--TEST--
Check for libsodium stream
---SKIPIF--
-<?php if (!extension_loaded("sodium")) print "skip"; ?>
+--EXTENSIONS--
+sodium
--FILE--
<?php
$nonce = random_bytes(SODIUM_CRYPTO_STREAM_NONCEBYTES);
diff --git a/ext/sodium/tests/exception_trace_without_args.phpt b/ext/sodium/tests/exception_trace_without_args.phpt
index 4885f93093..aa39d5610f 100644
--- a/ext/sodium/tests/exception_trace_without_args.phpt
+++ b/ext/sodium/tests/exception_trace_without_args.phpt
@@ -1,7 +1,7 @@
--TEST--
SodiumException backtraces do not contain function arguments
---SKIPIF--
-<?php if (!extension_loaded("sodium")) print "skip"; ?>
+--EXTENSIONS--
+sodium
--FILE--
<?php
diff --git a/ext/sodium/tests/inc_add.phpt b/ext/sodium/tests/inc_add.phpt
index 23410d140c..7652cf851e 100644
--- a/ext/sodium/tests/inc_add.phpt
+++ b/ext/sodium/tests/inc_add.phpt
@@ -1,7 +1,7 @@
--TEST--
increment and add edge cases
---SKIPIF--
-<?php if (!extension_loaded("sodium")) print "skip"; ?>
+--EXTENSIONS--
+sodium
--FILE--
<?php
diff --git a/ext/sodium/tests/installed.phpt b/ext/sodium/tests/installed.phpt
index f004efa714..e2c3b73037 100644
--- a/ext/sodium/tests/installed.phpt
+++ b/ext/sodium/tests/installed.phpt
@@ -1,7 +1,7 @@
--TEST--
Check for sodium presence
---SKIPIF--
-<?php if (!extension_loaded("sodium")) print "skip"; ?>
+--EXTENSIONS--
+sodium
--FILE--
<?php
echo "sodium extension is available";
diff --git a/ext/sodium/tests/pwhash_argon2i.phpt b/ext/sodium/tests/pwhash_argon2i.phpt
index aee90bd6fa..90f7730419 100644
--- a/ext/sodium/tests/pwhash_argon2i.phpt
+++ b/ext/sodium/tests/pwhash_argon2i.phpt
@@ -1,7 +1,9 @@
--TEST--
Check for libsodium argon2i
+--EXTENSIONS--
+sodium
--SKIPIF--
-<?php if (!extension_loaded("sodium")) print "skip";
+<?php
if (!defined('SODIUM_CRYPTO_PWHASH_SALTBYTES')) print "skip libsodium without argon2i"; ?>
--FILE--
<?php
diff --git a/ext/sodium/tests/pwhash_scrypt.phpt b/ext/sodium/tests/pwhash_scrypt.phpt
index 8e02f7ba0e..59b5647a91 100644
--- a/ext/sodium/tests/pwhash_scrypt.phpt
+++ b/ext/sodium/tests/pwhash_scrypt.phpt
@@ -1,7 +1,9 @@
--TEST--
Check for libsodium scrypt
+--EXTENSIONS--
+sodium
--SKIPIF--
-<?php if (!extension_loaded("sodium")) print "skip";
+<?php
if (!defined('SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTES')) print "skip libsodium without scrypt"; ?>
--FILE--
<?php
diff --git a/ext/sodium/tests/sodium_error_001.phpt b/ext/sodium/tests/sodium_error_001.phpt
index a78d071a10..b290ebd8a5 100644
--- a/ext/sodium/tests/sodium_error_001.phpt
+++ b/ext/sodium/tests/sodium_error_001.phpt
@@ -1,7 +1,7 @@
--TEST--
TypeErrors will not contain param values in backtrace
---SKIPIF--
-<?php if (!extension_loaded("sodium")) die("skip ext/sodium required"); ?>
+--EXTENSIONS--
+sodium
--FILE--
<?php
declare(strict_types=1);
diff --git a/ext/sodium/tests/utils.phpt b/ext/sodium/tests/utils.phpt
index 944a25ca22..66969a60bd 100644
--- a/ext/sodium/tests/utils.phpt
+++ b/ext/sodium/tests/utils.phpt
@@ -1,7 +1,7 @@
--TEST--
Check for libsodium utils
---SKIPIF--
-<?php if (!extension_loaded("sodium")) print "skip"; ?>
+--EXTENSIONS--
+sodium
--FILE--
<?php
$a = 'test';
diff --git a/ext/sodium/tests/version.phpt b/ext/sodium/tests/version.phpt
index e9495d7a44..2c8b3a108e 100644
--- a/ext/sodium/tests/version.phpt
+++ b/ext/sodium/tests/version.phpt
@@ -1,7 +1,7 @@
--TEST--
Check for libsodium version
---SKIPIF--
-<?php if (!extension_loaded("sodium")) print "skip"; ?>
+--EXTENSIONS--
+sodium
--FILE--
<?php
echo strlen(SODIUM_LIBRARY_VERSION) >= 5;