@@ -132,12 +132,12 @@ type CAConfig struct {
132
132
// A CertificateRequest encapsulates the API interface to the
133
133
// certificate request functionality.
134
134
type CertificateRequest struct {
135
- CN string `json:"CN" yaml:"CN"`
136
- Names []Name `json:"names" yaml:"names"`
137
- Hosts []string `json:"hosts" yaml:"hosts"`
138
- KeyRequest * KeyRequest `json:"key,omitempty" yaml:"key,omitempty"`
139
- CA * CAConfig `json:"ca,omitempty" yaml:"ca,omitempty"`
140
- SerialNumber string `json:"serialnumber,omitempty" yaml:"serialnumber,omitempty"`
135
+ CN string `json:"CN" yaml:"CN"`
136
+ Names []Name `json:"names" yaml:"names"`
137
+ Hosts []string `json:"hosts" yaml:"hosts"`
138
+ KeyRequest * KeyRequest `json:"key,omitempty" yaml:"key,omitempty"`
139
+ CA * CAConfig `json:"ca,omitempty" yaml:"ca,omitempty"`
140
+ SerialNumber string `json:"serialnumber,omitempty" yaml:"serialnumber,omitempty"`
141
141
Extensions []pkix.Extension `json:"extensions,omitempty" yaml:"extensions,omitempty"`
142
142
}
143
143
@@ -270,9 +270,9 @@ func getHosts(cert *x509.Certificate) []string {
270
270
}
271
271
272
272
// getNames returns an array of Names from the certificate
273
- // It onnly cares about Country, Organization, OrganizationalUnit, Locality, Province
273
+ // It only cares about Country, Organization, OrganizationalUnit, Locality, Province
274
274
func getNames (sub pkix.Name ) []Name {
275
- // anonymous func for finding the max of a list of interger
275
+ // anonymous func for finding the max of a list of integer
276
276
max := func (v1 int , vn ... int ) (max int ) {
277
277
max = v1
278
278
for i := 0 ; i < len (vn ); i ++ {
@@ -430,12 +430,12 @@ func appendCAInfoToCSR(reqConf *CAConfig, csr *x509.CertificateRequest) error {
430
430
}
431
431
432
432
csr .ExtraExtensions = append (csr .ExtraExtensions , pkix.Extension {
433
- Id : asn1.ObjectIdentifier {2 , 5 , 29 , 19 },
434
- Value : val ,
435
- Critical : true ,
436
- })
433
+ Id : asn1.ObjectIdentifier {2 , 5 , 29 , 19 },
434
+ Value : val ,
435
+ Critical : true ,
436
+ })
437
437
438
- return nil
438
+ return nil
439
439
}
440
440
441
441
// appendCAInfoToCSR appends user-defined extension to a CSR
0 commit comments