Documentation ¶
Index ¶
- Constants
- func CreateCert(serialNumber *big.Int, validityDays int, keyLength KeyLength, ...) ([]byte, *rsa.PrivateKey, error)
- func CreateSelfsignedX509Certificate(serialNumber *big.Int, validityDays int, rsaKeyLen KeyLength, ...) (certificate []byte, privateKey []byte, err error)
- func EncodeCertificatePEMForm(certificate []byte) []byte
- func EncodePEMForm(content []byte, typ string) []byte
- func EncodeRsaKeyPEMForm(privateKey *rsa.PrivateKey) []byte
- func RandBool() (bool, error)
- func RandCharacters(length int, capital bool) ([]byte, error)
- func RandFloat(max float64) float64
- func RandInt16(min int16, max int16) (int16, error)
- func RandInt32(min int32, max int32) (int32, error)
- func RandInt64(min int64, max int64) (int64, error)
- func RandInt8(min int8, max int8) (int8, error)
- func RandString(length int) (string, error)
- func RandomGenerator() (rng *rand.Rand)
- type CertChecker
- type CertificateSubject
- type KeyLength
Constants ¶
View Source
const MinimalAllowedKeyLength = KeyLength2048Bit
Variables ¶
This section is empty.
Functions ¶
func CreateCert ¶
func CreateCert(serialNumber *big.Int, validityDays int, keyLength KeyLength, subject CertificateSubject) ([]byte, *rsa.PrivateKey, error)
func EncodePEMForm ¶
func EncodeRsaKeyPEMForm ¶
func EncodeRsaKeyPEMForm(privateKey *rsa.PrivateKey) []byte
func RandString ¶
func RandomGenerator ¶
Types ¶
type CertChecker ¶
type CertChecker struct {
// contains filtered or unexported fields
}
func NewCustomCertChecker ¶
func NewCustomCertChecker(rootCAs *x509.CertPool) *CertChecker
func (*CertChecker) X509CeckCertNoSAN ¶
func (c *CertChecker) X509CeckCertNoSAN(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) (err error)
This Certificate checker ignores the SAN and CN
type CertificateSubject ¶
Click to show internal directories.
Click to hide internal directories.