utils

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

README

scnorion - Utils

Repository containing shared functionality for the scnorion project

This repository is used as a git submodule from other scnorion's repositories

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePostgresDatabaseURL

func CreatePostgresDatabaseURL() (string, error)

func DownloadFile

func DownloadFile(url, filepath string, expectedHash string) error

func GenerateSerialNumber

func GenerateSerialNumber() (*big.Int, error)

func GetAgentConfigFile

func GetAgentConfigFile() string

func GetConfigFile

func GetConfigFile() string

func GetJWTKey

func GetJWTKey() (string, error)

func GetSHA256Sum

func GetSHA256Sum(filepath string) ([]byte, error)

func GetWd

func GetWd() (string, error)

func NewLogger

func NewLogger(logFilename string) *scnorionLogger

func QueryReleasesEndpoint

func QueryReleasesEndpoint(url string) ([]byte, error)

func ReadPEMCertificate

func ReadPEMCertificate(path string) (*x509.Certificate, error)

func ReadPEMPrivateKey

func ReadPEMPrivateKey(path string) (*rsa.PrivateKey, error)

func SaveCertificate

func SaveCertificate(certBytes []byte, path string) error

func SavePFX

func SavePFX(b []byte, path string) error

func SavePrivateKey

func SavePrivateKey(certPrivKey *rsa.PrivateKey, path string) error

func UTF16BytesToString

func UTF16BytesToString(b []byte, o binary.ByteOrder) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL