Uninitialized variable bug fix.

This commit is contained in:
Dr. Stephen Henson 2008-03-18 18:18:25 +00:00
parent f5cbf8fbe1
commit f7e85c371e

View file

@ -441,6 +441,7 @@ int CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri,
CMSerr(CMS_F_CMS_RECIPIENTINFO_SET0_KEY, CMS_R_NOT_KEK); CMSerr(CMS_F_CMS_RECIPIENTINFO_SET0_KEY, CMS_R_NOT_KEK);
return 0; return 0;
} }
kekri = ri->d.kekri;
wrap_nid = OBJ_obj2nid(kekri->keyEncryptionAlgorithm->algorithm); wrap_nid = OBJ_obj2nid(kekri->keyEncryptionAlgorithm->algorithm);
if (aes_wrap_keylen(wrap_nid) != keylen) if (aes_wrap_keylen(wrap_nid) != keylen)
{ {
@ -525,7 +526,7 @@ static int cms_RecipientInfo_ktri_decrypt(CMS_ContentInfo *cms,
EVP_PKEY_CTX *pctx = NULL; EVP_PKEY_CTX *pctx = NULL;
unsigned char *ek = NULL; unsigned char *ek = NULL;
size_t eklen; size_t eklen;
int ret; int ret = 0;
if (ktri->pkey == NULL) if (ktri->pkey == NULL)
{ {