summaryrefslogtreecommitdiffstats
path: root/src/lib/crypto/dk/dk_aead.c
diff options
context:
space:
mode:
authorSam Hartman <hartmans@mit.edu>2009-01-03 23:19:42 +0000
committerSam Hartman <hartmans@mit.edu>2009-01-03 23:19:42 +0000
commit0ba5ccd7bb3ea15e44a87f84ca6feed8890f657d (patch)
tree2049c9c2cb135fe36b14c0a171711259258d18ec /src/lib/crypto/dk/dk_aead.c
parentff0a6514c9f4230938c29922d69cbd4e83691adf (diff)
Merge mskrb-integ onto trunk
The mskrb-integ branch includes support for the following projects: Projects/Aliases * Projects/PAC and principal APIs * Projects/AEAD encryption API * Projects/GSSAPI DCE * Projects/RFC 3244 In addition, it includes support for enctype negotiation, and a variety of GSS-API extensions. In the KDC it includes support for protocol transition, constrained delegation and a new authorization data interface. The old authorization data interface is also supported. This commit merges the mskrb-integ branch on to the trunk. Additional review and testing is required. Merge commit 'mskrb-integ' into trunk ticket: new status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21690 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/crypto/dk/dk_aead.c')
-rw-r--r--src/lib/crypto/dk/dk_aead.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/crypto/dk/dk_aead.c b/src/lib/crypto/dk/dk_aead.c
index ef40700e15..8abf5af5f4 100644
--- a/src/lib/crypto/dk/dk_aead.c
+++ b/src/lib/crypto/dk/dk_aead.c
@@ -176,7 +176,7 @@ krb5int_dk_encrypt_iov(const struct krb5_aead_provider *aead,
d2.length = hash->hashsize;
d2.data = (char *)cksum;
- ret = krb5_hmac_iov(hash, &ki, data, num_data, &d2);
+ ret = krb5int_hmac_iov(hash, &ki, data, num_data, &d2);
if (ret != 0)
goto cleanup;
@@ -230,6 +230,11 @@ krb5int_dk_decrypt_iov(const struct krb5_aead_provider *aead,
unsigned int hmacsize = 0;
unsigned char *cksum = NULL;
+ if (krb5int_c_locate_iov(data, num_data, KRB5_CRYPTO_TYPE_STREAM) != NULL) {
+ return krb5int_c_iov_decrypt_stream(aead, enc, hash, key,
+ usage, ivec, data, num_data);
+ }
+
ke.contents = ki.contents = NULL;
ke.length = ki.length = 0;
@@ -252,7 +257,7 @@ krb5int_dk_decrypt_iov(const struct krb5_aead_provider *aead,
if (blocksize == 0) {
/* Check for correct input length in CTS mode */
- if (enc->block_size != 0 && cipherlen < enc->block_size)
+ if (enc->block_size != 0 && cipherlen < enc->block_size)
return KRB5_BAD_MSIZE;
} else {
/* Check that the input data is correctly padded */
@@ -321,7 +326,7 @@ krb5int_dk_decrypt_iov(const struct krb5_aead_provider *aead,
d1.length = hash->hashsize; /* non-truncated length */
d1.data = (char *)cksum;
- ret = krb5_hmac_iov(hash, &ki, data, num_data, &d1);
+ ret = krb5int_hmac_iov(hash, &ki, data, num_data, &d1);
if (ret != 0)
goto cleanup;