You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

33 lines
960 B

<?php
/**
* @package tikiwiki
*/
// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$
require_once('tiki-setup.php');
require_once("lib/phpseclib_tiki/tikisecure.php");
global $prefs;
if ($prefs['feature_futurelinkprotocol'] == "y") {
$requester = gethostbyaddr($_SERVER['REMOTE_ADDR']);
if (isset($requester)) {
if (isset($_REQUEST['hash'], $_REQUEST["clienttime"])) {
$timestamp = TikiSecure::timestamp($_REQUEST["hash"], $_REQUEST["clienttime"], $requester);
} elseif ($_REQUEST['timestamp']) {
$timestamp = TikiSecure::openTimestamp(json_decode(urldecode($_REQUEST['timestamp'])), $requester);
}
echo json_encode($timestamp);
exit();
}
//We list all public keys here
}