ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | |
decodeBER ($encoded) | |
Parse BER-encoding. More... | |
_decode_ber ($encoded, $start=0) | |
Parse BER-encoding (Helper function) More... | |
asn1map ($decoded, $mapping, $special=array()) | |
ASN.1 Map. More... | |
encodeDER ($source, $mapping, $special=array()) | |
ASN.1 Encode. More... | |
_encode_der ($source, $mapping, $idx=null, $special=array()) | |
ASN.1 Encode (Helper function) More... | |
_encodeLength ($length) | |
DER-encode the length. More... | |
_decodeTime ($content, $tag) | |
BER-decode the time. More... | |
setTimeFormat ($format) | |
Set the time format. More... | |
loadOIDs ($oids) | |
Load OIDs. More... | |
loadFilters ($filters) | |
Load filters. More... | |
_string_shift (&$string, $index=1) | |
String Shift. More... | |
convert ($in, $from=self::TYPE_UTF8_STRING, $to=self::TYPE_UTF8_STRING) | |
String type conversion. More... | |
Data Fields | |
const | CLASS_UNIVERSAL = 0 |
#+ Tag Classes More... | |
const | CLASS_APPLICATION = 1 |
const | CLASS_CONTEXT_SPECIFIC = 2 |
const | CLASS_PRIVATE = 3 |
const | TYPE_BOOLEAN = 1 |
#- More... | |
const | TYPE_INTEGER = 2 |
const | TYPE_BIT_STRING = 3 |
const | TYPE_OCTET_STRING = 4 |
const | TYPE_NULL = 5 |
const | TYPE_OBJECT_IDENTIFIER = 6 |
const | TYPE_REAL = 9 |
const | TYPE_ENUMERATED = 10 |
const | TYPE_UTF8_STRING = 12 |
const | TYPE_SEQUENCE = 16 |
const | TYPE_SET = 17 |
const | TYPE_NUMERIC_STRING = 18 |
#- More... | |
const | TYPE_PRINTABLE_STRING = 19 |
const | TYPE_TELETEX_STRING = 20 |
const | TYPE_VIDEOTEX_STRING = 21 |
const | TYPE_IA5_STRING = 22 |
const | TYPE_UTC_TIME = 23 |
const | TYPE_GENERALIZED_TIME = 24 |
const | TYPE_GRAPHIC_STRING = 25 |
const | TYPE_VISIBLE_STRING = 26 |
const | TYPE_GENERAL_STRING = 27 |
const | TYPE_UNIVERSAL_STRING = 28 |
const | TYPE_BMP_STRING = 30 |
const | TYPE_CHOICE = -1 |
#- More... | |
const | TYPE_ANY = -2 |
$oids = array() | |
$format = 'D, d M Y H:i:s O' | |
$encoded | |
$filters | |
$ANYmap | |
$stringTypeSize | |
phpseclib\File\ASN1::_decode_ber | ( | $encoded, | |
$start = 0 |
|||
) |
Parse BER-encoding (Helper function)
Sometimes we want to get the BER encoding of a particular tag. $start lets us do that without having to reencode. $encoded is passed by reference for the recursive calls done for self::TYPE_BIT_STRING and self::TYPE_OCTET_STRING. In those cases, the indefinite length is used.
string | $encoded | |
int | $start |
Definition at line 230 of file ASN1.php.
References $current, $i, $start, $tag, $type, phpseclib\File\ASN1\_decodeTime(), and phpseclib\File\ASN1\_string_shift().
Referenced by phpseclib\File\ASN1\decodeBER().
phpseclib\File\ASN1::_decodeTime | ( | $content, | |
$tag | |||
) |
BER-decode the time.
Called by _decode_ber() and in the case of implicit tags asn1map().
private
string | $content | |
int | $tag |
Definition at line 1115 of file ASN1.php.
References $tag.
Referenced by phpseclib\File\ASN1\_decode_ber(), and phpseclib\File\ASN1\asn1map().
phpseclib\File\ASN1::_encode_der | ( | $source, | |
$mapping, | |||
$idx = null , |
|||
$special = array() |
|||
) |
ASN.1 Encode (Helper function)
string | $source | |
string | $mapping | |
int | $idx |
Definition at line 798 of file ASN1.php.
References phpseclib\File\ASN1\$filters, $i, $key, $location, $size, $source, $tag, and phpseclib\File\ASN1\_encodeLength().
Referenced by phpseclib\File\ASN1\encodeDER().
phpseclib\File\ASN1::_encodeLength | ( | $length | ) |
DER-encode the length.
DER supports lengths up to (2**8)**127, however, we'll only support lengths up to (2**8)**4. See X.690 paragraph 8.1.3 for more information.
private
int | $length |
Definition at line 1095 of file ASN1.php.
Referenced by phpseclib\File\ASN1\_encode_der().
phpseclib\File\ASN1::_string_shift | ( | & | $string, |
$index = 1 |
|||
) |
String Shift.
Inspired by array_shift
string | $string | |
int | $index |
Definition at line 1203 of file ASN1.php.
References $index.
Referenced by phpseclib\File\ASN1\_decode_ber().
phpseclib\File\ASN1::asn1map | ( | $decoded, | |
$mapping, | |||
$special = array() |
|||
) |
ASN.1 Map.
Provides an ASN.1 semantic mapping ($mapping) from a parsed BER-encoding to a human readable format.
"Special" mappings may be applied on a per tag-name basis via $special.
array | $decoded | |
array | $mapping | |
array | $special |
Definition at line 491 of file ASN1.php.
References $current, $i, $key, $map, $n, $size, $values, and phpseclib\File\ASN1\_decodeTime().
phpseclib\File\ASN1::convert | ( | $in, | |
$from = self::TYPE_UTF8_STRING , |
|||
$to = self::TYPE_UTF8_STRING |
|||
) |
phpseclib\File\ASN1::decodeBER | ( | $encoded | ) |
Parse BER-encoding.
Serves a similar purpose to openssl's asn1parse
string | $encoded |
Definition at line 207 of file ASN1.php.
References phpseclib\File\ASN1\$encoded, and phpseclib\File\ASN1\_decode_ber().
phpseclib\File\ASN1::encodeDER | ( | $source, | |
$mapping, | |||
$special = array() |
|||
) |
ASN.1 Encode.
DER-encodes an ASN.1 semantic mapping ($mapping). Some libraries would probably call this function an ASN.1 compiler.
"Special" mappings can be applied via $special.
string | $source | |
string | $mapping | |
int | $idx |
Definition at line 783 of file ASN1.php.
References $source, and phpseclib\File\ASN1\_encode_der().
phpseclib\File\ASN1::loadFilters | ( | $filters | ) |
Load filters.
See , etc, for an example.
public
array | $filters |
Definition at line 1188 of file ASN1.php.
References phpseclib\File\ASN1\$filters.
phpseclib\File\ASN1::loadOIDs | ( | $oids | ) |
Load OIDs.
Load the relevant OIDs for a particular ASN.1 semantic mapping.
public
array | $oids |
Definition at line 1175 of file ASN1.php.
References phpseclib\File\ASN1\$oids.
phpseclib\File\ASN1::setTimeFormat | ( | $format | ) |
Set the time format.
Sets the time / date format for asn1map().
public
string | $format |
Definition at line 1162 of file ASN1.php.
References phpseclib\File\ASN1\$format.
phpseclib\File\ASN1::$ANYmap |
phpseclib\File\ASN1::$encoded |
Definition at line 131 of file ASN1.php.
Referenced by phpseclib\File\ASN1\Element\__construct(), and phpseclib\File\ASN1\decodeBER().
phpseclib\File\ASN1::$filters |
Definition at line 142 of file ASN1.php.
Referenced by phpseclib\File\ASN1\_encode_der(), and phpseclib\File\ASN1\loadFilters().
phpseclib\File\ASN1::$format = 'D, d M Y H:i:s O' |
Definition at line 120 of file ASN1.php.
Referenced by phpseclib\File\ASN1\setTimeFormat().
phpseclib\File\ASN1::$oids = array() |
Definition at line 111 of file ASN1.php.
Referenced by phpseclib\File\ASN1\loadOIDs().
phpseclib\File\ASN1::$stringTypeSize |
const phpseclib\File\ASN1::CLASS_APPLICATION = 1 |
Definition at line 45 of file ASN1.php.
Referenced by phpseclib\File\X509\__construct().
const phpseclib\File\ASN1::CLASS_CONTEXT_SPECIFIC = 2 |
Definition at line 46 of file ASN1.php.
Referenced by phpseclib\File\X509\_mapOutExtensions().
const phpseclib\File\ASN1::CLASS_UNIVERSAL = 0 |
#+ Tag Classes
private http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf#page=12
const phpseclib\File\ASN1::TYPE_ANY = -2 |
Definition at line 101 of file ASN1.php.
Referenced by phpseclib\File\X509\__construct().
const phpseclib\File\ASN1::TYPE_BIT_STRING = 3 |
Definition at line 58 of file ASN1.php.
Referenced by phpseclib\File\X509\__construct(), and phpseclib\File\X509\computeKeyIdentifier().
const phpseclib\File\ASN1::TYPE_BMP_STRING = 30 |
Definition at line 90 of file ASN1.php.
Referenced by phpseclib\File\X509\__construct().
const phpseclib\File\ASN1::TYPE_BOOLEAN = 1 |
#-
#+ Tag Classes
private http://www.obj-sys.com/asn1tutorial/node124.html
Definition at line 56 of file ASN1.php.
Referenced by phpseclib\File\X509\__construct().
const phpseclib\File\ASN1::TYPE_CHOICE = -1 |
#-
#+ Tag Aliases
These tags are kinda place holders for other tags.
private
Definition at line 100 of file ASN1.php.
Referenced by phpseclib\File\X509\__construct().
const phpseclib\File\ASN1::TYPE_ENUMERATED = 10 |
Definition at line 65 of file ASN1.php.
Referenced by phpseclib\File\X509\__construct().
const phpseclib\File\ASN1::TYPE_GENERALIZED_TIME = 24 |
Definition at line 84 of file ASN1.php.
Referenced by phpseclib\File\X509\__construct(), and phpseclib\File\X509\setEndDate().
const phpseclib\File\ASN1::TYPE_IA5_STRING = 22 |
Definition at line 82 of file ASN1.php.
Referenced by phpseclib\File\X509\__construct(), and phpseclib\File\X509\saveX509().
const phpseclib\File\ASN1::TYPE_INTEGER = 2 |
Definition at line 57 of file ASN1.php.
Referenced by phpseclib\File\X509\__construct().
const phpseclib\File\ASN1::TYPE_NULL = 5 |
Definition at line 60 of file ASN1.php.
Referenced by phpseclib\File\X509\saveCRL().
const phpseclib\File\ASN1::TYPE_NUMERIC_STRING = 18 |
#-
#+ More Tag Classes
private http://www.obj-sys.com/asn1tutorial/node10.html
Definition at line 78 of file ASN1.php.
Referenced by phpseclib\File\X509\__construct().
const phpseclib\File\ASN1::TYPE_OBJECT_IDENTIFIER = 6 |
Definition at line 61 of file ASN1.php.
Referenced by phpseclib\File\X509\__construct().
const phpseclib\File\ASN1::TYPE_OCTET_STRING = 4 |
Definition at line 59 of file ASN1.php.
Referenced by phpseclib\File\X509\__construct().
const phpseclib\File\ASN1::TYPE_PRINTABLE_STRING = 19 |
Definition at line 79 of file ASN1.php.
Referenced by phpseclib\File\X509\__construct().
const phpseclib\File\ASN1::TYPE_SEQUENCE = 16 |
Definition at line 69 of file ASN1.php.
Referenced by phpseclib\File\X509\__construct().
const phpseclib\File\ASN1::TYPE_SET = 17 |
Definition at line 70 of file ASN1.php.
Referenced by phpseclib\File\X509\__construct().
const phpseclib\File\ASN1::TYPE_TELETEX_STRING = 20 |
Definition at line 80 of file ASN1.php.
Referenced by phpseclib\File\X509\__construct().
const phpseclib\File\ASN1::TYPE_UNIVERSAL_STRING = 28 |
Definition at line 88 of file ASN1.php.
Referenced by phpseclib\File\X509\__construct().
const phpseclib\File\ASN1::TYPE_UTC_TIME = 23 |
Definition at line 83 of file ASN1.php.
Referenced by phpseclib\File\X509\__construct().
const phpseclib\File\ASN1::TYPE_UTF8_STRING = 12 |
Definition at line 67 of file ASN1.php.
Referenced by phpseclib\File\X509\__construct(), phpseclib\File\X509\getDN(), phpseclib\File\X509\saveCRL(), phpseclib\File\X509\saveCSR(), and phpseclib\File\X509\saveX509().
const phpseclib\File\ASN1::TYPE_VISIBLE_STRING = 26 |
Definition at line 86 of file ASN1.php.
Referenced by phpseclib\File\X509\__construct().