Annotation of embedaddon/php/ext/snmp/tests/snmp3-error.phpt, revision 1.1

1.1     ! misho       1: --TEST--                                 
        !             2: SNMPv3 Support (errors)
        !             3: --CREDITS--
        !             4: Boris Lytochkin
        !             5: --SKIPIF--
        !             6: <?php
        !             7: require_once(dirname(__FILE__).'/skipif.inc');
        !             8: ?>
        !             9: --FILE--
        !            10: <?php
        !            11: require_once(dirname(__FILE__).'/snmp_include.inc');
        !            12: 
        !            13: echo "Checking error handling\n";
        !            14: 
        !            15: //int snmp3_get(string host, string sec_name, string sec_level, string auth_protocol, 
        !            16: //              string auth_passphrase, string priv_protocol, string priv_passphrase, 
        !            17: //              string object_id [, int timeout [, int retries]]);
        !            18: 
        !            19: var_dump(snmp3_get($hostname, $community, '', '', '', '', ''));
        !            20: var_dump(snmp3_get($hostname, $community, '', '', '', '', '', '.1.3.6.1.2.1.1.1.0'));
        !            21: var_dump(snmp3_get($hostname, $community, 'bugusPriv', '', '', '', '', '.1.3.6.1.2.1.1.1.0'));
        !            22: var_dump(snmp3_get($hostname, $community, 'authNoPriv', 'TTT', '', '', '', '.1.3.6.1.2.1.1.1.0'));
        !            23: var_dump(snmp3_get($hostname, $community, 'authNoPriv', 'MD5', '', '', '', '.1.3.6.1.2.1.1.1.0'));
        !            24: var_dump(snmp3_get($hostname, $community, 'authNoPriv', 'MD5', 'te', '', '', '.1.3.6.1.2.1.1.1.0'));
        !            25: var_dump(snmp3_get($hostname, $community, 'authPriv', 'MD5', $auth_pass, 'BBB', '', '.1.3.6.1.2.1.1.1.0'));
        !            26: var_dump(snmp3_get($hostname, $community, 'authPriv', 'MD5', $auth_pass, 'AES', '', '.1.3.6.1.2.1.1.1.0'));
        !            27: var_dump(snmp3_get($hostname, $community, 'authPriv', 'MD5', $auth_pass, 'AES', 'ty', '.1.3.6.1.2.1.1.1.0'));
        !            28: var_dump(snmp3_get($hostname, 'somebogususer', 'authPriv', 'MD5', $auth_pass, 'AES', $priv_pass, '.1.3.6.1.2.1.1.1.0', $timeout, $retries));
        !            29: 
        !            30: var_dump(snmp3_set($hostname, $community, 'authPriv', 'MD5', $auth_pass, 'AES', $priv_pass, '', 's'));
        !            31: 
        !            32: var_dump(snmp3_set($hostname, $rwuser, 'authPriv', 'MD5', $auth_pass, 'AES', $priv_pass, '.1.3.6.777...7.5.3', 's', 'ttt', $timeout, $retries));
        !            33: var_dump(snmp3_set($hostname, $rwuser, 'authPriv', 'MD5', $auth_pass, 'AES', $priv_pass, '.1.3.6.777.7.5.3', array('s'), 'yyy', $timeout, $retries));
        !            34: 
        !            35: ?>
        !            36: --EXPECTF--
        !            37: Checking error handling
        !            38: 
        !            39: Warning: snmp3_get() expects at least 8 parameters, 7 given in %s on line %d
        !            40: bool(false)
        !            41: 
        !            42: Warning: snmp3_get(): Invalid security level '' in %s on line %d
        !            43: bool(false)
        !            44: 
        !            45: Warning: snmp3_get(): Invalid security level 'bugusPriv' in %s on line %d
        !            46: bool(false)
        !            47: 
        !            48: Warning: snmp3_get(): Unknown authentication protocol 'TTT' in %s on line %d
        !            49: bool(false)
        !            50: 
        !            51: Warning: snmp3_get(): Error generating a key for authentication pass phrase '': Generic error (The supplied password length is too short.) in %s on line %d
        !            52: bool(false)
        !            53: 
        !            54: Warning: snmp3_get(): Error generating a key for authentication pass phrase 'te': Generic error (The supplied password length is too short.) in %s on line %d
        !            55: bool(false)
        !            56: 
        !            57: Warning: snmp3_get(): Unknown security protocol 'BBB' in %s on line %d
        !            58: bool(false)
        !            59: 
        !            60: Warning: snmp3_get(): Error generating a key for privacy pass phrase '': Generic error (The supplied password length is too short.) in %s on line %d
        !            61: bool(false)
        !            62: 
        !            63: Warning: snmp3_get(): Error generating a key for privacy pass phrase 'ty': Generic error (The supplied password length is too short.) in %s on line %d
        !            64: bool(false)
        !            65: 
        !            66: Warning: snmp3_get(): Fatal error: Unknown user name in %s on line %d
        !            67: bool(false)
        !            68: 
        !            69: Warning: snmp3_set() expects at least 10 parameters, 9 given in %s on line %d
        !            70: bool(false)
        !            71: 
        !            72: Warning: snmp3_set(): Invalid object identifier: .1.3.6.777...7.5.3 in %s on line %d
        !            73: bool(false)
        !            74: 
        !            75: Warning: snmp3_set(): Single objid and multiple type or values are not supported in %s on line %d
        !            76: bool(false)

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