x509util

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 11 Imported by: 2

Documentation

Overview

package x509 provides utilities for working with x509 types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCertificateRequest

func CreateCertificateRequest(rand io.Reader, template *CertificateRequest, priv interface{}) (csr []byte, err error)

CreateCertificateRequest creates a new certificate request based on a template. The resulting CSR is similar to x509 but optionally supports the challengePassword attribute.

See https://github.com/golang/go/issues/15995

func ParseChallengePassword

func ParseChallengePassword(asn1Data []byte) (string, error)

ParseChallengePassword extracts the challengePassword attribute from a DER encoded Certificate Signing Request.

Types

type CertificateRequest

type CertificateRequest struct {
	x509.CertificateRequest

	ChallengePassword string
}

Jump to

Keyboard shortcuts

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