Make parse_key_set handle key set string "v5", from Peter Meinecke.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21659 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2007-07-22 01:51:31 +00:00
parent bbb338085c
commit b23b5d8d8a

View File

@@ -105,7 +105,7 @@ parse_key_set(krb5_context context, const char *key,
salt->saltvalue.length = 0; salt->saltvalue.length = 0;
for(i = 0; i < num_buf; i++) { for(i = 0; i < num_buf; i++) {
if(enctypes == NULL) { if(enctypes == NULL && num_buf > 1) {
/* this might be a etype specifier */ /* this might be a etype specifier */
/* XXX there should be a string_to_etypes handling /* XXX there should be a string_to_etypes handling
special cases like `des' and `all' */ special cases like `des' and `all' */
@@ -124,7 +124,9 @@ parse_key_set(krb5_context context, const char *key,
} else } else
return ret; return ret;
} }
} else if(salt->salttype == 0) { continue;
}
if(salt->salttype == 0) {
/* interpret string as a salt specifier, if no etype /* interpret string as a salt specifier, if no etype
is set, this sets default values */ is set, this sets default values */
/* XXX should perhaps use string_to_salttype, but that /* XXX should perhaps use string_to_salttype, but that
@@ -142,7 +144,10 @@ parse_key_set(krb5_context context, const char *key,
} }
salt->salttype = KRB5_AFS3_SALT; salt->salttype = KRB5_AFS3_SALT;
} }
} else { continue;
}
{
/* if there is a final string, use it as the string to /* if there is a final string, use it as the string to
salt with, this is mostly useful with null salt for salt with, this is mostly useful with null salt for
v4 compat, and a cell name for afs compat */ v4 compat, and a cell name for afs compat */