X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=apps%2Frehash.c;h=6f2b5da4ad463e9c600df773bf42d28cbb9fbc31;hp=ad7108aad9511ab1c08d439ade5f8323d8c4f7d1;hb=1fb6b0bf3e895c6b30f9c95a23284f93e4fa19b0;hpb=624265c60e07f8e5f251d0f5b79e34cf0221af73 diff --git a/apps/rehash.c b/apps/rehash.c index ad7108aad9..6f2b5da4ad 100644 --- a/apps/rehash.c +++ b/apps/rehash.c @@ -1,5 +1,5 @@ /* - * Copyright 2015-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2013-2014 Timo Teräs * * Licensed under the OpenSSL license (the "License"). You may not use @@ -9,6 +9,7 @@ */ #include "apps.h" +#include "progs.h" #if defined(OPENSSL_SYS_UNIX) || defined(__APPLE__) || \ (defined(__VMS) && defined(__DECC) && __CRTL_VER >= 80300000) @@ -292,24 +293,6 @@ static int ends_with_dirsep(const char *path) return *path == '/'; } -static int massage_filename(char *name) -{ -# ifdef __VMS - char *p = strchr(name, ';'); - char *q = p; - - if (q != NULL) { - for (q++; *q != '\0'; q++) { - if (!isdigit(*q)) - return 1; - } - } - - *p = '\0'; -# endif - return 1; -} - /* * Process a directory; return number of errors found. */ @@ -345,7 +328,6 @@ static int do_dir(const char *dirname, enum Hash h) } while ((filename = OPENSSL_DIR_read(&d, dirname)) != NULL) { if ((copy = strdup(filename)) == NULL - || !massage_filename(copy) || sk_OPENSSL_STRING_push(files, copy) == 0) { BIO_puts(bio_err, "out of memory\n"); exit(1); @@ -518,7 +500,7 @@ const OPTIONS rehash_options[] = { int rehash_main(int argc, char **argv) { BIO_printf(bio_err, "Not available; use c_rehash script\n"); - return (1); + return 1; } #endif /* defined(OPENSSL_SYS_UNIX) || defined(__APPLE__) */