diff options
author | Gibheer <gibheer@gmail.com> | 2015-03-24 21:21:02 +0100 |
---|---|---|
committer | Gibheer <gibheer@gmail.com> | 2015-03-24 21:21:02 +0100 |
commit | bb41ff218a14b6597607408de6efed37cc8dae40 (patch) | |
tree | 5214673ba18b66644f1b160149ae1c19e4d00f2f /main.go | |
parent | c69f4de8ce0ada8c99df1543039f188f845cf342 (diff) |
add start and end date to certificates
This adds the start and end date flags for certificate generation and
also a flag to define, if the resulting certificate should be a CA or
not.
Next step in the implementation is to define the key usages.
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -6,7 +6,6 @@ import ( "fmt" "io" "io/ioutil" - "math/big" "os" "github.com/gibheer/pki" @@ -119,17 +118,15 @@ func create_sign_request(cmd *Command, args []string) { } func create_cert(cmd *Command, args []string) { - err := checkFlags(checkPrivateKey, checkOutput, checkCSR) + err := checkFlags(checkPrivateKey, checkOutput, checkCSR, checkCertFlags) if err != nil { crash_with_help(cmd, ErrorFlagInput, "Flags invalid: %s", err) } // TODO implement flags for all certificate options - cert_opts := pki.CertificateOptions{} - cert_opts.SerialNumber = big.NewInt(1) cert, err := FlagCertificateSignRequest.ToCertificate( FlagPrivateKey, - cert_opts, + FlagCertificateGeneration, nil, ) if err != nil { crash_with_help(cmd, ErrorProgram, "Error generating certificate: %s", err) } |