summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtchang%redhat.com <devnull@localhost>2006-09-10 01:19:03 +0000
committerwtchang%redhat.com <devnull@localhost>2006-09-10 01:19:03 +0000
commit3700fac333746146b8b7a02fb1f4c29908a0d481 (patch)
tree9b0b0323f1924ce9c5abd984fca1c499955d8be3
parente89b6d0d6b1c0f2e46b1d1a318a2207d4a26a4ab (diff)
downloadnss-hg-3700fac333746146b8b7a02fb1f4c29908a0d481.tar.gz
Bugzilla Bug 351848: renamed the rsadigestlen field of VFYContext.SEAMONKEY_1_0_5_RELEASE
-rw-r--r--security/nss/lib/cryptohi/secvfy.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/security/nss/lib/cryptohi/secvfy.c b/security/nss/lib/cryptohi/secvfy.c
index 3a4213ff8..4d8c379ac 100644
--- a/security/nss/lib/cryptohi/secvfy.c
+++ b/security/nss/lib/cryptohi/secvfy.c
@@ -55,7 +55,7 @@
*/
static SECStatus
DecryptSigBlock(SECOidTag *tagp, unsigned char *digest,
- unsigned int *digestlen, SECKEYPublicKey *key,
+ unsigned int *digestlen, SECKEYPublicKey *key,
SECItem *sig, char *wincx)
{
SGNDigestInfo *di = NULL;
@@ -124,7 +124,7 @@ struct VFYContextStr {
* in the RSA signature, or the full DSA signature (40 bytes).
*/
unsigned char digest[HASH_LENGTH_MAX];
- unsigned int rsadigestlen;
+ unsigned int digestlen;
void * wincx;
void *hashcx;
const SECHashObject *hashobj;
@@ -263,7 +263,7 @@ VFY_CreateContext(SECKEYPublicKey *key, SECItem *sig, SECOidTag algid,
rv = DecryptSigBlock(&hashid, &cx->digest[0], &digestlen,
cx->key, sig, (char*)wincx);
cx->alg = hashid;
- cx->rsadigestlen = digestlen;
+ cx->digestlen = digestlen;
} else {
rv = decodeSigAlg(algid,&cx->alg);
}
@@ -408,14 +408,14 @@ VFY_EndWithSignature(VFYContext *cx, SECItem *sig)
case VFY_RSA:
if (sig) {
SECOidTag hashid = SEC_OID_UNKNOWN;
- rv = DecryptSigBlock(&hashid, &cx->digest[0], &cx->rsadigestlen,
+ rv = DecryptSigBlock(&hashid, &cx->digest[0], &cx->digestlen,
cx->key, sig, (char*)cx->wincx);
if ((rv != SECSuccess) || (hashid != cx->alg)) {
PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
return SECFailure;
}
}
- if ((part != cx->rsadigestlen) ||
+ if ((part != cx->digestlen) ||
PORT_Memcmp(final, cx->digest, part)) {
PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
return SECFailure;
@@ -458,7 +458,7 @@ VFY_VerifyDigest(SECItem *digest, SECKEYPublicKey *key, SECItem *sig,
if (cx != NULL) {
switch (key->keyType) {
case rsaKey:
- if ((digest->len != cx->rsadigestlen) ||
+ if ((digest->len != cx->digestlen) ||
PORT_Memcmp(digest->data, cx->digest, digest->len)) {
PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
} else {