diff options
author | Ken Raeburn <raeburn@mit.edu> | 2003-03-05 03:03:04 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2003-03-05 03:03:04 +0000 |
commit | 805904312e781e852c4c198ad91b32bac3c95c4e (patch) | |
tree | 5261c67dbc2a85df358f98101194500da5ed3740 /src/lib/crypto/string_to_key.c | |
parent | 3d02caa5af4dc5f8ece6286c138d08404d87936b (diff) | |
download | krb5-805904312e781e852c4c198ad91b32bac3c95c4e.tar.gz krb5-805904312e781e852c4c198ad91b32bac3c95c4e.tar.xz krb5-805904312e781e852c4c198ad91b32bac3c95c4e.zip |
Clean up PBKDF2 interface. Add s2k-params to string-to-key interface, except
no new decl in krb5.h yet; rename changed s2k functions to use krb5int_ prefix.
Add AES to etype table. Delete some unused declarations.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15229 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/crypto/string_to_key.c')
-rw-r--r-- | src/lib/crypto/string_to_key.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/lib/crypto/string_to_key.c b/src/lib/crypto/string_to_key.c index f6ddf9d690..cccfd1c1a3 100644 --- a/src/lib/crypto/string_to_key.c +++ b/src/lib/crypto/string_to_key.c @@ -35,6 +35,19 @@ krb5_c_string_to_key(context, enctype, string, salt, key) const krb5_data *salt; krb5_keyblock *key; { + return krb5_c_string_to_key_with_params(context, enctype, string, salt, + NULL, key); +} + +krb5_error_code KRB5_CALLCONV +krb5_c_string_to_key_with_params(context, enctype, string, salt, params, key) + krb5_context context; + krb5_enctype enctype; + const krb5_data *string; + const krb5_data *salt; + const krb5_data *params; + krb5_keyblock *key; +{ int i; krb5_error_code ret; const struct krb5_enc_provider *enc; @@ -59,7 +72,8 @@ krb5_c_string_to_key(context, enctype, string, salt, key) key->enctype = enctype; key->length = keylength; - if ((ret = ((*(krb5_enctypes_list[i].str2key))(enc, string, salt, key)))) { + ret = (*krb5_enctypes_list[i].str2key)(enc, string, salt, params, key); + if (ret) { memset(key->contents, 0, keylength); free(key->contents); } |