validator

package
v1.7.11 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToKeystore

func AddToKeystore(driverConfig *eUtils.DriverConfig, alias string, password []byte, certBundleJks string, data []byte) error

func Heartbeat

func Heartbeat(config *core.CoreConfig, url string, username string, password string) (bool, error)

Heartbeat validates the database connection

func IsPfxRfc7292

func IsPfxRfc7292(byteCert []byte) (bool, error)

IsPfx verfies if this looks like a pfx.

func ParseURL

func ParseURL(config *core.CoreConfig, url string) (string, string, string, string, string, error)

func StoreKeystore

func StoreKeystore(driverConfig *eUtils.DriverConfig, trustStorePassword string) ([]byte, error)

func ValidateCertificate

func ValidateCertificate(certPath string, host string) (bool, error)

ValidateCertificate validates certificate pointed to by the path

func ValidateCertificateBytes

func ValidateCertificateBytes(byteCert []byte, host string) (bool, error)

ValidateCertificateBytes validates certificate bytes

func ValidateKeyStore

func ValidateKeyStore(config *core.CoreConfig, filename string, pass string) (bool, error)

ValidateKeyStore validates the sendgrid API key.

func ValidateSendGrid

func ValidateSendGrid(apiKey string) (bool, error)

ValidateSendGrid validates the sendgrid API key.

func VerifyCertificate

func VerifyCertificate(cert *x509.Certificate, host string) (bool, error)

VerifyCertificate

Types

type AlgorithmIdentifier

type AlgorithmIdentifier struct {
	Algorithm  asn1.ObjectIdentifier // OBJECT IDENTIFIER,
	Parameters asn1.RawValue         `asn1:"optional"` // ANY DEFINED BY algorithm OPTIONAL
}

Definition here: https://tools.ietf.org/html/rfc5280

type ContentInfo

type ContentInfo struct {
	ContentType asn1.ObjectIdentifier // OBJECT IDENTIFIER
	Content     asn1.RawValue         `asn1:"tag:0,explicit,optional"` // EXPLICIT ANY DEFINED BY contentType OPTIONAL
}

Definition here: https://tools.ietf.org/html/rfc2315

type DigestInfo

type DigestInfo struct {
	Algorithm AlgorithmIdentifier // DigestAlgorithmIdentifier
	Digest    []byte              // OCTET STRING
}

Definition here: https://tools.ietf.org/html/rfc2315

type MacData

type MacData struct {
	Mac        DigestInfo
	MacSalt    []byte // OCTET STRING
	Iterations int    `asn1:"optional,default:1"` // INTEGER DEFAULT 1
}

Definition here: https://tools.ietf.org/html/rfc7292

type Pfx

type Pfx struct {
	Version  int // {v3(3)}(v3,...),
	AuthSafe ContentInfo
	MacData  MacData `asn1:"optional"`
}

Definition here: https://tools.ietf.org/html/rfc7292

Jump to

Keyboard shortcuts

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