From 3b38372b4b31843a1099b4f830b4f9e473b55205 Mon Sep 17 00:00:00 2001 From: Jesse Malotaux Date: Mon, 24 Mar 2025 20:22:31 +0100 Subject: [PATCH] WIP: Update to the go api. --- be/app/api.go | 6 + be/app/certify.go | 79 +++++++++++++ be/app/device.go | 109 ++++++++++++++++-- be/app/helper/api-helper.go | 8 +- be/app/helper/device-helper.go | 27 +++++ be/app/structs/api-struct.go | 6 + be/app/structs/device-struct.go | 14 +++ .../a42e16a8-0e99-4bb9-a93f-363740c45b24.json | 1 + be/devices/test_device.json | 1 - be/devices/test_device.pem | 0 be/devices/test_device_2.json | 1 - be/go.mod | 7 +- be/go.sum | 21 +++- be/main.go | 22 ++-- be/server.crt | 18 +++ be/server.key | 27 +++++ 16 files changed, 317 insertions(+), 30 deletions(-) create mode 100644 be/app/certify.go create mode 100644 be/app/helper/device-helper.go create mode 100644 be/devices/a42e16a8-0e99-4bb9-a93f-363740c45b24.json delete mode 100644 be/devices/test_device.json delete mode 100644 be/devices/test_device.pem delete mode 100644 be/devices/test_device_2.json create mode 100644 be/server.crt create mode 100644 be/server.key diff --git a/be/app/api.go b/be/app/api.go index f38e5b5..ff65ed2 100644 --- a/be/app/api.go +++ b/be/app/api.go @@ -67,6 +67,12 @@ func ApiPost(w http.ResponseWriter, r *http.Request) { DeviceAccessCheck(w, r) case "/device/access/request": DeviceAccessRequest(w, r) + case "/device/link/ping": + PingLink(w, r) + case "/device/link/start": + StartLink(w, r) + case "/device/handshake": + Handshake(w, r) case "/poll/remote": PollRemote(w, r) diff --git a/be/app/certify.go b/be/app/certify.go new file mode 100644 index 0000000..05437e8 --- /dev/null +++ b/be/app/certify.go @@ -0,0 +1,79 @@ +package app + +import ( + "crypto/rand" + "crypto/rsa" + "crypto/tls" + "crypto/x509" + "crypto/x509/pkix" + "encoding/pem" + "fmt" + "math/big" + "os" + "time" +) + +func generateCertificate() tls.Certificate { + fmt.Println("Generating certificate") + var certError = false + // Generate a private key + privateKey, err := rsa.GenerateKey(rand.Reader, 2048) + if err != nil { + // fmt.Println(err) + certError = true + } + + template := x509.Certificate{ + SerialNumber: big.NewInt(1), + Subject: pkix.Name{ + Organization: []string{"Macrame-Server"}, + }, + NotBefore: time.Now(), + NotAfter: time.Now().AddDate(1, 0, 0), + + IsCA: true, + ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}, + KeyUsage: x509.KeyUsageDigitalSignature | x509.KeyUsageKeyEncipherment, + } + + certBytes, err := x509.CreateCertificate(rand.Reader, &template, &template, &privateKey.PublicKey, privateKey) + if err != nil { + // fmt.Println(err) + certError = true + } + + // Encode the certificate and private key to PEM + certPEM := pem.EncodeToMemory( + &pem.Block{Type: "CERTIFICATE", Bytes: certBytes}, + ) + keyPEM := pem.EncodeToMemory( + &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(privateKey)}, + ) + + // Save the certificate and private key to files + if err := os.WriteFile("server.crt", certPEM, 0644); err != nil { + // fmt.Println(err) + certError = true + } + if err := os.WriteFile("server.key", keyPEM, 0644); err != nil { + // fmt.Println(err) + certError = true + } + + if !certError { + return Certify() + } + + return tls.Certificate{} +} + +func Certify() tls.Certificate { + fmt.Println("Loading certificate") + cert, err := tls.LoadX509KeyPair("server.crt", "server.key") + + if err != nil { + return generateCertificate() + } + + return cert +} diff --git a/be/app/device.go b/be/app/device.go index fd28130..3f7f2df 100644 --- a/be/app/device.go +++ b/be/app/device.go @@ -1,9 +1,12 @@ package app import ( + "be/app/helper" "be/app/structs" "encoding/json" + "fmt" "log" + "math/rand" "net/http" "os" "path/filepath" @@ -72,10 +75,7 @@ func PollRemote(w http.ResponseWriter, r *http.Request) { func DeviceAccessCheck(w http.ResponseWriter, r *http.Request) { log.Println("device access check") -} - -func DeviceAccessRequest(w http.ResponseWriter, r *http.Request) { - var req structs.RemoteWebhook + var req structs.Check err := json.NewDecoder(r.Body).Decode(&req) @@ -84,10 +84,103 @@ func DeviceAccessRequest(w http.ResponseWriter, r *http.Request) { return } - log.Println(req) - // mu.Lock() - // queue[req.Device] = append(queue[req.Device], req) - // mu.Unlock() + _, errSett := os.Stat("devices/" + req.Uuid + ".json") + _, errKey := os.Stat("devices/" + req.Uuid + ".pem") + + log.Println(errSett, errKey) + + if (errSett == nil) && (errKey == nil) { + log.Println("authorized") + json.NewEncoder(w).Encode("authorized") + } else if (errSett == nil) && (errKey != nil) { + log.Println("requested") + json.NewEncoder(w).Encode("requested") + } else { + log.Println("unauthorized") + json.NewEncoder(w).Encode("unauthorized") + } + + return +} + +func DeviceAccessRequest(w http.ResponseWriter, r *http.Request) { + var req structs.Request + + err := json.NewDecoder(r.Body).Decode(&req) + + if err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + deviceSettings := structs.Settings{Name: req.Name, Type: req.Type} + + settingsJSON, err := json.Marshal(deviceSettings) + if err != nil { + log.Println(err) + return + } + + err = os.WriteFile("devices/"+req.Uuid+".json", settingsJSON, 0644) + + if err != nil { + log.Println(err) + return + } + + json.NewEncoder(w).Encode(true) +} + +func PingLink(w http.ResponseWriter, r *http.Request) { + log.Println("ping link") + var req structs.Check + err := json.NewDecoder(r.Body).Decode(&req) + + if err != nil { + json.NewEncoder(w).Encode(false) + return + } + + var filename = "devices/" + req.Uuid + ".tmp" + + _, err = os.ReadFile(filename) + + if err == nil { + json.NewEncoder(w).Encode(true) + return + } + + json.NewEncoder(w).Encode(false) + return +} + +func StartLink(w http.ResponseWriter, r *http.Request) { + var req structs.Check + + err := json.NewDecoder(r.Body).Decode(&req) + + if err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + pin := fmt.Sprintf("%04d", rand.Intn(10000)) + + if helper.TempPinFile(req.Uuid, pin) { + json.NewEncoder(w).Encode(pin) + } +} + +func Handshake(w http.ResponseWriter, r *http.Request) { + var req structs.Handshake + + err := json.NewDecoder(r.Body).Decode(&req) + + if err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + log.Println(req.Shake) } diff --git a/be/app/helper/api-helper.go b/be/app/helper/api-helper.go index b707cf8..ab3387c 100644 --- a/be/app/helper/api-helper.go +++ b/be/app/helper/api-helper.go @@ -10,8 +10,6 @@ import ( ) func EndpointAccess(w http.ResponseWriter, r *http.Request) bool { - log.Println("endpoint access") - ip, _, err := net.SplitHostPort(r.RemoteAddr) if err != nil { log.Fatal(err) @@ -19,13 +17,13 @@ func EndpointAccess(w http.ResponseWriter, r *http.Request) bool { if (isLocal(ip) && isEndpointAllowed("Local", r.URL.Path)) || (isLanRemote(ip) && isEndpointAllowed("Remote", r.URL.Path)) { - log.Println("accessible") + log.Println(r.URL.Path, "endpoint access: accessible") return true } else if isLanRemote(ip) && isEndpointAllowed("auth", r.URL.Path) && isDeviceAuthorized() { - log.Println("authorized") + log.Println(r.URL.Path, "endpoint access: authorized") } - log.Println(r.URL.Path, "not authorized or accessible") + log.Println(r.URL.Path, "endpoint access: not authorized or accessible") return false } diff --git a/be/app/helper/device-helper.go b/be/app/helper/device-helper.go new file mode 100644 index 0000000..a6b3eaa --- /dev/null +++ b/be/app/helper/device-helper.go @@ -0,0 +1,27 @@ +package helper + +import ( + "log" + "os" + "time" +) + +func TempPinFile(Uuid string, pin string) bool { + log.Println("temp pin file", Uuid, pin) + err := os.WriteFile("devices/"+Uuid+".tmp", []byte(pin), 0644) + if err != nil { + log.Println(err) + return false + } + + time.AfterFunc(1*time.Minute, func() { + log.Println("deleting", Uuid, pin) + os.Remove("devices/" + Uuid + ".tmp") + }) + + return true +} + +func CheckPinFile(encryptedData []byte) bool { + return false +} diff --git a/be/app/structs/api-struct.go b/be/app/structs/api-struct.go index 01994d9..61966c5 100644 --- a/be/app/structs/api-struct.go +++ b/be/app/structs/api-struct.go @@ -15,11 +15,17 @@ var Endpoints = Allowed{ "/device/list", "/device/access/check", "/device/access/request", + "/device/link/ping", + "/device/link/start", + "/device/handshake", }, Remote: []string{ "/macro/list", "/device/access/check", "/device/access/request", + "/device/link/ping", + "/device/link/end", + "/device/handshake", "/device/auth", }, Auth: []string{ diff --git a/be/app/structs/device-struct.go b/be/app/structs/device-struct.go index 4ec311b..ce396f2 100644 --- a/be/app/structs/device-struct.go +++ b/be/app/structs/device-struct.go @@ -9,3 +9,17 @@ type RemoteWebhook struct { Event string `json:"event"` Data string `json:"data"` } + +type Check struct { + Uuid string `json:"uuid"` +} + +type Request struct { + Uuid string `json:"uuid"` + Name string `json:"name"` + Type string `json:"type"` +} + +type Handshake struct { + Shake string `json:"shake"` +} diff --git a/be/devices/a42e16a8-0e99-4bb9-a93f-363740c45b24.json b/be/devices/a42e16a8-0e99-4bb9-a93f-363740c45b24.json new file mode 100644 index 0000000..e0eb582 --- /dev/null +++ b/be/devices/a42e16a8-0e99-4bb9-a93f-363740c45b24.json @@ -0,0 +1 @@ +{"name":"Unknown desktop","type":"desktop"} \ No newline at end of file diff --git a/be/devices/test_device.json b/be/devices/test_device.json deleted file mode 100644 index e622440..0000000 --- a/be/devices/test_device.json +++ /dev/null @@ -1 +0,0 @@ -{ "name": "moto g84 5G", "type": "phone" } diff --git a/be/devices/test_device.pem b/be/devices/test_device.pem deleted file mode 100644 index e69de29..0000000 diff --git a/be/devices/test_device_2.json b/be/devices/test_device_2.json deleted file mode 100644 index 59b558e..0000000 --- a/be/devices/test_device_2.json +++ /dev/null @@ -1 +0,0 @@ -{ "name": "Samsung Galaxy A-tab 8\"", "type": "tablet" } diff --git a/be/go.mod b/be/go.mod index 792a86d..d4c6e93 100644 --- a/be/go.mod +++ b/be/go.mod @@ -2,18 +2,20 @@ module be go 1.24.0 +require github.com/go-vgo/robotgo v0.110.6 + require ( github.com/dblohm7/wingoes v0.0.0-20240820181039-f2b84150679e // indirect github.com/ebitengine/purego v0.8.2 // indirect github.com/gen2brain/shm v0.1.1 // indirect github.com/go-ole/go-ole v1.3.0 // indirect - github.com/go-vgo/robotgo v0.110.6 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/jezek/xgb v1.1.1 // indirect github.com/kbinani/screenshot v0.0.0-20250118074034-a3924b7bbc8c // indirect github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683 // indirect github.com/lxn/win v0.0.0-20210218163916-a377121e959e // indirect github.com/otiai10/gosseract v2.2.1+incompatible // indirect + github.com/otiai10/mint v1.6.3 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/robotn/xgb v0.10.0 // indirect github.com/robotn/xgbutil v0.10.0 // indirect @@ -28,5 +30,6 @@ require ( github.com/yusufpapurcu/wmi v1.2.4 // indirect golang.org/x/exp v0.0.0-20250215185904-eff6e970281f // indirect golang.org/x/image v0.24.0 // indirect - golang.org/x/sys v0.30.0 // indirect + golang.org/x/net v0.37.0 // indirect + golang.org/x/sys v0.31.0 // indirect ) diff --git a/be/go.sum b/be/go.sum index d02c77e..a95f44a 100644 --- a/be/go.sum +++ b/be/go.sum @@ -1,5 +1,7 @@ github.com/BurntSushi/freetype-go v0.0.0-20160129220410-b763ddbfe298/go.mod h1:D+QujdIlUNfa0igpNMk6UIvlb6C252URs4yupRUV4lQ= github.com/BurntSushi/graphics-go v0.0.0-20160129215708-b43f31a4a966/go.mod h1:Mid70uvE93zn9wgF92A/r5ixgnvX8Lh68fxp9KQBaI0= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dblohm7/wingoes v0.0.0-20240820181039-f2b84150679e h1:L+XrFvD0vBIBm+Wf9sFN6aU395t7JROoai0qXZraA4U= github.com/dblohm7/wingoes v0.0.0-20240820181039-f2b84150679e/go.mod h1:SUxUaAK/0UG5lYyZR1L1nC4AaYYvSSYTWQSH3FPcxKU= github.com/ebitengine/purego v0.8.2 h1:jPPGWs2sZ1UgOSgD2bClL0MJIqu58nOmIcBuXr62z1I= @@ -13,6 +15,7 @@ github.com/go-vgo/robotgo v0.110.6 h1:1tOxlmTXYg6F3Xs8IT++331MxY2nZ+Q3B6eW312llb github.com/go-vgo/robotgo v0.110.6/go.mod h1:eBUjTHY1HYjzdi1+UWJUbxB+b9gE+l4Ei7vQU/9SnLw= github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/jezek/xgb v1.1.1 h1:bE/r8ZZtSv7l9gk6nU0mYx51aXrvnyb44892TwSaqS4= github.com/jezek/xgb v1.1.1/go.mod h1:nrhwO0FX/enq75I7Y7G8iN1ubpSGZEiA3v9e9GyRFlk= @@ -22,8 +25,14 @@ github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683 h1:7UMa6KCCMjZEMD github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683/go.mod h1:ilwx/Dta8jXAgpFYFvSWEMwxmbWXyiUHkd5FwyKhb5k= github.com/lxn/win v0.0.0-20210218163916-a377121e959e h1:H+t6A/QJMbhCSEH5rAuRxh+CtW96g0Or0Fxa9IKr4uc= github.com/lxn/win v0.0.0-20210218163916-a377121e959e/go.mod h1:KxxjdtRkfNoYDCUP5ryK7XJJNTnpC8atvtmTheChOtk= +github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ= +github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= github.com/otiai10/gosseract v2.2.1+incompatible h1:Ry5ltVdpdp4LAa2bMjsSJH34XHVOV7XMi41HtzL8X2I= github.com/otiai10/gosseract v2.2.1+incompatible/go.mod h1:XrzWItCzCpFRZ35n3YtVTgq5bLAhFIkascoRo8G32QE= +github.com/otiai10/mint v1.6.3 h1:87qsV/aw1F5as1eH1zS/yqHY85ANKVMgkDrf9rcxbQs= +github.com/otiai10/mint v1.6.3/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/robotn/xgb v0.0.0-20190912153532-2cb92d044934/go.mod h1:SxQhJskUJ4rleVU44YvnrdvxQr0tKy5SRSigBrCgyyQ= @@ -33,8 +42,12 @@ github.com/robotn/xgbutil v0.10.0 h1:gvf7mGQqCWQ68aHRtCxgdewRk+/KAJui6l3MJQQRCKw github.com/robotn/xgbutil v0.10.0/go.mod h1:svkDXUDQjUiWzLrA0OZgHc4lbOts3C+uRfP6/yjwYnU= github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs= github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tailscale/win v0.0.0-20250213223159-5992cb43ca35 h1:wAZbkTZkqDzWsqxPh2qkBd3KvFU7tcxV0BP0Rnhkxog= github.com/tailscale/win v0.0.0-20250213223159-5992cb43ca35/go.mod h1:aMd4yDHLjbOuYP6fMxj1d9ACDQlSWwYztcpybGHCQc8= +github.com/tc-hib/winres v0.2.1 h1:YDE0FiP0VmtRaDn7+aaChp1KiF4owBiJa5l964l5ujA= +github.com/tc-hib/winres v0.2.1/go.mod h1:C/JaNhH3KBvhNKVbvdlDWkbMDO9H4fKKDaN7/07SSuk= github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZb78yU= github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY= github.com/tklauser/numcpus v0.9.0 h1:lmyCHtANi8aRUgkckBgoDk1nHCux3n2cgkJLXdQGPDo= @@ -53,9 +66,13 @@ golang.org/x/exp v0.0.0-20250215185904-eff6e970281f h1:oFMYAjX0867ZD2jcNiLBrI9Bd golang.org/x/exp v0.0.0-20250215185904-eff6e970281f/go.mod h1:BHOTPb3L19zxehTsLoJXVaTktb06DFgmdW6Wb9s8jqk= golang.org/x/image v0.24.0 h1:AN7zRgVsbvmTfNyqIbbOraYL8mSwcKncEj8ofjgzcMQ= golang.org/x/image v0.24.0/go.mod h1:4b/ITuLfqYq1hqZcjofwctIhi7sZh2WaCjvsBNjjya8= +golang.org/x/net v0.37.0 h1:1zLorHbz+LYj7MQlSf1+2tPIIgibq2eL5xkrGk6f+2c= +golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201018230417-eeed37f84f13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= -golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/be/main.go b/be/main.go index 89f5c85..8542958 100644 --- a/be/main.go +++ b/be/main.go @@ -9,18 +9,18 @@ import ( func main() { http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - - app.ApiCORS(w, r) - - if r.Method == "GET" { - app.ApiGet(w, r) - } else if r.Method == "POST" { - app.ApiPost(w, r) - } - + apiInit(w, r) }) - // helper.OpenBrowser("http://localhost:6970") - log.Fatal(http.ListenAndServe(":6970", nil)) } + +func apiInit(w http.ResponseWriter, r *http.Request) { + app.ApiCORS(w, r) + + if r.Method == "GET" { + app.ApiGet(w, r) + } else if r.Method == "POST" { + app.ApiPost(w, r) + } +} diff --git a/be/server.crt b/be/server.crt new file mode 100644 index 0000000..13e79aa --- /dev/null +++ b/be/server.crt @@ -0,0 +1,18 @@ +-----BEGIN CERTIFICATE----- +MIIC8zCCAdugAwIBAgIBATANBgkqhkiG9w0BAQsFADAZMRcwFQYDVQQKEw5NYWNy +YW1lLVNlcnZlcjAeFw0yNTAzMjMxODU4NDhaFw0yNjAzMjMxODU4NDhaMBkxFzAV +BgNVBAoTDk1hY3JhbWUtU2VydmVyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEApUcSJKGZjS6ctwOvuGMNDr9bvKQSkHWHeXlhdA8l8MX/kpSBdqe88024 +7W4lH8SAp9cygEghQX36+DDyGviINBwgmFL5YCTOE1icLvR3MRUjqo8mNplPvClX +pH9b90QhZbUn4oKPj7iF71+ti3h+zw0Gv9zAJT7tUKewUO1vQ+oB9QSUpux2tABH +mfyGKeojcRoOQg5Ni4oGTiAhm8IIzh/tLRYvZ/fKf+LZp6FoVZkSYytdxT1Pebi/ +7sK8u1u08Ruot1FvsfurrQMfEOYgZ5Ueqrw+hmG3nG+gHcrgd6HR6tqj1bidp0gw +X5WU3fz99EvwDWCo6SkLsO8ie5zF4QIDAQABo0YwRDAOBgNVHQ8BAf8EBAMCBaAw +EwYDVR0lBAwwCgYIKwYBBQUHAwEwHQYDVR0OBBYEFEGrgTy900AkXr0fdWN4BnT/ +uE5OMA0GCSqGSIb3DQEBCwUAA4IBAQAipP80Twc6eg48A9WAk72o8oZiFFxxXGiU +AFikYcOGgJb4yHCjk7lf2szm0yARpH2/XIh6XPZSDWWgHSk3/BnwH8wDGCotJINX +S0481tISQeOMSzWxkbNg8sfGyUofQpaejrdKjdGL9NvRo5rj2aHMM189VidOJVZa +PASYLqDnkFY+np5FJgz0UCr0gg+q0TsW3vvzpebzJWP6EL6fFeHr3q3OAcJ9WmTy +c1xrngrKsJt8tYdy7yQrW6ZBe0xNyuB0DJlS6snmT88DJO8Ro7DqSwdtDbEb/IBZ +hbsers+al0FqVutJzINE3LVsVARqJNa0xZNqXRk5yzO8iFsMrugt +-----END CERTIFICATE----- diff --git a/be/server.key b/be/server.key new file mode 100644 index 0000000..e4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