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

1.1     ! misho       1: --TEST--
        !             2: openssl_csr_new() tests
        !             3: --SKIPIF--
        !             4: <?php if (!extension_loaded("openssl")) print "skip"; ?>
        !             5: --FILE--
        !             6: <?php
        !             7: 
        !             8: $a = 1;
        !             9: var_dump(openssl_csr_new(1,$a));
        !            10: var_dump(openssl_csr_new(1,$a,1,1));
        !            11: $a = array();
        !            12: var_dump(openssl_csr_new(array(), $a, array(), array()));
        !            13: 
        !            14: //this leaks
        !            15: $a = array(1,2);
        !            16: $b = array(1,2);
        !            17: var_dump(openssl_csr_new($a, $b));
        !            18: 
        !            19: 
        !            20: echo "Done\n";
        !            21: ?>
        !            22: --EXPECTF--    
        !            23: Warning: openssl_csr_new() expects parameter 1 to be array, integer given in %s on line %d
        !            24: NULL
        !            25: 
        !            26: Warning: openssl_csr_new() expects parameter 1 to be array, integer given in %s on line %d
        !            27: NULL
        !            28: 
        !            29: Warning: openssl_csr_new(): key array must be of the form array(0 => key, 1 => phrase) in %s on line %d
        !            30: 
        !            31: Warning: openssl_csr_new(): add1_attr_by_txt challengePassword_min -> 4 (failed) in %s on line %d
        !            32: bool(false)
        !            33: resource(%d) of type (OpenSSL X.509 CSR)
        !            34: Done

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