summaryrefslogtreecommitdiffstats
path: root/crypto/cms/cms_asn1.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/cms/cms_asn1.c')
-rw-r--r--crypto/cms/cms_asn1.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/crypto/cms/cms_asn1.c b/crypto/cms/cms_asn1.c
index 7f7132c3bb..835cae4e0b 100644
--- a/crypto/cms/cms_asn1.c
+++ b/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;
}