From: Pauli Date: Thu, 8 Oct 2020 00:25:06 +0000 (+1000) Subject: vms: move otherwise dead code into the VMS relevant path. X-Git-Tag: openssl-3.0.0-alpha7~35 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=19431e5e44144b57ab936ddb93fe75fe34279290;p=thirdparty%2Fopenssl.git vms: move otherwise dead code into the VMS relevant path. Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/13091) --- diff --git a/crypto/x509/by_dir.c b/crypto/x509/by_dir.c index 3f44d541cf1..f182764899a 100644 --- a/crypto/x509/by_dir.c +++ b/crypto/x509/by_dir.c @@ -284,6 +284,7 @@ static int get_cert_by_subject_ex(X509_LOOKUP *xl, X509_LOOKUP_TYPE type, } for (;;) { char c = '/'; + #ifdef OPENSSL_SYS_VMS c = ent->dir[strlen(ent->dir) - 1]; if (c != ':' && c != '>' && c != ']') { @@ -297,7 +298,7 @@ static int get_cert_by_subject_ex(X509_LOOKUP *xl, X509_LOOKUP_TYPE type, } else { c = '\0'; } -#endif + if (c == '\0') { /* * This is special. When c == '\0', no directory separator @@ -305,7 +306,9 @@ static int get_cert_by_subject_ex(X509_LOOKUP *xl, X509_LOOKUP_TYPE type, */ BIO_snprintf(b->data, b->max, "%s%08lx.%s%d", ent->dir, h, postfix, k); - } else { + } else +#endif + { BIO_snprintf(b->data, b->max, "%s%c%08lx.%s%d", ent->dir, c, h, postfix, k); }