nameconstraints

package
v0.0.0-...-f665d57 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SANITY_CHECK_TEST_CASE uint = iota
	FEATURE_NAME_CONSTRAINTS_TEST_CASE
	FEATURE_VALIDATE_DNS_TEST_CASE_1
	FEATURE_VALIDATE_DNS_TEST_CASE_2
	FEATURE_VALIDATE_IP_TEST_CASE_1
	FEATURE_VALIDATE_IP_TEST_CASE_2
)
View Source
const (
	FEATURE_NAME_CONSTRAINTS test_case.Feature = iota + 1
	FEATURE_VALIDATE_DNS
	FEATURE_VALIDATE_IP
)
View Source
const INVALID_DNS_NAME = "bad.example.com"
View Source
const INVALID_DNS_TREE = "example.com"
View Source
const INVALID_IP = "1.1.1.1"
View Source
const INVALID_IP_RANGE = "1.1.1.0/24"
View Source
const VALID_DNS_NAME = "test.localhost"
View Source
const VALID_DNS_TREE = "localhost"
View Source
const VALID_IP = "127.0.0.1"
View Source
const VALID_IP_RANGE = "127.0.0.0/24"

Variables

Functions

This section is empty.

Types

type ClientHostnameType

type ClientHostnameType byte
const (
	CLIENT_HOSTNAME_TYPE_DNS ClientHostnameType = iota
	CLIENT_HOSTNAME_TYPE_IP
)

func (ClientHostnameType) MarshalJSON

func (cht ClientHostnameType) MarshalJSON() ([]byte, error)

func (ClientHostnameType) String

func (cht ClientHostnameType) String() string

type CommonNameType

type CommonNameType byte
const (
	CN_TYPE_DNS CommonNameType = iota
	CN_TYPE_IP
)

func (CommonNameType) MarshalJSON

func (cnt CommonNameType) MarshalJSON() ([]byte, error)

func (CommonNameType) String

func (cnt CommonNameType) String() string

type ExtraSan

type ExtraSan struct {
	// contains filtered or unexported fields
}

func (*ExtraSan) MarshalJSON

func (es *ExtraSan) MarshalJSON() ([]byte, error)

type InvalidReason

type InvalidReason int

type NameConstraintsTestCase

type NameConstraintsTestCase struct {
	ClientHostnameType          ClientHostnameType
	CommonNameType              CommonNameType
	CommonNameValue             TrinaryValue
	DnsSan                      TrinaryValue
	IpSan                       TrinaryValue
	NameConstraintsIpWhitelist  TrinaryValue
	NameConstraintsDnsWhitelist TrinaryValue
	NameConstraintsIpBlacklist  TrinaryValue
	NameConstraintsDnsBlacklist TrinaryValue
	ExtraSan                    *ExtraSan
}

func (NameConstraintsTestCase) ExpectedResult

func (NameConstraintsTestCase) GetCertificates

func (n NameConstraintsTestCase) GetCertificates(rootCert *x509.Certificate, rootKey crypto.Signer) (*tls.Certificate, error)

func (NameConstraintsTestCase) GetHostname

func (n NameConstraintsTestCase) GetHostname() string

func (NameConstraintsTestCase) RequiredFeatures

func (n NameConstraintsTestCase) RequiredFeatures() []test_case.Feature

type TestCaseProvider

type TestCaseProvider struct {
	// contains filtered or unexported fields
}

func NewTestCaseProvider

func NewTestCaseProvider() *TestCaseProvider

func (*TestCaseProvider) DescribeFeature

func (p *TestCaseProvider) DescribeFeature(feature test_case.Feature) string

func (*TestCaseProvider) GetFeatures

func (p *TestCaseProvider) GetFeatures() []test_case.Feature

func (*TestCaseProvider) GetSanityCheckTestCase

func (p *TestCaseProvider) GetSanityCheckTestCase() (uint, error)

func (*TestCaseProvider) GetTestCase

func (p *TestCaseProvider) GetTestCase(index uint) (test_case.TestCase, error)

func (*TestCaseProvider) GetTestCaseCount

func (p *TestCaseProvider) GetTestCaseCount() (uint, error)

func (*TestCaseProvider) GetTestCasesForFeature

func (p *TestCaseProvider) GetTestCasesForFeature(feature test_case.Feature) ([]uint, error)

func (*TestCaseProvider) Name

func (p *TestCaseProvider) Name() string

type TrinaryValue

type TrinaryValue byte
const (
	EXTVAL_NONE TrinaryValue = iota
	EXTVAL_VALID
	EXTVAL_INVALID
)

func (TrinaryValue) MarshalJSON

func (tv TrinaryValue) MarshalJSON() ([]byte, error)

func (TrinaryValue) String

func (tv TrinaryValue) String() string

Jump to

Keyboard shortcuts

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