util

package
v0.0.0-pre.4 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckTrustState

func CheckTrustState(cert x509.Certificate, trustedCertFingerprints []string) (bool, string)

CheckTrustState checks whether the given client certificate is trusted (i.e. it has a valid time span and it belongs to the given list of trusted certificates). Returns whether or not the certificate is trusted, and the fingerprint of the certificate.

func EtagCheck

func EtagCheck(r *http.Request, data any) error

EtagCheck validates the hash of the current state with the hash provided by the client.

func EtagHash

func EtagHash(data any) (string, error)

EtagHash hashes the provided data and returns the sha256.

Types

This section is empty.

Jump to

Keyboard shortcuts

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