aboutsummaryrefslogtreecommitdiff
path: root/openssl/crypto/cms/cms_asn1.c
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/crypto/cms/cms_asn1.c')
-rw-r--r--openssl/crypto/cms/cms_asn1.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/openssl/crypto/cms/cms_asn1.c b/openssl/crypto/cms/cms_asn1.c
index fcba4dcbc..cfe67fb6c 100644
--- a/openssl/crypto/cms/cms_asn1.c
+++ b/openssl/crypto/cms/cms_asn1.c
@@ -237,6 +237,15 @@ static int cms_ri_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
OPENSSL_free(kekri->key);
}
}
+ else if (ri->type == CMS_RECIPINFO_PASS)
+ {
+ CMS_PasswordRecipientInfo *pwri = ri->d.pwri;
+ if (pwri->pass)
+ {
+ OPENSSL_cleanse(pwri->pass, pwri->passlen);
+ OPENSSL_free(pwri->pass);
+ }
+ }
}
return 1;
}