summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorminfrin <minfrin@13f79535-47bb-0310-9956-ffa450edef68>2009-01-03 17:34:39 +0000
committerminfrin <minfrin@13f79535-47bb-0310-9956-ffa450edef68>2009-01-03 17:34:39 +0000
commit96fd3dbdee3e179bdef6ae425359c1cf454b7a9f (patch)
treedf3cbfec6a2bbca1600b7025869141e18950d70f
parent78a78db37a81fbf0d710db2b602a2b007ab75207 (diff)
downloadlibapr-util-96fd3dbdee3e179bdef6ae425359c1cf454b7a9f.tar.gz
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
-rw-r--r--CHANGES3
-rw-r--r--crypto/apr_crypto_nss.c3
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 {