Documentation
¶
Index ¶
- func CertInfoHandler(w http.ResponseWriter, r *http.Request)
- func CheckRevokedHandler(w http.ResponseWriter, r *http.Request)
- func DecryptHandler(w http.ResponseWriter, r *http.Request)
- func EncryptHandler(w http.ResponseWriter, r *http.Request)
- func GenCRLHandler(w http.ResponseWriter, r *http.Request)
- func GenCSRHandler(w http.ResponseWriter, r *http.Request)
- func GenRootCAHandler(w http.ResponseWriter, r *http.Request)
- func SignCSRHandler(w http.ResponseWriter, r *http.Request)
- func SignCertHandler(w http.ResponseWriter, r *http.Request)
- func SignHandler(w http.ResponseWriter, r *http.Request)
- func StartServer(host string, port int, staticDir, version string) error
- func ValidateChainHandler(w http.ResponseWriter, r *http.Request)
- func VerifyHandler(w http.ResponseWriter, r *http.Request)
- func VersionHandler(version string) http.HandlerFunc
- func ViewCRLHandler(w http.ResponseWriter, r *http.Request)
- type CertInfoRequest
- type CheckRevokedRequest
- type DecryptRequest
- type EncryptRequest
- type GenCRLRequest
- type GenCSRRequest
- type GenRootCARequest
- type Response
- type SignCSRRequest
- type SignCertRequest
- type SignRequest
- type ValidateChainRequest
- type VerifyRequest
- type ViewCRLRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertInfoHandler ¶ added in v0.2.0
func CertInfoHandler(w http.ResponseWriter, r *http.Request)
CertInfoHandler 查看证书信息处理器
func CheckRevokedHandler ¶ added in v0.2.0
func CheckRevokedHandler(w http.ResponseWriter, r *http.Request)
CheckRevokedHandler 检查证书吊销状态处理器
func DecryptHandler ¶
func DecryptHandler(w http.ResponseWriter, r *http.Request)
DecryptHandler 解密处理器
func EncryptHandler ¶
func EncryptHandler(w http.ResponseWriter, r *http.Request)
EncryptHandler 加密处理器
func GenCRLHandler ¶ added in v0.2.0
func GenCRLHandler(w http.ResponseWriter, r *http.Request)
GenCRLHandler 生成 CRL 处理器
func GenCSRHandler ¶ added in v0.2.0
func GenCSRHandler(w http.ResponseWriter, r *http.Request)
GenCSRHandler 生成 CSR 处理器
func GenRootCAHandler ¶
func GenRootCAHandler(w http.ResponseWriter, r *http.Request)
GenRootCAHandler 生成根证书处理器
func SignCSRHandler ¶ added in v0.2.0
func SignCSRHandler(w http.ResponseWriter, r *http.Request)
SignCSRHandler 签发 CSR 处理器
func SignCertHandler ¶
func SignCertHandler(w http.ResponseWriter, r *http.Request)
SignCertHandler 签发证书处理器
func StartServer ¶
StartServer 启动 Web 服务器
func ValidateChainHandler ¶
func ValidateChainHandler(w http.ResponseWriter, r *http.Request)
ValidateChainHandler 验证证书链处理器
func ViewCRLHandler ¶ added in v0.2.0
func ViewCRLHandler(w http.ResponseWriter, r *http.Request)
ViewCRLHandler 查看 CRL 处理器
Types ¶
type CertInfoRequest ¶ added in v0.2.0
type CertInfoRequest struct {
Cert string `json:"cert"`
}
CertInfoRequest 查看证书信息请求
type CheckRevokedRequest ¶ added in v0.2.0
CheckRevokedRequest 检查证书吊销状态请求
type DecryptRequest ¶
DecryptRequest 解密请求
type EncryptRequest ¶
EncryptRequest 加密请求
type GenCRLRequest ¶ added in v0.2.0
type GenCRLRequest struct {
CACert string `json:"caCert"`
CAKey string `json:"caKey"`
RevokedCerts []string `json:"revokedCerts"`
ExistingCRL string `json:"existingCRL"`
SkipExpired bool `json:"skipExpired"`
PruneAfterDays int `json:"pruneAfterDays"`
Days int `json:"days"`
}
GenCRLRequest 生成 CRL 请求
type GenCSRRequest ¶ added in v0.2.0
type GenCSRRequest struct {
Algorithm string `json:"algorithm"`
RSABits int `json:"rsaBits"`
ECDSACurve string `json:"ecdsaCurve"`
CommonName string `json:"commonName"`
Org string `json:"org"`
Country string `json:"country"`
State string `json:"state"`
Locality string `json:"locality"`
DNSNames string `json:"dnsNames"`
IPAddrs string `json:"ipAddrs"`
}
GenCSRRequest 生成 CSR 请求
type GenRootCARequest ¶
type GenRootCARequest struct {
Algorithm string `json:"algorithm"`
RSABits int `json:"rsaBits"`
ECDSACurve string `json:"ecdsaCurve"`
Days int `json:"days"`
CommonName string `json:"commonName"`
Org string `json:"org"`
Country string `json:"country"`
State string `json:"state"`
Locality string `json:"locality"`
MaxPathLen int `json:"maxPathLen"`
PathLenZero bool `json:"pathLenZero"`
}
GenRootCARequest 生成根证书请求
type Response ¶
type Response struct {
Success bool `json:"success"`
Message string `json:"message,omitempty"`
Data interface{} `json:"data,omitempty"`
Error string `json:"error,omitempty"`
}
Response 通用响应结构
type SignCSRRequest ¶ added in v0.2.0
type SignCSRRequest struct {
CACert string `json:"caCert"`
CAKey string `json:"caKey"`
CSR string `json:"csr"`
Days int `json:"days"`
Usage string `json:"usage"`
IsCA bool `json:"isCA"`
}
SignCSRRequest 签发 CSR 请求
type SignCertRequest ¶
type SignCertRequest struct {
CACert string `json:"caCert"`
CAKey string `json:"caKey"`
Algorithm string `json:"algorithm"`
RSABits int `json:"rsaBits"`
ECDSACurve string `json:"ecdsaCurve"`
Days int `json:"days"`
CommonName string `json:"commonName"`
Org string `json:"org"`
Country string `json:"country"`
DNSNames string `json:"dnsNames"`
IPAddrs string `json:"ipAddrs"`
Usage string `json:"usage"`
IsCA bool `json:"isCA"`
}
SignCertRequest 签发证书请求
type SignRequest ¶
SignRequest 签名请求
type ValidateChainRequest ¶
type ValidateChainRequest struct {
CACert string `json:"caCert"`
Cert string `json:"cert"`
IntermediateCAs []string `json:"intermediateCAs"`
DNSName string `json:"dnsName"`
Usage string `json:"usage"`
}
ValidateChainRequest 验证证书链请求
type VerifyRequest ¶
type VerifyRequest struct {
Cert string `json:"cert"`
Data string `json:"data"`
Signature string `json:"signature"`
}
VerifyRequest 验签请求
type ViewCRLRequest ¶ added in v0.2.0
type ViewCRLRequest struct {
CRL string `json:"crl"`
}
ViewCRLRequest 查看 CRL 请求
Click to show internal directories.
Click to hide internal directories.