common

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EndpointPrefix            = "/.well-known/est"
	CacertsEndpoint           = "/cacerts"
	CsrattrsEndpoint          = "/csrattrs"
	EnrollEndpoint            = "/simpleenroll"
	HealthCheckEndpoint       = "/healthcheck"
	ReenrollEndpoint          = "/simplereenroll"
	ServerkeygenEndpoint      = "/serverkeygen"
	TpmActivateEnrollEndpoint = "/tpmactivateenroll"
	TpmCertifyEnrollEndpoint  = "/tpmcertifyenroll"
	SnpEnrollEndpoint         = "/snpenroll"
)

URI constants

View Source
const (
	AcceptHeader             = "Accept"
	ContentTypeHeader        = "Content-Type"
	ContentTypeOptionsHeader = "X-Content-Type-Options"
	EncodingTypeBase64       = "base64"
	ParamValueCertsOnly      = "certs-only"
	ParamValueGenKey         = "server-generated-key"
	RetryAfterHeader         = "Retry-After"
	ServerHeader             = "Server"
	ServerKeyGenBoundary     = "estServerKeyGenBoundary"
	StrictTransportHeader    = "Strict-Transport-Security"
	TransferEncodingHeader   = "Content-Transfer-Encoding"
	UserAgentHeader          = "User-Agent"
)

HTTP header constants

View Source
const (
	MimeParamBoundary      = "boundary"
	MimeParamSMIMEType     = "smime-type"
	MimeTypeCertificate    = "application/pkix-cert"
	MimeTypeCSRAttrs       = "application/csrattrs"
	MimeTypeJSON           = "application/json"
	MimeTypeMultipart      = "multipart/mixed"
	MimeTypeOctetStream    = "application/octet-stream"
	MimeTypePKCS10         = "application/pkcs10"
	MimeTypePKCS7          = "application/pkcs7-mime"
	MimeTypePKCS7CertsOnly = "application/pkcs7-mime; smime-type=certs-only"
	MimeTypePKCS7Enveloped = "application/pkcs7-mime; smime-type=enveloped-data"
	MimeTypePKCS7GenKey    = "application/pkcs7-mime; smime-type=server-generated-key"
	MimeTypePKCS8          = "application/pkcs8"
	MimeTypeProblemJSON    = "application/problem+json"
	MimeTypeTextPlain      = "text/plain"
	MimeTypeTextPlainUTF8  = "text/plain; charset=utf-8"
)

MIME type constants.

Variables

This section is empty.

Functions

func DecodeBase64

func DecodeBase64(data []byte) ([]byte, error)

func DecodeBase64Url

func DecodeBase64Url(data []byte) ([]byte, error)

func DecodeMultipart

func DecodeMultipart(r io.Reader, parts []MimeMultipart, ctypeHeader string) (int, error)

func EncodeBase64

func EncodeBase64(data []byte) []byte

func EncodeMultiPart

func EncodeMultiPart(parts []MimeMultipart) (*bytes.Buffer, string, error)

func EncodePkcs7CertsOnly

func EncodePkcs7CertsOnly(certs []*x509.Certificate) ([]byte, error)

func ParsePkcs10Csr

func ParsePkcs10Csr(r io.Reader) (*x509.CertificateRequest, error)

Types

type MimeMultipart

type MimeMultipart struct {
	ContentType string
	Data        interface{}
}

Jump to

Keyboard shortcuts

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