certificates

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Copyright The Pharmer Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The Pharmer Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The Pharmer Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAdminCertificate

func CreateAdminCertificate(caCert *x509.Certificate, caKey crypto.Signer) (*x509.Certificate, *rsa.PrivateKey, error)

func CreateCACertificates

func CreateCACertificates(storeProvider store.CertificateStore) (*x509.Certificate, *rsa.PrivateKey, error)

func CreateCertificates

func CreateCertificates(certStore store.CertificateStore, name, commonName string) (*x509.Certificate, *rsa.PrivateKey, error)

func CreateEtcdCACertificate

func CreateEtcdCACertificate(storeProvider store.CertificateStore) (*x509.Certificate, *rsa.PrivateKey, error)

func CreateFrontProxyCACertificates

func CreateFrontProxyCACertificates(storeProvider store.CertificateStore) (*x509.Certificate, *rsa.PrivateKey, error)

func CreateSACertificate

func CreateSACertificate(storeProvider store.CertificateStore) (*x509.Certificate, *rsa.PrivateKey, error)

func CreateSSHKey

func CreateSSHKey(storeProvider store.SSHKeyStore, name string) ([]byte, []byte, error)

func GenSSHKeyName

func GenSSHKeyName(clusterName string) string

TODO: move

func GetAdminCertificate

func GetAdminCertificate(certStore store.CertificateStore) (*x509.Certificate, *rsa.PrivateKey, error)

func LoadCACertificates

func LoadCACertificates(certStore store.CertificateStore, name string) (*x509.Certificate, *rsa.PrivateKey, error)

func LoadSSHKey

func LoadSSHKey(keyStore store.SSHKeyStore, keyName string) (*ssh.SSHKey, error)

Types

type CertKeyPair

type CertKeyPair struct {
	Cert *x509.Certificate
	Key  *rsa.PrivateKey
}

type Certificates

type Certificates struct {
	CACert             CertKeyPair
	FrontProxyCACert   CertKeyPair
	ServiceAccountCert CertKeyPair
	EtcdCACert         CertKeyPair
	SSHKey             *ssh.SSHKey
}

func CreateCertsKeys

func CreateCertsKeys(store store.ResourceInterface, clusterName string) (*Certificates, error)

func GetPharmerCerts

func GetPharmerCerts(storeProvider store.ResourceInterface, clusterName string) (*Certificates, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL