Don't return Text and Signature when verified.

This commit is contained in:
the-djmaze 2022-01-18 15:06:45 +01:00
parent b8d898bc8a
commit 7ef1a8f14a

View file

@ -727,14 +727,17 @@ trait Messages
// GNUPG_SIGSUM_TOFU_CONFLICT = 'A TOFU conflict was detected.', // GNUPG_SIGSUM_TOFU_CONFLICT = 'A TOFU conflict was detected.',
]; ];
$result['Result'] = [ // Verified, so no need to return $result['Text'] and $result['Signature']
'fingerprint' => $info['fingerprint'], $result = [
'validity' => $info['validity'], 'Result' => [
'status' => $info['status'], 'fingerprint' => $info['fingerprint'],
'summary' => $info['summary'], 'validity' => $info['validity'],
'message' => \implode("\n", \array_filter($summary, function($k) use ($info) { 'status' => $info['status'],
return $info['summary'] & $k; 'summary' => $info['summary'],
}, ARRAY_FILTER_USE_KEY)) 'message' => \implode("\n", \array_filter($summary, function($k) use ($info) {
return $info['summary'] & $k;
}, ARRAY_FILTER_USE_KEY))
]
]; ];
} }