Subversion Repositories oidinfo_api

Rev

Rev 8 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 daniel-mar 1
<?php
2
 
3
require_once __DIR__ . '/oidinfo_api.inc.phps';
4
 
5
$oa = new OIDInfoAPI();
6
 
7
$oa->loadIllegalityRuleFile('oid_illegality_rules');
8
 
9
assert($oa->illegalOID('1.3.6.1.2.1.9999') === true);
10
assert($oa->illegalOID('1.3.6.1.2.1.9999.123') === true);
11
assert($oa->illegalOID('2.999') === false);
12
assert($oa->illegalOID('3') === true);
13
assert($oa->illegalOID('1') === false);
14
assert($oa->illegalOID('1.0.16') === true);
15
assert($oa->illegalOID('1.2.6.0') === true); // 1.2.6 is illegal -> 1.2.6.0 too
16
 
17
assert($oa->strictCheckSyntax('0', false, true) === true);
18
assert($oa->strictCheckSyntax('1', false, true) === true);
19
assert($oa->strictCheckSyntax('(requesting)', false, true) === false);