From 96fd3dbdee3e179bdef6ae425359c1cf454b7a9f Mon Sep 17 00:00:00 2001 From: minfrin Date: Sat, 3 Jan 2009 17:34:39 +0000 Subject: Fix a bogus initialisation of the IV size in the NSS crypto driver. git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@731034 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ crypto/apr_crypto_nss.c | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 3a5eabc4..40cec5ae 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with APR-util 1.4.0 + *) Fix a bogus initialisation of the IV size in the NSS crypto driver. + [Graham Leggett] + *) Make sure that the underlying result code during driver initialisation is exposed to the caller. [Graham Leggett] diff --git a/crypto/apr_crypto_nss.c b/crypto/apr_crypto_nss.c index 88355ca4..17dcb6de 100644 --- a/crypto/apr_crypto_nss.c +++ b/crypto/apr_crypto_nss.c @@ -421,7 +421,6 @@ static apr_status_t crypto_block_encrypt_init(apr_pool_t *p, { PRErrorCode perr; SECItem * secParam; - int usedIvSize; SECItem ivItem; unsigned char * usedIv; apr_crypto_block_t *block = *ctx; @@ -457,7 +456,7 @@ static apr_status_t crypto_block_encrypt_init(apr_pool_t *p, usedIv = (unsigned char *)*iv; } ivItem.data = usedIv; - ivItem.len = usedIvSize; + ivItem.len = key->ivSize; secParam = PK11_ParamFromIV(key->cipherMech, &ivItem); } else { -- cgit v1.2.1