go-certcentral
所属分类:CA认证
开发工具:GO
文件大小:0KB
下载次数:0
上传日期:2022-08-23 14:58:03
上 传 者:
sh-1993
说明: DigiCert证书中心API的GoLang客户端。,
(GoLang client for the DigiCert cert-central API.,)
文件列表:
LICENSE (11357, 2021-03-01)
Makefile (782, 2021-03-01)
VERSION (7, 2021-03-01)
certificate.go (5111, 2021-03-01)
client.go (2414, 2021-03-01)
container.go (146, 2021-03-01)
dcv.go (547, 2021-03-01)
domain.go (1646, 2021-03-01)
error.go (271, 2021-03-01)
go.mod (48, 2021-03-01)
go.sum (0, 2021-03-01)
options.go (213, 2021-03-01)
order.go (4293, 2021-03-01)
organization.go (2581, 2021-03-01)
product.go (1027, 2021-03-01)
server_platform.go (764, 2021-03-01)
status.go (201, 2021-03-01)
user.go (415, 2021-03-01)
util.go (1357, 2021-03-01)
validation.go (478, 2021-03-01)
go-certcentral
--------------
GoLang client for the [DigiCert cert-central services API](https://dev.digicert.com/services-api).
# Usage
```go
import cc "github.com/sapcc/go-certcentral"
client, err := cc.New(&cc.Options{
Token: "DIGICERT_API_TOKEN",
IsDebug: false,
})
handleError(err)
// Submit a certificate order.
orderResponse, err := cli.SubmitOrder(
cc.Order{
Certificate: cc.Certificate{
CommonName: csr.Subject.CommonName,
DNSNames: csr.DNSNames,
CSR: csr.PEM,
ServerPlatform: cc.ServerPlatformForType(cc.ServerPlatformTypes.Nginx),
SignatureHash: cc.SignatureHashes.SHA256,
CaCertID: "CACertID",
OrganizationUnits: []string{
"SomeOrganization ",
},
},
ValidityYears: 1,
DisableRenewalNotifications: true,
PaymentMethod: cc.PaymentMethods.Balance,
SkipApproval: true,
Organization: &cc.Organization{ID: 123456},
}, cc.OrderTypes.PrivateSSLPlus)
handleError(err)
// If auto-approval is allowed the response contains the full chain of certificates in PEM format.
if len(orderResponse.CertificateChain) > 0 {
crtChain, err := orderResponse.DecodeCertificateChain()
handleError(err)
for _, crt := range crtChain {
fmt.Println(crt.Subject.CommonName)
}
}
// Download the certificate(s) for an order.
certList, err := client.DownloadCertificateForOrder("123456", cc.CertificateFormats.PEMAll)
handlerError(err)
for _, cert := range certList {
fmt.Println(cert.Subject.CommonName)
}
```
近期下载者:
相关文件:
收藏者: