[openssl] master update
Dr. Paul Dale
pauli at openssl.org
Thu May 27 10:29:56 UTC 2021
The branch master has been updated
via 72f62f4408d2a4e75c58706d41775e4f8f7f0034 (commit)
via 29604f492020b76fde2665cde3f2a9c5adea3549 (commit)
from 91f2b15f2ecd9dd92b6ed2563b10c1a126db2643 (commit)
- Log -----------------------------------------------------------------
commit 72f62f4408d2a4e75c58706d41775e4f8f7f0034
Author: Pauli <pauli at openssl.org>
Date: Mon May 24 09:35:08 2021 +1000
coverity 1484912: Null pointer dereferences (NULL_RETURNS)
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15425)
commit 29604f492020b76fde2665cde3f2a9c5adea3549
Author: Pauli <pauli at openssl.org>
Date: Mon May 24 08:59:36 2021 +1000
coverity 1484913: Null pointer dereferences (REVERSE_INULL)
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15425)
-----------------------------------------------------------------------
Summary of changes:
crypto/evp/evp_fetch.c | 3 +++
crypto/evp/p_seal.c | 11 ++++++++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/crypto/evp/evp_fetch.c b/crypto/evp/evp_fetch.c
index e71d827d4b..f628eb2fae 100644
--- a/crypto/evp/evp_fetch.c
+++ b/crypto/evp/evp_fetch.c
@@ -504,6 +504,9 @@ char *evp_get_global_properties_str(OSSL_LIB_CTX *libctx, int loadconfig)
char *propstr = NULL;
size_t sz;
+ if (plp == NULL)
+ return OPENSSL_strdup("");
+
sz = ossl_property_list_to_string(libctx, *plp, NULL, 0);
if (sz == 0) {
ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
diff --git a/crypto/evp/p_seal.c b/crypto/evp/p_seal.c
index 6a07737e59..c13041f027 100644
--- a/crypto/evp/p_seal.c
+++ b/crypto/evp/p_seal.c
@@ -15,23 +15,28 @@
#include <openssl/evp.h>
#include <openssl/objects.h>
#include <openssl/x509.h>
+#include <openssl/evp.h>
int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
unsigned char **ek, int *ekl, unsigned char *iv,
EVP_PKEY **pubk, int npubk)
{
unsigned char key[EVP_MAX_KEY_LENGTH];
- const OSSL_PROVIDER *prov = EVP_CIPHER_provider(type);
- OSSL_LIB_CTX *libctx = prov != NULL ? ossl_provider_libctx(prov) : NULL;
+ const OSSL_PROVIDER *prov;
+ OSSL_LIB_CTX *libctx = NULL;
EVP_PKEY_CTX *pctx = NULL;
+ const EVP_CIPHER *cipher;
int i, len;
int rv = 0;
- if (type) {
+ if (type != NULL) {
EVP_CIPHER_CTX_reset(ctx);
if (!EVP_EncryptInit_ex(ctx, type, NULL, NULL, NULL))
return 0;
}
+ if ((cipher = EVP_CIPHER_CTX_get0_cipher(ctx)) != NULL
+ && (prov = EVP_CIPHER_provider(cipher)) != NULL)
+ libctx = ossl_provider_libctx(prov);
if ((npubk <= 0) || !pubk)
return 1;
More information about the openssl-commits
mailing list