30if (!defined(
'NOTOKENRENEWAL')) {
31 define(
'NOTOKENRENEWAL', 1);
33if (!defined(
'NOREQUIREMENU')) {
34 define(
'NOREQUIREMENU',
'1');
36if (!defined(
'NOREQUIREHTML')) {
37 define(
'NOREQUIREHTML',
'1');
42require
'../../main.inc.php';
43require_once DOL_DOCUMENT_ROOT.
'/core/lib/geturl.lib.php';
44require_once DOL_DOCUMENT_ROOT.
'/blockedlog/class/blockedlog.class.php';
45require_once DOL_DOCUMENT_ROOT.
'/blockedlog/class/authority.class.php';
49 exit(
'BLOCKEDLOG_AUTHORITY_URL not set');
60$auth->syncSignatureWithAuthority();
64$blocks = $block_static->getLog(
'just_certified', 0, 0,
'rowid',
'ASC');
66$auth->signature = $block_static->getSignature();
68if (is_array($blocks)) {
69 foreach ($blocks as &$b) {
70 $auth->blockchain .= $b->signature;
74$hash = $auth->getBlockchainHash();
77$url =
getDolGlobalString(
'BLOCKEDLOG_AUTHORITY_URL') .
'/blockedlog/ajax/authority.php?s='.urlencode($auth->signature).
'&h='.urlencode($hash);
79$resarray =
getURLContent($url,
'GET',
'', 1, array(), array(), 2);
80$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.