diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/cms/cms_pwri.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/cms/cms_pwri.c b/src/lib/libcrypto/cms/cms_pwri.c index 89f7925938..11509e3c11 100644 --- a/src/lib/libcrypto/cms/cms_pwri.c +++ b/src/lib/libcrypto/cms/cms_pwri.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cms_pwri.c,v 1.8 2014/10/22 13:02:04 jsing Exp $ */ | 1 | /* $OpenBSD: cms_pwri.c,v 1.9 2015/05/15 11:00:14 jsg Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project. | 3 | * project. |
4 | */ | 4 | */ |
@@ -332,14 +332,14 @@ cms_RecipientInfo_pwri_crypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri, | |||
332 | 332 | ||
333 | if (!pwri->pass) { | 333 | if (!pwri->pass) { |
334 | CMSerr(CMS_F_CMS_RECIPIENTINFO_PWRI_CRYPT, CMS_R_NO_PASSWORD); | 334 | CMSerr(CMS_F_CMS_RECIPIENTINFO_PWRI_CRYPT, CMS_R_NO_PASSWORD); |
335 | return 0; | 335 | goto err; |
336 | } | 336 | } |
337 | algtmp = pwri->keyEncryptionAlgorithm; | 337 | algtmp = pwri->keyEncryptionAlgorithm; |
338 | 338 | ||
339 | if (!algtmp || OBJ_obj2nid(algtmp->algorithm) != NID_id_alg_PWRI_KEK) { | 339 | if (!algtmp || OBJ_obj2nid(algtmp->algorithm) != NID_id_alg_PWRI_KEK) { |
340 | CMSerr(CMS_F_CMS_RECIPIENTINFO_PWRI_CRYPT, | 340 | CMSerr(CMS_F_CMS_RECIPIENTINFO_PWRI_CRYPT, |
341 | CMS_R_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM); | 341 | CMS_R_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM); |
342 | return 0; | 342 | goto err; |
343 | } | 343 | } |
344 | 344 | ||
345 | if (algtmp->parameter->type == V_ASN1_SEQUENCE) { | 345 | if (algtmp->parameter->type == V_ASN1_SEQUENCE) { |
@@ -350,7 +350,7 @@ cms_RecipientInfo_pwri_crypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri, | |||
350 | if (kekalg == NULL) { | 350 | if (kekalg == NULL) { |
351 | CMSerr(CMS_F_CMS_RECIPIENTINFO_PWRI_CRYPT, | 351 | CMSerr(CMS_F_CMS_RECIPIENTINFO_PWRI_CRYPT, |
352 | CMS_R_INVALID_KEY_ENCRYPTION_PARAMETER); | 352 | CMS_R_INVALID_KEY_ENCRYPTION_PARAMETER); |
353 | return 0; | 353 | goto err; |
354 | } | 354 | } |
355 | 355 | ||
356 | kekcipher = EVP_get_cipherbyobj(kekalg->algorithm); | 356 | kekcipher = EVP_get_cipherbyobj(kekalg->algorithm); |