31if (!defined(
'NOTOKENRENEWAL')) {
32 define(
'NOTOKENRENEWAL', 1);
34if (!defined(
'NOREQUIREMENU')) {
35 define(
'NOREQUIREMENU',
'1');
37if (!defined(
'NOREQUIREHTML')) {
38 define(
'NOREQUIREHTML',
'1');
43require
'../../main.inc.php';
44require_once DOL_DOCUMENT_ROOT.
'/core/lib/geturl.lib.php';
45require_once DOL_DOCUMENT_ROOT.
'/blockedlog/class/blockedlog.class.php';
46require_once DOL_DOCUMENT_ROOT.
'/blockedlog/class/authority.class.php';
57 exit(
'BLOCKEDLOG_AUTHORITY_URL not set');
68$auth->syncSignatureWithAuthority();
72$blocks = $block_static->getLog(
'just_certified', 0, 0,
'rowid',
'ASC');
74$auth->signature = $block_static->getSignature();
76if (is_array($blocks)) {
77 foreach ($blocks as &$b) {
78 $auth->blockchain .= $b->signature;
82$hash = $auth->getBlockchainHash();
85$url =
getDolGlobalString(
'BLOCKEDLOG_AUTHORITY_URL') .
'/blockedlog/ajax/authority.php?s='.urlencode($auth->signature).
'&h='.urlencode($hash);
87$resarray =
getURLContent($url,
'GET',
'', 1, array(), array(), 2);
88$res = $resarray[
'content'];
Class to manage certif authority.
Class to manage Blocked Log.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
getURLContent($url, $postorget='GET', $param='', $followlocation=1, $addheaders=array(), $allowedschemes=array('http', 'https'), $localurl=0, $ssl_verifypeer=-1)
Function to get a content from an URL (use proxy if proxy defined).
if(!defined( 'NOREQUIREMENU')) if(!empty(GETPOST('seteventmessages', 'alpha'))) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.