mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 16:35:19 +00:00
Add sodium to installation requirements and setup tests. Rename getkey operation to rsakey
This commit is contained in:
parent
12506ed2e0
commit
c5c86a23cd
4 changed files with 21 additions and 14 deletions
|
@ -1703,18 +1703,18 @@ class Activity
|
|||
|
||||
|
||||
$ret['publicKey'] = [
|
||||
'id' => $current_url . '?operation=getkey',
|
||||
'id' => $current_url . '?operation=rsakey',
|
||||
'owner' => $current_url,
|
||||
'signatureAlgorithm' => 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256',
|
||||
'publicKeyPem' => $p['xchan_pubkey']
|
||||
];
|
||||
|
||||
// $ret['assertionMethod'] = [
|
||||
// 'id' => $current_url . '?operation=ed25519key',
|
||||
// 'type' => 'Multikey',
|
||||
// 'controller' => $current_url,
|
||||
// 'publicKeyMultibase' => (new Multibase())->publicKey($c['channel_epubkey'])
|
||||
// ];
|
||||
$ret['assertionMethod'] = [
|
||||
'id' => $current_url . '?operation=ed25519key',
|
||||
'type' => 'Multikey',
|
||||
'controller' => $current_url,
|
||||
'publicKeyMultibase' => (new Multibase())->publicKey($c['channel_epubkey'])
|
||||
];
|
||||
|
||||
$ret['manuallyApprovesFollowers'] = !$auto_follow;
|
||||
if ($ret['type'] === 'Group') {
|
||||
|
@ -1739,7 +1739,7 @@ class Activity
|
|||
'id' => $loc->getIdUrl(),
|
||||
'url' => $loc->getIdUrl(),
|
||||
'signature' => [
|
||||
'id' => $loc->getIdUrl() . '?operation=getkey',
|
||||
'id' => $loc->getIdUrl() . '?operation=rsakey',
|
||||
'nonce' => random_string(),
|
||||
'creator' => $loc->getIdUrl(),
|
||||
'signature' => base64_encode(Crypto::sign($loc->getIdUrl(), $c['channel_prvkey'])),
|
||||
|
@ -1890,7 +1890,7 @@ class Activity
|
|||
]);
|
||||
|
||||
$actor->setPublicKey([
|
||||
'id' => z_root() . '?operation=getkey',
|
||||
'id' => z_root() . '?operation=rsakey',
|
||||
'owner' => z_root(),
|
||||
'publicKeyPem' => get_config('system', 'pubkey')
|
||||
]);
|
||||
|
|
|
@ -2586,10 +2586,10 @@ class Channel
|
|||
}
|
||||
|
||||
if ($channel['channel_address'] === App::get_hostname() || intval($channel['channel_system'])) {
|
||||
return z_root() . '?operation=getkey';
|
||||
return z_root() . '?operation=rsakey';
|
||||
}
|
||||
|
||||
return (($channel) ? z_root() . '/channel/' . $channel['channel_address'] : z_root()) . '?operation=getkey';
|
||||
return (($channel) ? z_root() . '/channel/' . $channel['channel_address'] : z_root()) . '?operation=rsakey';
|
||||
}
|
||||
|
||||
public static function is_group($uid)
|
||||
|
|
|
@ -484,6 +484,13 @@ class Setup extends Controller
|
|||
}
|
||||
|
||||
$this->check_add($checks, t('Generate encryption keys'), $res, true, $help);
|
||||
|
||||
$res = function_exists('sodium_crypto_sign_keypair');
|
||||
if (!$res) {
|
||||
$help .= t('Error: the sodium encryption library is not installed.') . EOL;
|
||||
}
|
||||
$this->check_add($checks, t('Generate ed25519 encryption keys'), $res, true, $help);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -62,9 +62,9 @@ web server platforms.
|
|||
|
||||
- Composer - visit getcomposer.org and follow the instructions.
|
||||
|
||||
- curl, gd (with at least jpeg and png support), mysqli, mbstring, xml,
|
||||
xmlreader (FreeBSD), zip and openssl extensions. The imagick extension MAY
|
||||
be used instead of gd, but is not required and MAY also be disabled via
|
||||
- curl, gd (with at least jpeg and png support), sodium, mysqli, mbstring,
|
||||
xml, xmlreader (FreeBSD), zip and openssl extensions. The imagick extension
|
||||
MAY be used instead of gd, but is not required and MAY also be disabled via
|
||||
configuration option.
|
||||
|
||||
- some form of email server or email gateway such that PHP mail() works.
|
||||
|
|
Loading…
Reference in a new issue