Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for WritePublicKey (0.25 sec)

  1. cmd/kubeadm/app/util/pkiutil/pki_helpers.go

    		return errors.Wrapf(err, "unable to write CSR to file %s", csrPath)
    	}
    
    	return nil
    }
    
    // WritePublicKey stores the given public key at the given location
    func WritePublicKey(pkiPath, name string, key crypto.PublicKey) error {
    	if key == nil {
    		return errors.New("public key cannot be nil when writing to file")
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/phases/certs/certs.go

    	if err := pkiutil.WriteKey(certsDir, kubeadmconstants.ServiceAccountKeyBaseName, key); err != nil {
    		return err
    	}
    
    	return pkiutil.WritePublicKey(certsDir, kubeadmconstants.ServiceAccountKeyBaseName, key.Public())
    }
    
    // CreateCACertAndKeyFiles generates and writes out a given certificate authority.
    // The certSpec should be one of the variables from this package.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Dec 05 10:17:14 UTC 2023
    - 19.4K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/util/pkiutil/pki_helpers_test.go

    		)
    	}
    }
    
    func TestWritePublicKey(t *testing.T) {
    	tmpdir, err := os.MkdirTemp("", "")
    	if err != nil {
    		t.Fatalf("Couldn't create tmpdir")
    	}
    	defer os.RemoveAll(tmpdir)
    
    	actual := WritePublicKey(tmpdir, "foo", rootCAKey.Public())
    	if actual != nil {
    		t.Errorf(
    			"failed WriteCertAndKey with an error: %v",
    			actual,
    		)
    	}
    }
    
    func TestCertOrKeyExist(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 31 21:49:21 UTC 2024
    - 22.5K bytes
    - Viewed (0)
Back to top