Documentation ¶
Overview ¶
PulseHA - HA Cluster Daemon Copyright (C) 2017-2020 Andrew Zak <andrew@linux.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- Constants
- func GenTLSKeys(ip string) error
- func GenerateCACert(ip string)
- func GenerateCerts(ip string, caCert *x509.Certificate, caKey *rsa.PrivateKey)
- func GenerateClientCert(caCert *x509.Certificate, caKey *rsa.PrivateKey)
- func GenerateSHA256Hash(str string) string
- func GenerateServerCert(ip string, caCert *x509.Certificate, caKey *rsa.PrivateKey)
- func SHA256StringValidation(str string, strHash string) bool
- func WriteCertFile(fileName string, cert []byte)
- func WriteKeyFile(fileName string, key []byte)
- func WriteKeyFileFromRSAKey(filename string, key *rsa.PrivateKey)
Constants ¶
const CertDir = "/etc/pulseha/certs/"
Variables ¶
This section is empty.
Functions ¶
func GenerateCerts ¶
func GenerateCerts(ip string, caCert *x509.Certificate, caKey *rsa.PrivateKey)
Generate certs
func GenerateClientCert ¶
func GenerateClientCert(caCert *x509.Certificate, caKey *rsa.PrivateKey)
*
func GenerateSHA256Hash ¶
GenerateSHA256Hash - Generate a sha256 hash for a particular string
func GenerateServerCert ¶
func GenerateServerCert(ip string, caCert *x509.Certificate, caKey *rsa.PrivateKey)
*
func SHA256StringValidation ¶
SHA256StringValidation - Validate a string matches a generated hash
func WriteKeyFile ¶
func WriteKeyFileFromRSAKey ¶
func WriteKeyFileFromRSAKey(filename string, key *rsa.PrivateKey)
* TODO: Use Utils functions
Types ¶
This section is empty.