Check suffixes properly.

Reviewed-by: Rich Salz <rsalz@openssl.org>
diff --git a/apps/rehash.c b/apps/rehash.c
index ee362b5..443c15e 100644
--- a/apps/rehash.c
+++ b/apps/rehash.c
@@ -174,9 +174,11 @@
     }
     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);