29 if (!defined(
'NOTOKENRENEWAL')) define(
'NOTOKENRENEWAL', 1);
30 if (!defined(
'NOREQUIREMENU')) define(
'NOREQUIREMENU',
'1');
31 if (!defined(
'NOREQUIREHTML')) define(
'NOREQUIREHTML',
'1');
34 require
'../../main.inc.php';
36 if (empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) exit(
'BLOCKEDLOG_AUTHORITY_URL not set');
38 require_once DOL_DOCUMENT_ROOT.
'/blockedlog/class/blockedlog.class.php';
39 require_once DOL_DOCUMENT_ROOT.
'/blockedlog/class/authority.class.php';
42 $auth->syncSignatureWithAuthority();
46 $blocks = $block_static->getLog(
'just_certified', 0, 0,
'rowid',
'ASC');
48 $auth->signature = $block_static->getSignature();
50 foreach ($blocks as &$b) {
51 $auth->blockchain .= $b->signature;
54 $hash = $auth->getBlockchainHash();
56 $url = $conf->global->BLOCKEDLOG_AUTHORITY_URL.
'/blockedlog/ajax/authority.php?s='.$auth->signature.
'&h='.$hash;
58 $res = file_get_contents($url);
Class to manage certif authority.
Class to manage Blocked Log.