[openssl] master update

tomas at openssl.org tomas at openssl.org
Thu Aug 5 14:50:27 UTC 2021


The branch master has been updated
       via  37578dc02df99011c2a4c57ac06c49bd40829dc9 (commit)
       via  f5c0f696193fa28741dfc08ab6b024cd07e38e5e (commit)
      from  204323446e11d7062dc193e5e3986295925bd7b7 (commit)


- Log -----------------------------------------------------------------
commit 37578dc02df99011c2a4c57ac06c49bd40829dc9
Author: Tomas Mraz <tomas at openssl.org>
Date:   Wed Aug 4 14:55:30 2021 +0200

    cms: Fix handling of -rctform option
    
    Reviewed-by: Paul Dale <pauli at openssl.org>
    Reviewed-by: Dmitry Belyavskiy <beldmit at gmail.com>
    (Merged from https://github.com/openssl/openssl/pull/16216)

commit f5c0f696193fa28741dfc08ab6b024cd07e38e5e
Author: Tomas Mraz <tomas at openssl.org>
Date:   Wed Aug 4 14:51:49 2021 +0200

    cms: Do not try to check binary format on stdin
    
    Fixes #16195
    
    Reviewed-by: Paul Dale <pauli at openssl.org>
    Reviewed-by: Dmitry Belyavskiy <beldmit at gmail.com>
    (Merged from https://github.com/openssl/openssl/pull/16216)

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

Summary of changes:
 apps/cms.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/apps/cms.c b/apps/cms.c
index 58ce54e454..c22027e3b1 100644
--- a/apps/cms.c
+++ b/apps/cms.c
@@ -278,6 +278,8 @@ static void warn_binary(const char *file)
     unsigned char linebuf[1024], *cur, *end;
     int len;
 
+    if (file == NULL)
+        return; /* cannot give a warning for stdin input */
     if ((bio = bio_open_default(file, 'r', FORMAT_BINARY)) == NULL)
         return; /* cannot give a proper warning since there is an error */
     while ((len = BIO_read(bio, linebuf, sizeof(linebuf))) > 0) {
@@ -482,13 +484,9 @@ int cms_main(int argc, char **argv)
             rr_allorfirst = 1;
             break;
         case OPT_RCTFORM:
-            if (rctformat == FORMAT_ASN1) {
-                if (!opt_format(opt_arg(),
-                                OPT_FMT_PEMDER | OPT_FMT_SMIME, &rctformat))
-                    goto opthelp;
-            } else {
-                rcms = load_content_info(rctformat, rctin, 0, NULL, "recipient");
-            }
+            if (!opt_format(opt_arg(),
+                            OPT_FMT_PEMDER | OPT_FMT_SMIME, &rctformat))
+                goto opthelp;
             break;
         case OPT_CERTFILE:
             certfile = opt_arg();
@@ -954,7 +952,7 @@ int cms_main(int argc, char **argv)
             goto end;
         }
 
-        rcms = load_content_info(rctformat, rctin, 0, NULL, "recipient");
+        rcms = load_content_info(rctformat, rctin, 0, NULL, "receipt");
         if (rcms == NULL)
             goto end;
     }


More information about the openssl-commits mailing list