helpers

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2024 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

helpers/readfile.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64EncodeCertificate

func Base64EncodeCertificate(certPath string) (string, error)

Base64EncodeCertificate reads a certificate file and returns its content as a base64-encoded string.

func ReadJCDSPackageTypes

func ReadJCDSPackageTypes(filePath string) (io.Reader, int64, error)

ReadJCDSPackageTypes returns a reader and size for a package file securely after applying multiple checks.

func SafeReadCertificateFile

func SafeReadCertificateFile(filePath string, allowedExtensions []string) ([]byte, error)

SafeReadCertificateFile reads a certificate file securely after applying multiple checks.

func SafeReadJCDSPackageFile

func SafeReadJCDSPackageFile(filePath string, allowedExtensions []string) ([]byte, error)

SafeReadJCDSPackageFile reads a package file securely after applying multiple checks.

Types

This section is empty.

Jump to

Keyboard shortcuts

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