Annotation of embedaddon/php/ext/openssl/tests/013.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: openssl_open() tests
        !             3: --SKIPIF--
        !             4: <?php if (!extension_loaded("openssl")) print "skip"; ?>
        !             5: --FILE--
        !             6: <?php
        !             7: $data = "openssl_open() test";
        !             8: $pub_key = "file://" . dirname(__FILE__) . "/public.key";
        !             9: $priv_key = "file://" . dirname(__FILE__) . "/private.key";
        !            10: $wrong = "wrong";
        !            11: 
        !            12: openssl_seal($data, $sealed, $ekeys, array($pub_key, $pub_key, $pub_key));
        !            13: openssl_open($sealed, $output, $ekeys[0], $priv_key);
        !            14: var_dump($output);
        !            15: openssl_open($sealed, $output2, $ekeys[1], $wrong);
        !            16: var_dump($output2);
        !            17: openssl_open($sealed, $output3, $ekeys[2], $priv_key);
        !            18: var_dump($output3);
        !            19: openssl_open($sealed, $output4, $wrong, $priv_key);
        !            20: var_dump($output4);
        !            21: ?>
        !            22: --EXPECTF--
        !            23: string(19) "openssl_open() test"
        !            24: 
        !            25: Warning: openssl_open(): unable to coerce parameter 4 into a private key in %s on line %d
        !            26: NULL
        !            27: string(19) "openssl_open() test"
        !            28: NULL

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>