summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2007-05-28 13:55:30 +0000
committerPierre Joye <pajoye@php.net>2007-05-28 13:55:30 +0000
commitb49e70f946a52b85238b0318ad3903f5134ea387 (patch)
tree509ccc0e9fd11244be901482459aab6940d294c7
parentc0dd1f4d0b098f13612c7a435732fa74eea9417e (diff)
downloadphp-git-b49e70f946a52b85238b0318ad3903f5134ea387.tar.gz
- MFH:
- tests for #39217 - skip test if openssl is too old
-rw-r--r--ext/openssl/tests/bug37820.phpt3
-rw-r--r--ext/openssl/tests/bug39217.phpt19
2 files changed, 21 insertions, 1 deletions
diff --git a/ext/openssl/tests/bug37820.phpt b/ext/openssl/tests/bug37820.phpt
index 485114e201..2eef8c5bdc 100644
--- a/ext/openssl/tests/bug37820.phpt
+++ b/ext/openssl/tests/bug37820.phpt
@@ -2,7 +2,8 @@
openssl_sign/verify: accept different algos
--SKIPIF--
<?php
-if (!extension_loaded("openssl")) die("skip");
+if (!extension_loaded("openssl")) die("skip");
+if (OPENSSL_VERSION_NUMBER < 0x009070af) die("skip");
?>
--FILE--
<?php
diff --git a/ext/openssl/tests/bug39217.phpt b/ext/openssl/tests/bug39217.phpt
new file mode 100644
index 0000000000..7d9456bd25
--- /dev/null
+++ b/ext/openssl/tests/bug39217.phpt
@@ -0,0 +1,19 @@
+--TEST--
+#39217, Large serial number return -1
+--SKIPIF--
+<?php
+if (!extension_loaded("openssl")) die("skip");
+?>
+--FILE--
+<?php
+$dir = dirname(__FILE__);
+$certs = array('bug39217cert2.txt', 'bug39217cert1.txt');
+foreach($certs as $cert) {
+ $res = openssl_x509_parse(file_get_contents($dir . '/' . $cert));
+ print_r($res['serialNumber']);
+ echo "\n";
+}
+?>
+--EXPECTF--
+163040343498260435477161879008842183802
+15