summaryrefslogtreecommitdiffstats
path: root/crypto/dh
diff options
context:
space:
mode:
authorBen Laurie <ben@links.org>2013-08-21 04:21:42 +0100
committerDr. Stephen Henson <steve@openssl.org>2013-10-01 14:01:18 +0100
commitac5cb33356962409acf8ddf334831cf5de6cc2aa (patch)
treefb0150598d0a91bfca3b40f6b9614b9ec47c559c /crypto/dh
parentaaf74259ec6c1b5959d158d0e75d59024fa6eee1 (diff)
Fix compile errors.
(cherry picked from commit a0aaa5660a29f0faa86e5e51ce889299c5f3098b)
Diffstat (limited to 'crypto/dh')
-rw-r--r--crypto/dh/dh_ameth.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c
index 141c09ba54..8b0a153ef3 100644
--- a/crypto/dh/dh_ameth.c
+++ b/crypto/dh/dh_ameth.c
@@ -673,12 +673,13 @@ static int dh_cms_set_peerkey(EVP_PKEY_CTX *pctx,
ASN1_OBJECT *aoid;
int atype;
void *aval;
- ASN1_INTEGER *public_key;
+ ASN1_INTEGER *public_key = NULL;
int rv = 0;
EVP_PKEY *pkpeer = NULL, *pk = NULL;
DH *dhpeer = NULL;
const unsigned char *p;
int plen;
+
X509_ALGOR_get0(&aoid, &atype, &aval, alg);
if (OBJ_obj2nid(aoid) != NID_dhpublicnumber)
goto err;
@@ -737,7 +738,7 @@ static int dh_cms_set_shared_info(EVP_PKEY_CTX *pctx, CMS_RecipientInfo *ri)
ASN1_OCTET_STRING *ukm;
const unsigned char *p;
unsigned char *dukm = NULL;
- size_t dukmlen;
+ size_t dukmlen = 0;
int keylen, plen;
const EVP_CIPHER *kekcipher;
EVP_CIPHER_CTX *kekctx;
@@ -852,7 +853,7 @@ static int dh_cms_encrypt(CMS_RecipientInfo *ri)
ASN1_OCTET_STRING *ukm;
unsigned char *penc = NULL, *dukm = NULL;
int penclen;
- size_t dukmlen;
+ size_t dukmlen = 0;
int rv = 0;
int kdf_type, wrap_nid;
const EVP_MD *kdf_md;