Make const private.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu 2018-03-23 00:48:50 +00:00
parent 5ae4de1cc2
commit 55d512b98c

View File

@ -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,
} }