Allow setting path length

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19610 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-12-31 01:37:10 +00:00
parent ab8e83ff53
commit 7a0bda61c8
2 changed files with 7 additions and 2 deletions

View File

@@ -471,6 +471,11 @@ command = {
type = "string"
help = "Lifetime of certificate"
}
option = {
long = "path-length"
type = "integer"
help = "Maximum path length (for CA or proxy certificates)"
}
option = {
long = "hostname"
type = "strings"

View File

@@ -1339,12 +1339,12 @@ hxtool_ca(struct certificate_sign_options *opt, int argc, char **argv)
eval_types(context, tbs, opt);
if (opt->issue_ca_flag) {
ret = hx509_ca_tbs_set_ca(context, tbs, -1);
ret = hx509_ca_tbs_set_ca(context, tbs, opt->path_length_integer);
if (ret)
hx509_err(context, ret, 1, "hx509_ca_tbs_set_ca");
}
if (opt->issue_proxy_flag) {
ret = hx509_ca_tbs_set_proxy(context, tbs, 1);
ret = hx509_ca_tbs_set_proxy(context, tbs, opt->path_length_integer);
if (ret)
hx509_err(context, ret, 1, "hx509_ca_tbs_set_proxy");
}