Documentation
¶
Index ¶
- func GinHandler(router *gin.Engine, server_cert *CertSetup, httpAddr string) (err ftp_context.LogErr)
- func LoadCert(name string, directory string, cert *CertSetup) (err ftp_context.LogErr)
- func TLSClient(caPEMs ...*bytes.Buffer) (tc *http.Client)
- type CAJson
- type CertData
- type CertSetup
- type NotAfterStruct
- type TlsCertJson
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GinHandler ¶
Types ¶
type CAJson ¶ added in v0.3.4
type CAJson struct {
CertData CertData `json:"cert_data"`
PrivKey *rsa.PrivateKey `json:"private_key"`
PEM string `json:"pem"`
PrivKeyPEM string `json:"private_key_pem"`
// contains filtered or unexported fields
}
type CertData ¶
type CertData struct {
ftp_filehandler.FileBasic
Organization string `json:"organisation"`
Country string `json:"country"`
Province string `json:"province"`
Locality string `json:"locality"`
StreetAddress string `json:"street_address"`
PostalCode string `json:"postal_code"`
NotAfter NotAfterStruct `json:"add_date"`
IPAddrresses []net.IP `json:"ip_addresses"`
}
type CertSetup ¶
type CertSetup struct {
ftp_filehandler.FileBasic
CertData *CertData `json:"cert_data"`
PrivKey *rsa.PrivateKey `json:"private_key"`
PEM *bytes.Buffer `json:"pem"`
PrivKeyPEM *bytes.Buffer `json:"private_key_pem"`
TlsCert *TlsCertJson `json:"tls_cert"`
// contains filtered or unexported fields
}
func (CertSetup) NewServerCert ¶
func (CertSetup) ServerTlsConfig ¶
func (CertSetup) UnderlyingError ¶
type NotAfterStruct ¶
type TlsCertJson ¶ added in v0.3.3
type TlsCertJson struct {
tls.Certificate
Cert [][]byte `json:"certificate"`
// PrivateKey contains the private key corresponding to the public key in
// Leaf. This must implement crypto.Signer with an RSA, ECDSA or Ed25519 PublicKey.
// For a server up to TLS 1.2, it can also implement crypto.Decrypter with
// an RSA PublicKey.
PrivKey crypto.PrivateKey `json:"private_key"`
// SupportedSignatureAlgorithms is an optional list restricting what
// signature algorithms the PrivateKey can be used for.
SSA []tls.SignatureScheme `json:"supported_signature_algorithms"`
// OCSPStaple contains an optional OCSP response which will be served
// to clients that request it.
OCSPS []byte `json:"OCSP_staple"`
// SignedCertificateTimestamps contains an optional list of Signed
// Certificate Timestamps which will be served to clients that request it.
SCT [][]byte `json:"signed_certificate_timestamps"`
// Leaf is the parsed form of the leaf certificate, which may be initialized
// using x509.ParseCertificate to reduce per-handshake processing. If nil,
// the leaf certificate will be parsed as needed.
L *x509.Certificate `json:"leaf"`
}
func NewTlsCertJson ¶ added in v0.3.3
func NewTlsCertJson(tlc tls.Certificate) *TlsCertJson
Click to show internal directories.
Click to hide internal directories.