summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgiovanni <>2014-04-17 21:31:27 +0000
committergiovanni <>2014-04-17 21:31:27 +0000
commit1388c217f6044b4ae8ebf791a8eb6012e2a4c2bb (patch)
tree70e46966fb9e5791d64ff19c8a405bfe5648e37f
parentaa8f085033b21b0ec0b70c18909ba27ef8752e51 (diff)
downloadopenbsd-1388c217f6044b4ae8ebf791a8eb6012e2a4c2bb.tar.gz
openbsd-1388c217f6044b4ae8ebf791a8eb6012e2a4c2bb.tar.bz2
openbsd-1388c217f6044b4ae8ebf791a8eb6012e2a4c2bb.zip
Some VMS and WIN32 cleanup
ok miod@ lteo@
-rw-r--r--src/lib/libcrypto/x509/by_dir.c33
-rw-r--r--src/lib/libssl/src/crypto/x509/by_dir.c33
2 files changed, 10 insertions, 56 deletions
diff --git a/src/lib/libcrypto/x509/by_dir.c b/src/lib/libcrypto/x509/by_dir.c
index bc60331275..9795b63620 100644
--- a/src/lib/libcrypto/x509/by_dir.c
+++ b/src/lib/libcrypto/x509/by_dir.c
@@ -337,35 +337,12 @@ get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name,
337 } 337 }
338 for (;;) { 338 for (;;) {
339 char c = '/'; 339 char c = '/';
340#ifdef OPENSSL_SYS_VMS 340
341 c = ent->dir[strlen(ent->dir) - 1]; 341 (void) snprintf(b->data, b->max,
342 if (c != ':' && c != '>' && c != ']') { 342 "%s%c%08lx.%s%d", ent->dir, c, h,
343 /* If no separator is present, we assume the 343 postfix, k);
344 directory specifier is a logical name, and 344
345 add a colon. We really should use better
346 VMS routines for merging things like this,
347 but this will do for now...
348 -- Richard Levitte */
349 c = ':';
350 } else {
351 c = '\0';
352 }
353#endif
354 if (c == '\0') {
355 /* This is special. When c == '\0', no
356 directory separator should be added. */
357 (void) snprintf(b->data, b->max,
358 "%s%08lx.%s%d", ent->dir, h,
359 postfix, k);
360 } else {
361 (void) snprintf(b->data, b->max,
362 "%s%c%08lx.%s%d", ent->dir, c, h,
363 postfix, k);
364 }
365#ifndef OPENSSL_NO_POSIX_IO 345#ifndef OPENSSL_NO_POSIX_IO
366#ifdef _WIN32
367#define stat _stat
368#endif
369 { 346 {
370 struct stat st; 347 struct stat st;
371 if (stat(b->data, &st) < 0) 348 if (stat(b->data, &st) < 0)
diff --git a/src/lib/libssl/src/crypto/x509/by_dir.c b/src/lib/libssl/src/crypto/x509/by_dir.c
index bc60331275..9795b63620 100644
--- a/src/lib/libssl/src/crypto/x509/by_dir.c
+++ b/src/lib/libssl/src/crypto/x509/by_dir.c
@@ -337,35 +337,12 @@ get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name,
337 } 337 }
338 for (;;) { 338 for (;;) {
339 char c = '/'; 339 char c = '/';
340#ifdef OPENSSL_SYS_VMS 340
341 c = ent->dir[strlen(ent->dir) - 1]; 341 (void) snprintf(b->data, b->max,
342 if (c != ':' && c != '>' && c != ']') { 342 "%s%c%08lx.%s%d", ent->dir, c, h,
343 /* If no separator is present, we assume the 343 postfix, k);
344 directory specifier is a logical name, and 344
345 add a colon. We really should use better
346 VMS routines for merging things like this,
347 but this will do for now...
348 -- Richard Levitte */
349 c = ':';
350 } else {
351 c = '\0';
352 }
353#endif
354 if (c == '\0') {
355 /* This is special. When c == '\0', no
356 directory separator should be added. */
357 (void) snprintf(b->data, b->max,
358 "%s%08lx.%s%d", ent->dir, h,
359 postfix, k);
360 } else {
361 (void) snprintf(b->data, b->max,
362 "%s%c%08lx.%s%d", ent->dir, c, h,
363 postfix, k);
364 }
365#ifndef OPENSSL_NO_POSIX_IO 345#ifndef OPENSSL_NO_POSIX_IO
366#ifdef _WIN32
367#define stat _stat
368#endif
369 { 346 {
370 struct stat st; 347 struct stat st;
371 if (stat(b->data, &st) < 0) 348 if (stat(b->data, &st) < 0)