Documentation ¶
Overview ¶
helpers/readfile.go
Index ¶
- func Base64EncodeCertificate(certPath string) (string, error)
- func ReadJCDSPackageTypes(filePath string) (io.Reader, int64, error)
- func SafeReadCertificateFile(filePath string, allowedExtensions []string) ([]byte, error)
- func SafeReadJCDSPackageFile(filePath string, allowedExtensions []string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64EncodeCertificate ¶
Base64EncodeCertificate reads a certificate file and returns its content as a base64-encoded string.
func ReadJCDSPackageTypes ¶
ReadJCDSPackageTypes returns a reader and size for a package file securely after applying multiple checks.
func SafeReadCertificateFile ¶
SafeReadCertificateFile reads a certificate file securely after applying multiple checks.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.