Documentation ¶
Index ¶
- Variables
- func CreateCsr(commonName string, country string, state string, city string, ...) ([]byte, []byte, error)
- func Get(url string, headers map[string]string, serverCert []byte) ([]byte, error)
- func PKCS7ToPEM(data []byte) ([]byte, error)
- func Post(url string, data []byte, headers map[string]string, username string, ...) ([]byte, error)
- func Send(method string, url string, data []byte, headers map[string]string, ...) ([]byte, error)
- type Client
Constants ¶
This section is empty.
Variables ¶
View Source
var TLSConfig *tls.Config
Functions ¶
func CreateCsr ¶
func CreateCsr(commonName string, country string, state string, city string, organization string, organizationalUnit string, emailAddress string) ([]byte, []byte, error)
CreateCsr generates a key pair, creates a CSR and returns the private key and CSR in PEM format.
func PKCS7ToPEM ¶
PKCS7ToPEM converts PKCS7 formatted data to PEM formatted data.
func Post ¶
func Post(url string, data []byte, headers map[string]string, username string, password string, clientCert []byte, clientKey []byte, serverCert []byte) ([]byte, error)
Post issues an HTTP POST request. username and password are used for basic auth. clientKey and clientCert are used for TLS auth. Returns the response body.
Types ¶
type Client ¶
Client represents and EST client.
func (*Client) SimpleEnroll ¶
SimpleEnroll issues an EST POST /simpleenroll request. Takes a CSR in PEM format and returns the signed cert in PEM format.
func (*Client) SimpleReenroll ¶
SimpleReenroll issues an EST POST /simplereenroll request. Takes a CSR in PEM format and returns the signed cert in PEM format. You can also pass a client cert/key for authentication.
Click to show internal directories.
Click to hide internal directories.