Minishlink / web-push-php-example

An example for sending Web Push notifications, using web-push-php

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I can work on local perfect . But on real SSL site How can i get PublicKey using openssl

alpertandogan opened this issue · comments

How can i create '~88 chars', // (recommended) uncompressed public key P-256 encoded in Base64-URL

Centos 7.5 (Linux version 4.1.12-124.18.6.el7uek.x86_64 ) php 7.2.12 Apache 2.4

app.js

const applicationServerKey = "BCmti7Sc________????________EDIFXjKvD-ma-";

send_push_notification.php

'VAPID' => array(
'subject' => 'https://www.REALSERVER.com/',
'publicKey' => 'BCmti7Sc____????___4wuDycO3Ih4',
'privateKey' => 'HJweeF64L35gw
????_______RNK8C_fPQ', // in the real world, this would be in a secret file

OPENSSL
I have create for Apache 2.4 using openssl like

REALSERVER.key
REALSERVER.crs
REALSERVER.crt

openssl genrsa -des3 -out REALSERVER.key 2048
Password:xxxx

openssl req -new -key REALSERVER.key -out REALSERVER.csr -subj "/C=TR/ST=Istanbul/L=Istanbul/O=realserver/CN=realserver.com"

openssl rsa -in /var/www/ssl/REALSERVER.key -out /var/www/ssl/REALSERVER_nopassword.key

comes from SSL provider
REALSERVER.crt

I use site below to genarete key it works well
But . I want to learn is it possible to user my real Public.key and private key using genarate keys.
I also use Ardiuno httpssl md5 keys with difrent method.
Because there a lot of keys .Android keys,site ssl keys,Ardiuno keys..web push keys.

https://tools.reactpwa.com/vapid

See https://github.com/web-push-libs/web-push-php#authentication-vapid

Please ask this type of questoins on StackOverflow or other more appropriate forum