Extract new keyutil package from client-go/util/cert

This package contains public/private key utilities copied directly from
client-go/util/cert. All imports were updated.

Future PRs will actually refactor the libraries.

Updates #71004

Kubernetes-commit: 18458392ca24c85c688e655aace1afd04f864cbd
This commit is contained in:
Andrew Lytvynov
2018-12-09 16:24:38 -08:00
committed by Kubernetes Publisher
parent 12a0647ebb
commit ba851ad197
8 changed files with 343 additions and 311 deletions

View File

@@ -23,6 +23,8 @@ import (
"io/ioutil"
"net"
"testing"
"k8s.io/client-go/util/keyutil"
)
func TestMakeCSR(t *testing.T) {
@@ -37,7 +39,7 @@ func TestMakeCSR(t *testing.T) {
if err != nil {
t.Fatal(err)
}
key, err := ParsePrivateKeyPEM(keyData)
key, err := keyutil.ParsePrivateKeyPEM(keyData)
if err != nil {
t.Fatal(err)
}