From 5ea1b6426300f5662fa8c809519be4edbd8051e3 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Wed, 7 Nov 2001 23:03:46 +0000 Subject: [PATCH] Update to be consistent with what MS uses for key usage git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13967 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/arcfour/ChangeLog | 1 + src/lib/crypto/arcfour/arcfour.c | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/lib/crypto/arcfour/ChangeLog b/src/lib/crypto/arcfour/ChangeLog index 38ff8bbd6..fb5968b83 100644 --- a/src/lib/crypto/arcfour/ChangeLog +++ b/src/lib/crypto/arcfour/ChangeLog @@ -1,6 +1,7 @@ 2001-11-07 Sam Hartman * arcfour.c (krb5_arcfour_encrypt): Set output length + (ms_translate_usage): Be consistent with latest mail from Microsoft 2001-11-06 Sam Hartman diff --git a/src/lib/crypto/arcfour/arcfour.c b/src/lib/crypto/arcfour/arcfour.c index e038e9542..acf70820b 100644 --- a/src/lib/crypto/arcfour/arcfour.c +++ b/src/lib/crypto/arcfour/arcfour.c @@ -27,22 +27,22 @@ krb5_arcfour_encrypt_length(enc, hash, inputlen, length) *length = hashsize + krb5_roundup(8 + inputlen, blocksize); } - krb5_keyusage krb5int_arcfour_translate_usage(krb5_keyusage usage) + krb5_keyusage + krb5int_arcfour_translate_usage(krb5_keyusage usage) { switch (usage) { case 1: /* AS-REQ PA-ENC-TIMESTAMP padata timestamp, */ - /*Microsoft does not actually support this padata, not sure which usage they would use*/ return 1; case 2: /* ticket from kdc */ return 2; case 3: /* as-rep encrypted part */ return 8; case 4: /* tgs-req authz data */ - return 4; /* xxx Microsoft doesn't say */ + return 16; /*vague possibility to change to 4 in the future --sdh*/ case 5: /* tgs-req authz data in subkey */ - return 5; /* xxx Microsoft doesn't say */ + return 16; /* vague possibility to become 5 in future --sdh*/ case 6: /* tgs-req authenticator cksum */ - return 6; /* xxx Microsoft doesn't say*/ + return 6; case 7: /* tgs-req authenticator */ return 7; case 8: @@ -50,7 +50,7 @@ case 7: /* tgs-req authenticator */ case 9: /* tgs-rep encrypted with subkey */ return 8; case 10: /* ap-rep authentication cksum */ - return 10; /* xxx Microsoft didn't say */ + return 10; /* xxx Microsoft never uses this*/ case 11: /* app-req authenticator */ return 11; case 12: /* app-rep encrypted part */ -- 2.26.2