From 201ae4597a0acb9d031b9b1cec975d97e6f6e343 Mon Sep 17 00:00:00 2001 From: giovanni Date: Thu, 17 Apr 2014 21:31:27 +0000 Subject: [PATCH] Some VMS and WIN32 cleanup ok miod@ lteo@ --- lib/libcrypto/x509/by_dir.c | 33 +++++------------------------ lib/libssl/src/crypto/x509/by_dir.c | 33 +++++------------------------ 2 files changed, 10 insertions(+), 56 deletions(-) diff --git a/lib/libcrypto/x509/by_dir.c b/lib/libcrypto/x509/by_dir.c index bc603312752..9795b636204 100644 --- a/lib/libcrypto/x509/by_dir.c +++ b/lib/libcrypto/x509/by_dir.c @@ -337,35 +337,12 @@ get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name, } for (;;) { char c = '/'; -#ifdef OPENSSL_SYS_VMS - c = ent->dir[strlen(ent->dir) - 1]; - if (c != ':' && c != '>' && c != ']') { - /* If no separator is present, we assume the - directory specifier is a logical name, and - add a colon. We really should use better - VMS routines for merging things like this, - but this will do for now... - -- Richard Levitte */ - c = ':'; - } else { - c = '\0'; - } -#endif - if (c == '\0') { - /* This is special. When c == '\0', no - directory separator should be added. */ - (void) snprintf(b->data, b->max, - "%s%08lx.%s%d", ent->dir, h, - postfix, k); - } else { - (void) snprintf(b->data, b->max, - "%s%c%08lx.%s%d", ent->dir, c, h, - postfix, k); - } + + (void) snprintf(b->data, b->max, + "%s%c%08lx.%s%d", ent->dir, c, h, + postfix, k); + #ifndef OPENSSL_NO_POSIX_IO -#ifdef _WIN32 -#define stat _stat -#endif { struct stat st; if (stat(b->data, &st) < 0) diff --git a/lib/libssl/src/crypto/x509/by_dir.c b/lib/libssl/src/crypto/x509/by_dir.c index bc603312752..9795b636204 100644 --- a/lib/libssl/src/crypto/x509/by_dir.c +++ b/lib/libssl/src/crypto/x509/by_dir.c @@ -337,35 +337,12 @@ get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name, } for (;;) { char c = '/'; -#ifdef OPENSSL_SYS_VMS - c = ent->dir[strlen(ent->dir) - 1]; - if (c != ':' && c != '>' && c != ']') { - /* If no separator is present, we assume the - directory specifier is a logical name, and - add a colon. We really should use better - VMS routines for merging things like this, - but this will do for now... - -- Richard Levitte */ - c = ':'; - } else { - c = '\0'; - } -#endif - if (c == '\0') { - /* This is special. When c == '\0', no - directory separator should be added. */ - (void) snprintf(b->data, b->max, - "%s%08lx.%s%d", ent->dir, h, - postfix, k); - } else { - (void) snprintf(b->data, b->max, - "%s%c%08lx.%s%d", ent->dir, c, h, - postfix, k); - } + + (void) snprintf(b->data, b->max, + "%s%c%08lx.%s%d", ent->dir, c, h, + postfix, k); + #ifndef OPENSSL_NO_POSIX_IO -#ifdef _WIN32 -#define stat _stat -#endif { struct stat st; if (stat(b->data, &st) < 0) -- 2.20.1