We need to create a vapid public and private key

This commit is contained in:
Michael 2021-08-15 12:57:29 +00:00
parent 74f3cbc383
commit 5056376902
2 changed files with 12 additions and 5 deletions

View file

@ -19,6 +19,10 @@
*
*/
/**
* @see https://github.com/web-push-libs/web-push-php
* Possibly we should simply use this.
*/
namespace Friendica\Model;
use Friendica\Database\DBA;
@ -104,6 +108,6 @@ class Subscription
$keypair = Crypto::newECKeypair();
DI::config()->set('system', 'ec_keypair', $keypair);
}
return $keypair['vapid'];
return $keypair['vapid-public'];
}
}