Only one DATA buffer for _iov functions.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24750 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		@@ -3366,7 +3366,7 @@ krb5_encrypt_iov_ivec(krb5_context context,
 | 
				
			|||||||
 * @ingroup krb5_crypto
 | 
					 * @ingroup krb5_crypto
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * 1. KRB5_CRYPTO_TYPE_HEADER
 | 
					 * 1. KRB5_CRYPTO_TYPE_HEADER
 | 
				
			||||||
 * 2. array KRB5_CRYPTO_TYPE_DATA and KRB5_CRYPTO_TYPE_SIGN_ONLY in
 | 
					 * 2. one KRB5_CRYPTO_TYPE_DATA and array [0,...] of KRB5_CRYPTO_TYPE_SIGN_ONLY in
 | 
				
			||||||
 *  any order, however the receiver have to aware of the
 | 
					 *  any order, however the receiver have to aware of the
 | 
				
			||||||
 *  order. KRB5_CRYPTO_TYPE_SIGN_ONLY is commonly used unencrypoted
 | 
					 *  order. KRB5_CRYPTO_TYPE_SIGN_ONLY is commonly used unencrypoted
 | 
				
			||||||
 *  protocol headers and trailers. The output data will be of same
 | 
					 *  protocol headers and trailers. The output data will be of same
 | 
				
			||||||
@@ -3404,9 +3404,13 @@ krb5_decrypt_iov_ivec(krb5_context context,
 | 
				
			|||||||
    headersz = et->confoundersize;
 | 
					    headersz = et->confoundersize;
 | 
				
			||||||
    trailersz = CHECKSUMSIZE(et->keyed_checksum);
 | 
					    trailersz = CHECKSUMSIZE(et->keyed_checksum);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for (len = 0, i = 0; i < num_data; i++)
 | 
					    for (len = 0, i = 0; i < num_data; i++) {
 | 
				
			||||||
	if (data[i].flags == KRB5_CRYPTO_TYPE_DATA)
 | 
						if (data[i].flags == KRB5_CRYPTO_TYPE_DATA) {
 | 
				
			||||||
 | 
						    if (len != 0) 
 | 
				
			||||||
 | 
							return KRB5_CRYPTO_INTERNAL;
 | 
				
			||||||
	    len += data[i].data.length;
 | 
						    len += data[i].data.length;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    sz = headersz + len;
 | 
					    sz = headersz + len;
 | 
				
			||||||
    block_sz = (sz + et->padsize - 1) &~ (et->padsize - 1); /* pad */
 | 
					    block_sz = (sz + et->padsize - 1) &~ (et->padsize - 1); /* pad */
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user