Skip to content

Commit 814763b

Browse files
committed
Print VAPID fp
1 parent d4610e7 commit 814763b

File tree

1 file changed

+3
-2
lines changed
  • src/Simplex/Messaging/Notifications/Server

1 file changed

+3
-2
lines changed

src/Simplex/Messaging/Notifications/Server/Main.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ import System.FilePath (combine)
5757
import System.IO (BufferMode (..), hSetBuffering, stderr, stdout)
5858
import Text.Read (readMaybe)
5959
import System.Process (readCreateProcess, shell)
60-
import Simplex.Messaging.Notifications.Server.Push.WebPush (WebPushConfig(..), VapidKey, mkVapid)
60+
import Simplex.Messaging.Notifications.Server.Push.WebPush (WebPushConfig(..), VapidKey(..), mkVapid)
6161

6262
ntfServerCLI :: FilePath -> FilePath -> IO ()
6363
ntfServerCLI cfgPath logPath =
@@ -215,12 +215,13 @@ ntfServerCLI cfgPath logPath =
215215
hSetBuffering stdout LineBuffering
216216
hSetBuffering stderr LineBuffering
217217
fp <- checkSavedFingerprint cfgPath defaultX509Config
218-
vapidKey <- getVapidKey vapidKeyPath
218+
vapidKey@VapidKey {fp = vapidFp } <- getVapidKey vapidKeyPath
219219
let host = either (const "<hostnames>") T.unpack $ lookupValue "TRANSPORT" "host" ini
220220
port = T.unpack $ strictIni "TRANSPORT" "port" ini
221221
cfg@NtfServerConfig {transports} = serverConfig vapidKey
222222
srv = ProtoServerWithAuth (NtfServer [THDomainName host] (if port == "443" then "" else port) (C.KeyHash fp)) Nothing
223223
printServiceInfo serverVersion srv
224+
B.putStrLn $ "VAPID: " <> vapidFp
224225
printNtfServerConfig transports dbStoreConfig
225226
runNtfServer cfg
226227
where

0 commit comments

Comments
 (0)