forked from TrueCloudLab/certificates
Format code with gofmt -s
This commit is contained in:
parent
7fa06643b2
commit
d574545d94
2 changed files with 14 additions and 14 deletions
|
@ -19,27 +19,27 @@ func TestMatchesOne(t *testing.T) {
|
||||||
exp bool
|
exp bool
|
||||||
}
|
}
|
||||||
tests := map[string]matchesTest{
|
tests := map[string]matchesTest{
|
||||||
"false arg1 empty": matchesTest{
|
"false arg1 empty": {
|
||||||
a: []string{},
|
a: []string{},
|
||||||
b: []string{"https://127.0.0.1:0/sign", "https://test.ca.smallstep.com/sign"},
|
b: []string{"https://127.0.0.1:0/sign", "https://test.ca.smallstep.com/sign"},
|
||||||
exp: false,
|
exp: false,
|
||||||
},
|
},
|
||||||
"false arg2 empty": matchesTest{
|
"false arg2 empty": {
|
||||||
a: []string{"https://127.0.0.1:0/sign", "https://test.ca.smallstep.com/sign"},
|
a: []string{"https://127.0.0.1:0/sign", "https://test.ca.smallstep.com/sign"},
|
||||||
b: []string{},
|
b: []string{},
|
||||||
exp: false,
|
exp: false,
|
||||||
},
|
},
|
||||||
"false arg1,arg2 empty": matchesTest{
|
"false arg1,arg2 empty": {
|
||||||
a: []string{"https://127.0.0.1:0/sign", "https://test.ca.smallstep.com/sign"},
|
a: []string{"https://127.0.0.1:0/sign", "https://test.ca.smallstep.com/sign"},
|
||||||
b: []string{"step-gateway", "step-cli"},
|
b: []string{"step-gateway", "step-cli"},
|
||||||
exp: false,
|
exp: false,
|
||||||
},
|
},
|
||||||
"false": matchesTest{
|
"false": {
|
||||||
a: []string{"step-gateway", "step-cli"},
|
a: []string{"step-gateway", "step-cli"},
|
||||||
b: []string{"https://127.0.0.1:0/sign", "https://test.ca.smallstep.com/sign"},
|
b: []string{"https://127.0.0.1:0/sign", "https://test.ca.smallstep.com/sign"},
|
||||||
exp: false,
|
exp: false,
|
||||||
},
|
},
|
||||||
"true": matchesTest{
|
"true": {
|
||||||
a: []string{"step-gateway", "https://test.ca.smallstep.com/sign"},
|
a: []string{"step-gateway", "https://test.ca.smallstep.com/sign"},
|
||||||
b: []string{"https://127.0.0.1:0/sign", "https://test.ca.smallstep.com/sign"},
|
b: []string{"https://127.0.0.1:0/sign", "https://test.ca.smallstep.com/sign"},
|
||||||
exp: true,
|
exp: true,
|
||||||
|
|
|
@ -195,15 +195,15 @@ func (a *Authority) Renew(ocx *x509.Certificate) (*x509.Certificate, *x509.Certi
|
||||||
ExtKeyUsage: oldCert.ExtKeyUsage,
|
ExtKeyUsage: oldCert.ExtKeyUsage,
|
||||||
UnknownExtKeyUsage: oldCert.UnknownExtKeyUsage,
|
UnknownExtKeyUsage: oldCert.UnknownExtKeyUsage,
|
||||||
BasicConstraintsValid: oldCert.BasicConstraintsValid,
|
BasicConstraintsValid: oldCert.BasicConstraintsValid,
|
||||||
IsCA: oldCert.IsCA,
|
IsCA: oldCert.IsCA,
|
||||||
MaxPathLen: oldCert.MaxPathLen,
|
MaxPathLen: oldCert.MaxPathLen,
|
||||||
MaxPathLenZero: oldCert.MaxPathLenZero,
|
MaxPathLenZero: oldCert.MaxPathLenZero,
|
||||||
OCSPServer: oldCert.OCSPServer,
|
OCSPServer: oldCert.OCSPServer,
|
||||||
IssuingCertificateURL: oldCert.IssuingCertificateURL,
|
IssuingCertificateURL: oldCert.IssuingCertificateURL,
|
||||||
DNSNames: oldCert.DNSNames,
|
DNSNames: oldCert.DNSNames,
|
||||||
EmailAddresses: oldCert.EmailAddresses,
|
EmailAddresses: oldCert.EmailAddresses,
|
||||||
IPAddresses: oldCert.IPAddresses,
|
IPAddresses: oldCert.IPAddresses,
|
||||||
URIs: oldCert.URIs,
|
URIs: oldCert.URIs,
|
||||||
PermittedDNSDomainsCritical: oldCert.PermittedDNSDomainsCritical,
|
PermittedDNSDomainsCritical: oldCert.PermittedDNSDomainsCritical,
|
||||||
PermittedDNSDomains: oldCert.PermittedDNSDomains,
|
PermittedDNSDomains: oldCert.PermittedDNSDomains,
|
||||||
ExcludedDNSDomains: oldCert.ExcludedDNSDomains,
|
ExcludedDNSDomains: oldCert.ExcludedDNSDomains,
|
||||||
|
|
Loading…
Reference in a new issue