2020-09-09 02:26:32 +00:00
|
|
|
package apiv1
|
|
|
|
|
|
|
|
import (
|
|
|
|
"crypto/x509"
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
2020-09-15 02:12:49 +00:00
|
|
|
// CreateCertificateRequest is the request used to sign a new certificate.
|
2020-09-09 02:26:32 +00:00
|
|
|
type CreateCertificateRequest struct {
|
2020-09-10 23:19:18 +00:00
|
|
|
Template *x509.Certificate
|
|
|
|
Lifetime time.Duration
|
|
|
|
Backdate time.Duration
|
2020-09-09 02:26:32 +00:00
|
|
|
RequestID string
|
|
|
|
}
|
2020-09-15 02:12:49 +00:00
|
|
|
|
|
|
|
// CreateCertificateResponse is the response to a create certificate request.
|
2020-09-09 02:26:32 +00:00
|
|
|
type CreateCertificateResponse struct {
|
|
|
|
Certificate *x509.Certificate
|
|
|
|
CertificateChain []*x509.Certificate
|
|
|
|
}
|
|
|
|
|
2020-09-15 02:12:49 +00:00
|
|
|
// RenewCertificateRequest is the request used to re-sign a certificate.
|
2020-09-10 23:19:18 +00:00
|
|
|
type RenewCertificateRequest struct {
|
|
|
|
Template *x509.Certificate
|
|
|
|
Lifetime time.Duration
|
|
|
|
Backdate time.Duration
|
|
|
|
RequestID string
|
|
|
|
}
|
2020-09-15 02:12:49 +00:00
|
|
|
|
|
|
|
// RenewCertificateResponse is the response to a renew certificate request.
|
2020-09-10 23:19:18 +00:00
|
|
|
type RenewCertificateResponse struct {
|
|
|
|
Certificate *x509.Certificate
|
|
|
|
CertificateChain []*x509.Certificate
|
|
|
|
}
|
2020-09-09 02:26:32 +00:00
|
|
|
|
2020-09-10 23:19:18 +00:00
|
|
|
// RevokeCertificateRequest is the request used to revoke a certificate.
|
|
|
|
type RevokeCertificateRequest struct {
|
|
|
|
Certificate *x509.Certificate
|
2020-09-15 02:12:49 +00:00
|
|
|
Reason string
|
|
|
|
ReasonCode int
|
|
|
|
RequestID string
|
2020-09-10 23:19:18 +00:00
|
|
|
}
|
2020-09-15 02:12:49 +00:00
|
|
|
|
|
|
|
// RevokeCertificateResponse is the response to a revoke certificate request.
|
2020-09-10 23:19:18 +00:00
|
|
|
type RevokeCertificateResponse struct {
|
|
|
|
Certificate *x509.Certificate
|
|
|
|
CertificateChain []*x509.Certificate
|
|
|
|
}
|