Set up -> Stream is Working

This commit is contained in:
mr
2026-02-03 15:25:15 +01:00
parent 0ff21c0818
commit 1c2ea9ca96
11 changed files with 259 additions and 179 deletions

View File

@@ -49,14 +49,11 @@ func Verify(pub crypto.PubKey, data, sig []byte) (bool, error) {
func LoadKeyFromFilePrivate() (crypto.PrivKey, error) {
path := conf.GetConfig().PrivateKeyPath
fmt.Println("extract " + path)
data, err := os.ReadFile(path)
if err != nil {
return nil, err
}
fmt.Println(data)
block, _ := pem.Decode(data)
fmt.Println(block.Bytes)
keyAny, err := x509.ParsePKCS8PrivateKey(block.Bytes)
if err != nil {
return nil, err
@@ -71,7 +68,6 @@ func LoadKeyFromFilePrivate() (crypto.PrivKey, error) {
func LoadKeyFromFilePublic() (crypto.PubKey, error) {
path := conf.GetConfig().PublicKeyPath
fmt.Println("extract " + path)
data, err := os.ReadFile(path)
if err != nil {
return nil, err
@@ -100,7 +96,6 @@ func LoadPSKFromFile() (pnet.PSK, error) {
if err != nil {
return nil, err
}
fmt.Println("PSK found.")
return psk, nil
}