Documentation ¶
Index ¶
- Constants
- func DecodeBase64(data []byte) ([]byte, error)
- func DecodeBase64Url(data []byte) ([]byte, error)
- func DecodeMultipart(r io.Reader, parts []MimeMultipart, ctypeHeader string) (int, error)
- func EncodeBase64(data []byte) []byte
- func EncodeMultiPart(parts []MimeMultipart) (*bytes.Buffer, string, error)
- func EncodePkcs7CertsOnly(certs []*x509.Certificate) ([]byte, error)
- func ParsePkcs10Csr(r io.Reader) (*x509.CertificateRequest, error)
- type MimeMultipart
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 DecodeBase64Url ¶
func DecodeMultipart ¶
func EncodeBase64 ¶
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{} }
Click to show internal directories.
Click to hide internal directories.