Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
653b0272
Unverified
Commit
653b0272
authored
Oct 13, 2018
by
k8s-ci-robot
Committed by
GitHub
Oct 13, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #69646 from zhouhaozz/delete-cert
certs: Delete useless code
parents
1ba56437
081cf496
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
13 deletions
+0
-13
certs.go
cmd/kubeadm/app/phases/certs/certs.go
+0
-13
No files found.
cmd/kubeadm/app/phases/certs/certs.go
View file @
653b0272
...
...
@@ -145,19 +145,6 @@ func CreateCertAndKeyFilesWithCA(certSpec *KubeadmCert, caCertSpec *KubeadmCert,
return
certSpec
.
CreateFromCA
(
cfg
,
caCert
,
caKey
)
}
func
newCertAndKeyFromSpec
(
certSpec
*
KubeadmCert
,
cfg
*
kubeadmapi
.
InitConfiguration
,
caCert
*
x509
.
Certificate
,
caKey
*
rsa
.
PrivateKey
)
(
*
x509
.
Certificate
,
*
rsa
.
PrivateKey
,
error
)
{
certConfig
,
err
:=
certSpec
.
GetConfig
(
cfg
)
if
err
!=
nil
{
return
nil
,
nil
,
fmt
.
Errorf
(
"failure while creating certificate %s: %v"
,
certSpec
.
Name
,
err
)
}
cert
,
key
,
err
:=
pkiutil
.
NewCertAndKey
(
caCert
,
caKey
,
certConfig
)
if
err
!=
nil
{
return
nil
,
nil
,
fmt
.
Errorf
(
"failure while creating %s key and certificate: %v"
,
certSpec
.
Name
,
err
)
}
return
cert
,
key
,
err
}
// LoadCertificateAuthority tries to load a CA in the given directory with the given name.
func
LoadCertificateAuthority
(
pkiDir
string
,
baseName
string
)
(
*
x509
.
Certificate
,
*
rsa
.
PrivateKey
,
error
)
{
// Checks if certificate authority exists in the PKI directory
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment