Remove old PKI

This commit is contained in:
nemunaire 2018-01-21 14:12:02 +01:00
parent e083da2f72
commit 992221a6da
5 changed files with 1 additions and 576 deletions

View file

@ -1,35 +1,4 @@
package fic
import (
"os/exec"
)
func convOutput(in []byte, err error) (string, error) {
return string(in), err
}
func GenerateCA() (string, error) {
// Call the script and return its standard and error output
cmd := exec.Command("/bin/bash", "./CA.sh", "-newca")
return convOutput(cmd.CombinedOutput())
}
func GenerateCRL() (string, error) {
cmd := exec.Command("/bin/bash", "./CA.sh", "-gencrl")
return convOutput(cmd.CombinedOutput())
}
func (t Team) GenerateCert() (string, error) {
cmd := exec.Command("/bin/bash", "./CA.sh", "-newclient", t.InitialName)
return convOutput(cmd.CombinedOutput())
}
func (t Team) RevokeCert() (string, error) {
cmd := exec.Command("/bin/bash", "./CA.sh", "-revoke", t.InitialName)
return convOutput(cmd.CombinedOutput())
}