#14465: Update openssl to tag android-4.0.4_r2.1
diff --git a/jni/openssl/apps/cms.c b/jni/openssl/apps/cms.c
index d754140..d29a884 100644
--- a/jni/openssl/apps/cms.c
+++ b/jni/openssl/apps/cms.c
@@ -136,7 +136,6 @@
char *engine=NULL;
#endif
unsigned char *secret_key = NULL, *secret_keyid = NULL;
- unsigned char *pwri_pass = NULL, *pwri_tmp = NULL;
size_t secret_keylen = 0, secret_keyidlen = 0;
ASN1_OBJECT *econtent_type = NULL;
@@ -327,13 +326,6 @@
}
secret_keyidlen = (size_t)ltmp;
}
- else if (!strcmp(*args,"-pwri_password"))
- {
- if (!args[1])
- goto argerr;
- args++;
- pwri_pass = (unsigned char *)*args;
- }
else if (!strcmp(*args,"-econtent_type"))
{
if (!args[1])
@@ -567,7 +559,7 @@
else if (operation == SMIME_DECRYPT)
{
- if (!recipfile && !keyfile && !secret_key && !pwri_pass)
+ if (!recipfile && !keyfile && !secret_key)
{
BIO_printf(bio_err, "No recipient certificate or key specified\n");
badarg = 1;
@@ -575,7 +567,7 @@
}
else if (operation == SMIME_ENCRYPT)
{
- if (!*args && !secret_key && !pwri_pass)
+ if (!*args && !secret_key)
{
BIO_printf(bio_err, "No recipient(s) certificate(s) specified\n");
badarg = 1;
@@ -626,7 +618,7 @@
BIO_printf (bio_err, "-certsout file certificate output file\n");
BIO_printf (bio_err, "-signer file signer certificate file\n");
BIO_printf (bio_err, "-recip file recipient certificate file for decryption\n");
- BIO_printf (bio_err, "-keyid use subject key identifier\n");
+ BIO_printf (bio_err, "-skeyid use subject key identifier\n");
BIO_printf (bio_err, "-in file input file\n");
BIO_printf (bio_err, "-inform arg input format SMIME (default), PEM or DER\n");
BIO_printf (bio_err, "-inkey file input private key (if not signer or recipient)\n");
@@ -925,17 +917,6 @@
secret_key = NULL;
secret_keyid = NULL;
}
- if (pwri_pass)
- {
- pwri_tmp = (unsigned char *)BUF_strdup((char *)pwri_pass);
- if (!pwri_tmp)
- goto end;
- if (!CMS_add0_recipient_password(cms,
- -1, NID_undef, NID_undef,
- pwri_tmp, -1, NULL))
- goto end;
- pwri_tmp = NULL;
- }
if (!(flags & CMS_STREAM))
{
if (!CMS_final(cms, in, NULL, flags))
@@ -1062,16 +1043,6 @@
}
}
- if (pwri_pass)
- {
- if (!CMS_decrypt_set1_password(cms, pwri_pass, -1))
- {
- BIO_puts(bio_err,
- "Error decrypting CMS using password\n");
- goto end;
- }
- }
-
if (!CMS_decrypt(cms, NULL, NULL, indata, out, flags))
{
BIO_printf(bio_err, "Error decrypting CMS structure\n");
@@ -1196,8 +1167,6 @@
OPENSSL_free(secret_key);
if (secret_keyid)
OPENSSL_free(secret_keyid);
- if (pwri_tmp)
- OPENSSL_free(pwri_tmp);
if (econtent_type)
ASN1_OBJECT_free(econtent_type);
if (rr)