summaryrefslogtreecommitdiff
path: root/Cryptlib/OpenSSL/crypto/pkcs7
diff options
context:
space:
mode:
authorPaul Moore <pmoore2@cisco.com>2021-03-09 12:15:00 -0500
committerPeter Jones <pjones@redhat.com>2021-03-10 15:54:20 -0500
commitf5493df9c626a7436803d1e68b0118f4d041e0fa (patch)
treed2431ec75b3d566001f4563eac3d012fe058aaee /Cryptlib/OpenSSL/crypto/pkcs7
parentbbdfa72a0a5f8d5a8dd4a47e67195504a22ece5b (diff)
downloadefi-boot-shim-f5493df9c626a7436803d1e68b0118f4d041e0fa.tar.gz
efi-boot-shim-f5493df9c626a7436803d1e68b0118f4d041e0fa.zip
openssl: fix various build errors and warnings
There were a couple cases of "uninitialized variable" warnings in the imported OpenSSL code; I used the current OpenSSL code as a guide for picking the default values used here. On my dev system there is one remaining build warning in OpenSSL's crypto/asn1/x_pkey.c:X509_PKEY_new() function. Unfortunately it involves some preprocessor crimes and the fix would be a bit ugly. Fortunately it appears the warning here is harmless and can be ignored. As a point of reference, my build system is a current Arch install with GCC v10.2.0 and GNU-EFI v 3.0.12. Signed-off-by: Paul Moore <pmoore2@cisco.com>
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/pkcs7')
-rw-r--r--Cryptlib/OpenSSL/crypto/pkcs7/pk7_smime.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Cryptlib/OpenSSL/crypto/pkcs7/pk7_smime.c b/Cryptlib/OpenSSL/crypto/pkcs7/pk7_smime.c
index 1269a146..b27b0f68 100644
--- a/Cryptlib/OpenSSL/crypto/pkcs7/pk7_smime.c
+++ b/Cryptlib/OpenSSL/crypto/pkcs7/pk7_smime.c
@@ -530,7 +530,8 @@ PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher,
int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags)
{
BIO *tmpmem;
- int ret, i;
+ int ret = 0; /* current openssl sets 'ret' to zero here */
+ int i;
char *buf = NULL;
if (!p7) {