From 3d02caa5af4dc5f8ece6286c138d08404d87936b Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 5 Mar 2003 02:58:51 +0000 Subject: [PATCH] * aes.c (krb5int_aes_init_state): Implement. * enc_provider.h (krb5int_enc_aes128, krb5int_enc_aes256): Declare. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15228 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/enc_provider/ChangeLog | 6 ++++++ src/lib/crypto/enc_provider/aes.c | 7 ++++++- src/lib/crypto/enc_provider/enc_provider.h | 4 ++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/lib/crypto/enc_provider/ChangeLog b/src/lib/crypto/enc_provider/ChangeLog index f46ced59f..08a614e96 100644 --- a/src/lib/crypto/enc_provider/ChangeLog +++ b/src/lib/crypto/enc_provider/ChangeLog @@ -1,3 +1,9 @@ +2003-03-04 Ken Raeburn + + * aes.c (krb5int_aes_init_state): Implement. + * enc_provider.h (krb5int_enc_aes128, krb5int_enc_aes256): + Declare. + 2003-02-03 Ken Raeburn * aes.c: New file. diff --git a/src/lib/crypto/enc_provider/aes.c b/src/lib/crypto/enc_provider/aes.c index 4a400cd0a..d3dc2a5a7 100644 --- a/src/lib/crypto/enc_provider/aes.c +++ b/src/lib/crypto/enc_provider/aes.c @@ -166,7 +166,12 @@ static krb5_error_code krb5int_aes_init_state (const krb5_keyblock *key, krb5_keyusage usage, krb5_data *state) { - abort(); + state->length = 16; + state->data = (void *) malloc(16); + if (state->data == NULL) + return ENOMEM; + memset(state->data, 0, state->length); + return 0; } const struct krb5_enc_provider krb5int_enc_aes128 = { diff --git a/src/lib/crypto/enc_provider/enc_provider.h b/src/lib/crypto/enc_provider/enc_provider.h index 9a3dafb8d..5754d1a2d 100644 --- a/src/lib/crypto/enc_provider/enc_provider.h +++ b/src/lib/crypto/enc_provider/enc_provider.h @@ -29,5 +29,5 @@ extern const struct krb5_enc_provider krb5int_enc_des; extern const struct krb5_enc_provider krb5int_enc_des3; extern const struct krb5_enc_provider krb5int_enc_arcfour; - - +extern const struct krb5_enc_provider krb5int_enc_aes128; +extern const struct krb5_enc_provider krb5int_enc_aes256; -- 2.26.2