diff options
author | Richard Levitte <levitte@openssl.org> | 2004-01-23 19:08:20 +0300 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2004-01-23 19:08:20 +0300 |
commit | e7534d60601ec11deeaa349e27036ab0a3305fd2 (patch) | |
tree | 6d33da640d27d8d0017de695f83c66fbc25d7e48 /crypto/x509 | |
parent | 91de3e1952782fc0a4b893b3cef3c7d4ca1b098f (diff) |
Recent changes from 0.9.6-stable.
Diffstat (limited to 'crypto/x509')
-rw-r--r-- | crypto/x509/by_dir.c | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/crypto/x509/by_dir.c b/crypto/x509/by_dir.c index 448bd7e69c..f09022379f 100644 --- a/crypto/x509/by_dir.c +++ b/crypto/x509/by_dir.c @@ -302,8 +302,36 @@ static int get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name, k=0; for (;;) { - sprintf(b->data,"%s/%08lx.%s%d",ctx->dirs[i],h, - postfix,k); + char c = '/'; +#ifdef VMS + c = ctx->dirs[i][strlen(ctx->dirs[i])-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. */ + sprintf(b->data,"%s%08lx.%s%d",ctx->dirs[i],h, + postfix,k); + } + else + { + snprintf(b->data,"%s%c%08lx.%s%d", + ctx->dirs[i],c,h,postfix,k); + } k++; if (stat(b->data,&st) < 0) break; |