[openssl] OpenSSL_1_1_1-stable update

tomas at openssl.org tomas at openssl.org
Fri Oct 22 09:42:55 UTC 2021


The branch OpenSSL_1_1_1-stable has been updated
       via  b28d41afbfebd8c668ee039d10d1a0edbed09dba (commit)
      from  851abe78b4ea7b8f238a652cd911420cd0950ff6 (commit)


- Log -----------------------------------------------------------------
commit b28d41afbfebd8c668ee039d10d1a0edbed09dba
Author: Peiwei Hu <jlu.hpw at foxmail.com>
Date:   Sat Oct 9 09:25:27 2021 +0800

    Fix BIO_get_md_ctx return value check
    
    Reviewed-by: Shane Lontis <shane.lontis at oracle.com>
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/16792)

-----------------------------------------------------------------------

Summary of changes:
 apps/dgst.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/apps/dgst.c b/apps/dgst.c
index e595f7d818..b07fff3fb3 100644
--- a/apps/dgst.c
+++ b/apps/dgst.c
@@ -316,7 +316,7 @@ int dgst_main(int argc, char **argv)
         EVP_MD_CTX *mctx = NULL;
         EVP_PKEY_CTX *pctx = NULL;
         int r;
-        if (!BIO_get_md_ctx(bmd, &mctx)) {
+        if (BIO_get_md_ctx(bmd, &mctx) <= 0) {
             BIO_printf(bio_err, "Error getting context\n");
             ERR_print_errors(bio_err);
             goto end;
@@ -345,7 +345,7 @@ int dgst_main(int argc, char **argv)
     /* we use md as a filter, reading from 'in' */
     else {
         EVP_MD_CTX *mctx = NULL;
-        if (!BIO_get_md_ctx(bmd, &mctx)) {
+        if (BIO_get_md_ctx(bmd, &mctx) <= 0) {
             BIO_printf(bio_err, "Error getting context\n");
             ERR_print_errors(bio_err);
             goto end;


More information about the openssl-commits mailing list