diff options
author | markus <> | 2004-04-08 08:03:15 +0000 |
---|---|---|
committer | markus <> | 2004-04-08 08:03:15 +0000 |
commit | 40d673554117d24c9f46be721235d3e302c06e04 (patch) | |
tree | 341e7f38b840f3e503afb6e471123c0f2ba082c3 /src/lib/libcrypto/x509/by_dir.c | |
parent | cbf88de39286be06cd20e0c65b6cb7633dce25a5 (diff) | |
download | openbsd-40d673554117d24c9f46be721235d3e302c06e04.tar.gz openbsd-40d673554117d24c9f46be721235d3e302c06e04.tar.bz2 openbsd-40d673554117d24c9f46be721235d3e302c06e04.zip |
merge 0.9.7d
Diffstat (limited to 'src/lib/libcrypto/x509/by_dir.c')
-rw-r--r-- | src/lib/libcrypto/x509/by_dir.c | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/src/lib/libcrypto/x509/by_dir.c b/src/lib/libcrypto/x509/by_dir.c index a5c306f1fd..6207340472 100644 --- a/src/lib/libcrypto/x509/by_dir.c +++ b/src/lib/libcrypto/x509/by_dir.c | |||
@@ -302,8 +302,38 @@ static int get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name, | |||
302 | k=0; | 302 | k=0; |
303 | for (;;) | 303 | for (;;) |
304 | { | 304 | { |
305 | snprintf(b->data,b->max,"%s/%08lx.%s%d",ctx->dirs[i],h, | 305 | char c = '/'; |
306 | postfix,k); | 306 | #ifdef OPENSSL_SYS_VMS |
307 | c = ctx->dirs[i][strlen(ctx->dirs[i])-1]; | ||
308 | if (c != ':' && c != '>' && c != ']') | ||
309 | { | ||
310 | /* If no separator is present, we assume the | ||
311 | directory specifier is a logical name, and | ||
312 | add a colon. We really should use better | ||
313 | VMS routines for merging things like this, | ||
314 | but this will do for now... | ||
315 | -- Richard Levitte */ | ||
316 | c = ':'; | ||
317 | } | ||
318 | else | ||
319 | { | ||
320 | c = '\0'; | ||
321 | } | ||
322 | #endif | ||
323 | if (c == '\0') | ||
324 | { | ||
325 | /* This is special. When c == '\0', no | ||
326 | directory separator should be added. */ | ||
327 | BIO_snprintf(b->data,b->max, | ||
328 | "%s%08lx.%s%d",ctx->dirs[i],h, | ||
329 | postfix,k); | ||
330 | } | ||
331 | else | ||
332 | { | ||
333 | BIO_snprintf(b->data,b->max, | ||
334 | "%s%c%08lx.%s%d",ctx->dirs[i],c,h, | ||
335 | postfix,k); | ||
336 | } | ||
307 | k++; | 337 | k++; |
308 | if (stat(b->data,&st) < 0) | 338 | if (stat(b->data,&st) < 0) |
309 | break; | 339 | break; |