[openssl-commits] [openssl] master update

Dr. Stephen Henson steve at openssl.org
Fri Jul 22 11:08:26 UTC 2016


The branch master has been updated
       via  3770b877ea7b7fa08e88395e8c472c102f9e707e (commit)
       via  ee8f785873232583114981b5b44c64826b52116e (commit)
       via  f22ff0eb169dcf8e49180b1c052d5c388c3a7197 (commit)
      from  912c258fc921fd100b5da3dc25773ecc507891b4 (commit)


- Log -----------------------------------------------------------------
commit 3770b877ea7b7fa08e88395e8c472c102f9e707e
Author: Dr. Stephen Henson <steve at openssl.org>
Date:   Fri Jul 22 01:09:52 2016 +0100

    Add mask for newly created symlink.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

commit ee8f785873232583114981b5b44c64826b52116e
Author: Dr. Stephen Henson <steve at openssl.org>
Date:   Fri Jul 22 01:09:04 2016 +0100

    Check suffixes properly.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

commit f22ff0eb169dcf8e49180b1c052d5c388c3a7197
Author: Dr. Stephen Henson <steve at openssl.org>
Date:   Thu Jul 21 16:23:48 2016 +0100

    use correct name for duplicate
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

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

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

diff --git a/apps/rehash.c b/apps/rehash.c
index 4686b53..aacb169 100644
--- a/apps/rehash.c
+++ b/apps/rehash.c
@@ -114,8 +114,8 @@ static int add_entry(enum Type type, unsigned int hash, const char *filename,
     for (ep = bp->first_entry; ep; ep = ep->next) {
         if (digest && memcmp(digest, ep->digest, evpmdsize) == 0) {
             BIO_printf(bio_err,
-                       "%s: skipping duplicate certificate in %s\n",
-                       opt_getprog(), filename);
+                       "%s: skipping duplicate %s in %s\n", opt_getprog(),
+                       type == TYPE_CERT ? "certificate" : "CRL", filename);
             return 1;
         }
         if (strcmp(filename, ep->filename) == 0) {
@@ -174,9 +174,11 @@ static int handle_symlink(const char *filename, const char *fullpath)
     }
     if (filename[i++] != '.')
         return -1;
-    for (type = OSSL_NELEM(suffixes) - 1; type > 0; type--)
-        if (strcasecmp(suffixes[type], &filename[i]) == 0)
+    for (type = OSSL_NELEM(suffixes) - 1; type > 0; type--) {
+        const char *suffix = suffixes[type];
+        if (strncasecmp(suffix, &filename[i], strlen(suffix)) == 0)
             break;
+    }
     i += strlen(suffixes[type]);
 
     id = strtoul(&filename[i], &endptr, 10);
@@ -364,6 +366,7 @@ static int do_dir(const char *dirname, enum Hash h)
                                    strerror(errno));
                         errs++;
                     }
+                    bit_set(idmask, nextid);
                 } else if (remove_links) {
                     /* Link to be deleted */
                     snprintf(buf, buflen, "%s%s%n%08x.%s%d",


More information about the openssl-commits mailing list