diff options
author | Sam Hartman <hartmans@mit.edu> | 2008-12-04 15:48:08 +0000 |
---|---|---|
committer | Sam Hartman <hartmans@mit.edu> | 2008-12-04 15:48:08 +0000 |
commit | 9ab3afbf9569254cf67bf7363cb9a50f549a5cdf (patch) | |
tree | 6bccf2672cf7b33a77ed39d21287a0cd3deca33a /src/lib/crypto/decrypt.c | |
parent | 7a64640413a306635ad94403b72d798e4aa527ee (diff) | |
download | krb5-9ab3afbf9569254cf67bf7363cb9a50f549a5cdf.zip krb5-9ab3afbf9569254cf67bf7363cb9a50f549a5cdf.tar.gz krb5-9ab3afbf9569254cf67bf7363cb9a50f549a5cdf.tar.bz2 |
Merge r21120 from mskrb-integ
Refactor code such that an AEAD provider does not need to implement the
older, non-IOV SPIs. Instead, the older APIs will implement their
behaviour on top of the AEAD SPIs, using the wrapper functions in
aead.c.
ticket: 6274
Status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21278 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/crypto/decrypt.c')
-rw-r--r-- | src/lib/crypto/decrypt.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/crypto/decrypt.c b/src/lib/crypto/decrypt.c index 96861bd..3c33c83 100644 --- a/src/lib/crypto/decrypt.c +++ b/src/lib/crypto/decrypt.c @@ -26,6 +26,7 @@ #include "k5-int.h" #include "etypes.h" +#include "aead.h" krb5_error_code KRB5_CALLCONV krb5_c_decrypt(krb5_context context, const krb5_keyblock *key, @@ -50,6 +51,16 @@ krb5_c_decrypt(krb5_context context, const krb5_keyblock *key, (krb5_enctypes_list[i].etype != input->enctype)) return(KRB5_BAD_ENCTYPE); + if (krb5_enctypes_list[i].decrypt == NULL) { + assert(krb5_enctypes_list[i].aead != NULL); + + return krb5int_decrypt_aead_compat(krb5_enctypes_list[i].aead, + krb5_enctypes_list[i].enc, + krb5_enctypes_list[i].hash, + key, usage, ivec, + &input->ciphertext, output); + } + return((*(krb5_enctypes_list[i].decrypt)) (krb5_enctypes_list[i].enc, krb5_enctypes_list[i].hash, key, usage, ivec, &input->ciphertext, output)); |