+13
-13
lines changedFilter options
+13
-13
lines changed Original file line number Diff line number Diff line change
@@ -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
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4