Subversion Repositories oidplus

Compare Revisions

Regard whitespace Rev 979 → Rev 980

/trunk/TODO
12,7 → 12,6
 
Ideas
- if a third-party plugin throws an exception in the init() method, maybe OIDplus should avoid loading the plugin?
- VTS built in plugins should get Plugin-Version defined as the System SVN Version (to avoid that the manifest.xml needs to be adjusted at each SVN release, which is not yet done)
- "hidden" alt ids which are not shown in the GUI, but can be used for reverse-Alt-ID ? (I believe we have excluded some AltIDs which are "not neccessary", e.g. an GUID already is a GUID and therefore does not need a Namespace GUID, or something like that)
 
"Reverse Alt IDs"
/trunk/vendor/composer/installed.json
233,18 → 233,18
"source": {
"type": "git",
"url": "https://github.com/danielmarschall/php_utils.git",
"reference": "d112cd8e2f7ab5a5a98927d4bdd0a62eb898ee3f"
"reference": "ecd0bc377d8348cec61dd5d11431d68178ca43b3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/danielmarschall/php_utils/zipball/d112cd8e2f7ab5a5a98927d4bdd0a62eb898ee3f",
"reference": "d112cd8e2f7ab5a5a98927d4bdd0a62eb898ee3f",
"url": "https://api.github.com/repos/danielmarschall/php_utils/zipball/ecd0bc377d8348cec61dd5d11431d68178ca43b3",
"reference": "ecd0bc377d8348cec61dd5d11431d68178ca43b3",
"shasum": ""
},
"require": {
"php": ">=7.0"
},
"time": "2022-09-18T18:46:48+00:00",
"time": "2022-09-22T14:38:59+00:00",
"default-branch": true,
"type": "library",
"installation-source": "dist",
/trunk/vendor/composer/installed.php
62,7 → 62,7
'danielmarschall/php_utils' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'd112cd8e2f7ab5a5a98927d4bdd0a62eb898ee3f',
'reference' => 'ecd0bc377d8348cec61dd5d11431d68178ca43b3',
'type' => 'library',
'install_path' => __DIR__ . '/../danielmarschall/php_utils',
'aliases' => array(
/trunk/vendor/danielmarschall/php_utils/aid_decoder.inc.php
1,9 → 1,9
<?php
 
/*
* ISO/IEC 7816-5 Application Identifier decoder for PHP
* ISO/IEC 7816 Application Identifier decoder for PHP
* Copyright 2022 Daniel Marschall, ViaThinkSoft
* Version 2022-09-18
* Version 2022-09-20
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
18,6 → 18,12
* limitations under the License.
*/
 
// Definition of Application Identifiers (AID):
// - ISO 7816-05:1994 (1st ed.), clause 5.2
// - ISO 7816-04:2005 (2nd ed.), clause 8.2.1.2, Annex A.1, Annex D
// - ISO 7816-04:2013 (3rd ed.), clause 12.2.3, Annex A.1, Annex D
// - ISO 7816-04:2020 (4th ed.), clause 12.3.4, Annex A.1, Annex D
 
include_once __DIR__ . '/gmp_supplement.inc.php';
include_once __DIR__ . '/misc_functions.inc.php';
 
556,13 → 562,8
$iso3166['894'] = "Zambia";
$iso3166['716'] = "Zimbabwe";
 
// ISO/IEC 7816-5 AID decoder
 
$out = array();
 
// A very good source about the coding
// https://blog.actorsfit.com/a?ID=00250-166ef507-edff-4400-8d0e-9e85d6ae2310
 
$aid = strtoupper($aid);
$aid = trim($aid);
$aid = str_replace(' ','',$aid);
581,16 → 582,25
$aid_hf = implode(':',str_split($aid,2));
if (strlen($aid)%2 == 1) $aid_hf .= '_';
 
$out[] = array("$aid", "ISO/IEC 7816-5 Application Identifier (AID)");
$out[] = array("$aid", "ISO/IEC 7816 Application Identifier (AID)");
$out[] = array('', "> $aid_hf <");
$out[] = array('', c_literal_hexstr($aid));
 
if ((strlen($aid) == 32) && (substr($aid,-2) == 'FF')) {
// https://www.kartenbezogene-identifier.de/content/dam/kartenbezogene_identifier/de/PDFs/RID_Antrag_2006.pdf
// writes: "Wenn die PIX aus 11 Bytes besteht, muss das letzte Byte einen Hexadezimal-Wert ungleich ´FF´ aufweisen (´FF´ ist von ISO reserviert)."
// https://www.etsi.org/deliver/etsi_ts/101200_101299/101220/07.03.00_60/ts_101220v070300p.pdf
// writes: According to ISO/IEC 7816-4, if the AID is 16 bytes long, then the value 'FF' for the least significant byte [...] is reserved for future use.
$out[] = array('',"INVALID: A 16-byte AID must not end with FF. (Reserved by ISO/IEC 7816-4)");
// Sometimes you read that a 16-byte AID must not end with FF, because it is reserved by ISO.
// I have only found one official source:
// ISO/IEC 7816-5 : 1994
// Identification cards - Integrated circuit(s) cards with contacts -
// Part 5 : Numbering system and registration procedure for application identifiers
// https://cdn.standards.iteh.ai/samples/19980/8ff6c7ccc9254fe4b7a8a21c0bf59424/ISO-IEC-7816-5-1994.pdf
// Quote from clause 5.2:
// "The PIX has a free coding. If the AID is 16 bytes long,
// then the value 'FF' for the least significant byte is reserved for future use."
// In the revisions of ISO/IEC 7816, parts of ISO 7816-5 (e.g. the AID categories)
// have been moved to ISO 7816-4.
// The "FF" reservation cannot be found in modern versions of 7816-4 or 7816-5.
/*$out[] = array('',"INVALID: A 16-byte AID must not end with FF. (Reserved by ISO/IEC)");*/
$out[] = array('',"Note: A 16-byte AID ending with FF was reserved by ISO/IEC 7816-5:1994");
}
 
if (strlen($aid) > 32) {
639,7 → 649,7
$out[] = array('',"Warning: IIN has an unusual length. 6 or 8 digits are expected!");
}
 
$out[] = array($category, "IIN Category $category = $check_cat_name");
$out[] = array($category, "Major industry identifier $category = $check_cat_name");
$pad .= str_repeat(' ', strlen("$category"));
 
if ("$category" === "9") {
809,7 → 819,7
$e8_min = 3; // 1.0.aaaa (ISO AAAA)
$e8_max = 4; // 1.0.aaaa.b (ISO AAAA-B)
} else {
// This is the inofficial usage of E8+OID
// This is the inofficial usage of E8+OID, i.e. using an OID outside of arc 1.0
$e8_minmax_measure = 'ARC';
$e8_min = 2; // At least 2 arcs (OID x.y)
$e8_max = -1; // no limit
/trunk/vendor/danielmarschall/php_utils/ipv4_functions.inc.php
3,7 → 3,7
/*
* IPv4 functions for PHP
* Copyright 2012-2022 Daniel Marschall, ViaThinkSoft
* Version 2022-09-18
* Version 2022-09-22
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
401,11 → 401,8
$rng = ipv4_cidr2range($line);
} else {
$rng = explode('-', $line);
$rng[0] = trim($rng[0]);
if (isset($rng[1])) $rng[1] = trim($rng[1]);
$rng[0] = ipv4_normalize($rng[0]);
if (!isset($rng[1])) $rng[1] = $rng[0];
$rng[1] = ipv4_normalize($rng[1]);
$rng[0] = ipv4_normalize(trim($rng[0]));
$rng[1] = isset($rng[1]) ? ipv4_normalize(trim($rng[1])) : $rng[0];
}
 
return $rng;
/trunk/vendor/danielmarschall/php_utils/ipv6_functions.inc.php
3,7 → 3,7
/*
* IPv6 functions for PHP
* Copyright 2012-2022 Daniel Marschall, ViaThinkSoft
* Version 2022-09-18
* Version 2022-09-22
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
378,11 → 378,8
$rng = ipv6_cidr2range($line);
} else {
$rng = explode('-', $line);
$rng[0] = trim($rng[0]);
if (isset($rng[1])) $rng[1] = trim($rng[1]);
$rng[0] = ipv6_normalize($rng[0]);
if (!isset($rng[1])) $rng[1] = $rng[0];
$rng[1] = ipv6_normalize($rng[1]);
$rng[0] = ipv6_normalize(trim($rng[0]));
$rng[1] = isset($rng[1]) ? ipv6_normalize(trim($rng[1])) : $rng[0];
}
 
return $rng;
/trunk/vendor/licenses
10,8 → 10,8
danielmarschall/fileformats dev-master 880e97b Apache-2.0
danielmarschall/oidconverter 9999999-dev 75088eb Apache-2.0
danielmarschall/oidconverter dev-master 75088eb Apache-2.0
danielmarschall/php_utils 9999999-dev d112cd8 Apache-2.0
danielmarschall/php_utils dev-master d112cd8 Apache-2.0
danielmarschall/php_utils 9999999-dev ecd0bc3 Apache-2.0
danielmarschall/php_utils dev-master ecd0bc3 Apache-2.0
danielmarschall/uuid_mac_utils 9999999-dev aaef4f3 Apache-2.0
danielmarschall/uuid_mac_utils dev-master aaef4f3 Apache-2.0
danielmarschall/vnag 9999999-dev 85fb29d Apache-2.0