[PD1] Certs done
This commit is contained in:
parent
23584e2901
commit
2c4f1fd2fc
6 changed files with 104 additions and 29 deletions
|
@ -2,6 +2,7 @@ package server
|
|||
|
||||
import (
|
||||
"PD1/internal/protocol"
|
||||
"PD1/internal/utils/cryptoUtils"
|
||||
"PD1/internal/utils/networking"
|
||||
"fmt"
|
||||
)
|
||||
|
@ -34,8 +35,13 @@ func Run(port int) {
|
|||
dataStore := OpenDB()
|
||||
defer dataStore.db.Close()
|
||||
|
||||
//TODO: Get the server's keystore path instead of hardcoding it
|
||||
|
||||
//Read server keystore
|
||||
serverKeyStore := cryptoUtils.LoadKeyStore("serverdata.p12")
|
||||
|
||||
//Create server listener
|
||||
server := networking.NewServer[protocol.Packet](port)
|
||||
server := networking.NewServer[protocol.Packet](serverKeyStore,port)
|
||||
go server.ListenLoop()
|
||||
|
||||
for {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue