Merge pull request #694 from Random-Liu/address-comments-in-#681
Make const private.
This commit is contained in:
commit
c63c357d2d
@ -43,10 +43,10 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// OrganizationName is is the name of this organization, used for certificates etc.
|
// certOrganizationName is the name of this organization, used for certificates etc.
|
||||||
OrganizationName = "containerd"
|
certOrganizationName = "containerd"
|
||||||
// CRIName is the common name of the CRI plugin
|
// certCommonName is the common name of the CRI plugin
|
||||||
CRIName = "cri"
|
certCommonName = "cri"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newStreamServer(c *criService, addr, port string) (streaming.Server, error) {
|
func newStreamServer(c *criService, addr, port string) (streaming.Server, error) {
|
||||||
@ -182,8 +182,8 @@ func newTLSCert() (tls.Certificate, error) {
|
|||||||
NotAfter: time.Now().AddDate(years, 0, 0),
|
NotAfter: time.Now().AddDate(years, 0, 0),
|
||||||
SerialNumber: serialNumber,
|
SerialNumber: serialNumber,
|
||||||
Subject: pkix.Name{
|
Subject: pkix.Name{
|
||||||
CommonName: fmt.Sprintf("%s:%s:%s", OrganizationName, CRIName, hostName),
|
CommonName: fmt.Sprintf("%s:%s:%s", certOrganizationName, certCommonName, hostName),
|
||||||
Organization: []string{OrganizationName},
|
Organization: []string{certOrganizationName},
|
||||||
},
|
},
|
||||||
BasicConstraintsValid: true,
|
BasicConstraintsValid: true,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user