merge new-crypto branch
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5332 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -55,6 +55,7 @@ char *renew_life = NULL;
|
||||
char *server = NULL;
|
||||
char *cred_cache = NULL;
|
||||
char *start_str = NULL;
|
||||
struct getarg_strings etype_str;
|
||||
int use_keytab = 0;
|
||||
char *keytab_str = NULL;
|
||||
#ifdef KRB4
|
||||
@@ -73,9 +74,6 @@ struct getargs args[] = {
|
||||
{ "cache", 'c', arg_string, &cred_cache,
|
||||
"credentials cache", "cachename" },
|
||||
|
||||
{ "cache", 'c', arg_string, &cred_cache,
|
||||
"credentials cache", "cachename" },
|
||||
|
||||
{ "forwardable", 'f', arg_flag, &forwardable,
|
||||
"get forwardable tickets"},
|
||||
|
||||
@@ -109,6 +107,9 @@ struct getargs args[] = {
|
||||
{ "validate", 'v', arg_flag, &validate_flag,
|
||||
"validate TGT" },
|
||||
|
||||
{ "enctypes", 'e', arg_strings, &etype_str,
|
||||
"encryption type to use", "enctype" },
|
||||
|
||||
{ "version", 0, arg_flag, &version_flag },
|
||||
{ "help", 0, arg_flag, &help_flag }
|
||||
};
|
||||
@@ -272,6 +273,23 @@ main (int argc, char **argv)
|
||||
start_time = tmp;
|
||||
}
|
||||
|
||||
if(etype_str.num_strings) {
|
||||
krb5_enctype *enctype = NULL;
|
||||
int i;
|
||||
enctype = malloc(etype_str.num_strings * sizeof(*enctype));
|
||||
if(enctype == NULL)
|
||||
errx(1, "out of memory");
|
||||
for(i = 0; i < etype_str.num_strings; i++) {
|
||||
ret = krb5_string_to_enctype(context,
|
||||
etype_str.strings[i],
|
||||
&enctype[i]);
|
||||
if(ret)
|
||||
errx(1, "unrecognized enctype: %s", etype_str.strings[i]);
|
||||
}
|
||||
krb5_get_init_creds_opt_set_etype_list(&opt, enctype,
|
||||
etype_str.num_strings);
|
||||
}
|
||||
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
|
Reference in New Issue
Block a user