forked from TrueCloudLab/certificates
Rename field to IsCAServerCert
This commit is contained in:
parent
5df1694250
commit
8bd0174251
4 changed files with 16 additions and 16 deletions
|
@ -619,7 +619,7 @@ func (a *Authority) GetTLSCertificate() (*tls.Certificate, error) {
|
||||||
CSR: cr,
|
CSR: cr,
|
||||||
Lifetime: 24 * time.Hour,
|
Lifetime: 24 * time.Hour,
|
||||||
Backdate: 1 * time.Minute,
|
Backdate: 1 * time.Minute,
|
||||||
IsServerCert: true,
|
IsCAServerCert: true,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fatal(err)
|
return fatal(err)
|
||||||
|
|
|
@ -58,7 +58,7 @@ type CreateCertificateRequest struct {
|
||||||
Backdate time.Duration
|
Backdate time.Duration
|
||||||
RequestID string
|
RequestID string
|
||||||
Provisioner *ProvisionerInfo
|
Provisioner *ProvisionerInfo
|
||||||
IsServerCert bool
|
IsCAServerCert bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// ProvisionerInfo contains information of the provisioner used to authorize a
|
// ProvisionerInfo contains information of the provisioner used to authorize a
|
||||||
|
|
|
@ -78,7 +78,7 @@ func (s *StepCAS) CreateCertificate(req *apiv1.CreateCertificateRequest) (*apiv1
|
||||||
info := &raInfo{
|
info := &raInfo{
|
||||||
AuthorityID: s.authorityID,
|
AuthorityID: s.authorityID,
|
||||||
}
|
}
|
||||||
if req.IsServerCert {
|
if req.IsCAServerCert {
|
||||||
info.EndpointID = newServerEndpointID(s.authorityID).String()
|
info.EndpointID = newServerEndpointID(s.authorityID).String()
|
||||||
}
|
}
|
||||||
if p := req.Provisioner; p != nil {
|
if p := req.Provisioner; p != nil {
|
||||||
|
|
|
@ -675,7 +675,7 @@ func TestStepCAS_CreateCertificate(t *testing.T) {
|
||||||
{"ok with server cert", fields{jwk, client, testRootFingerprint}, args{&apiv1.CreateCertificateRequest{
|
{"ok with server cert", fields{jwk, client, testRootFingerprint}, args{&apiv1.CreateCertificateRequest{
|
||||||
CSR: testCR,
|
CSR: testCR,
|
||||||
Lifetime: time.Hour,
|
Lifetime: time.Hour,
|
||||||
IsServerCert: true,
|
IsCAServerCert: true,
|
||||||
}}, &apiv1.CreateCertificateResponse{
|
}}, &apiv1.CreateCertificateResponse{
|
||||||
Certificate: testCrt,
|
Certificate: testCrt,
|
||||||
CertificateChain: []*x509.Certificate{testIssCrt},
|
CertificateChain: []*x509.Certificate{testIssCrt},
|
||||||
|
|
Loading…
Add table
Reference in a new issue