bad signature in Home controller

This commit is contained in:
Mike Macgirvin 2024-01-06 06:18:21 +11:00
parent 8e7d556400
commit 934144089d

View file

@ -31,7 +31,8 @@ class Home extends Controller
$headers = [];
$headers['Content-Type'] = 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"';
$x['signature'] = (new JcsEddsa2022)->sign($x, ['channel_address' => z_root(), 'channel_prvkey' => get_config('system', 'prvkey')]);
$channel = App::$sys_channel;
$x['proof'] = (new JcsEddsa2022)->sign($x, $channel);
$ret = json_encode($x, JSON_UNESCAPED_SLASHES);
logger('data: ' . jindent($ret), LOGGER_DATA);
$headers['Date'] = datetime_convert('UTC', 'UTC', 'now', 'D, d M Y H:i:s \\G\\M\\T');