diff options
author | Richard Levitte <levitte@openssl.org> | 2004-01-19 08:53:02 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2004-01-19 08:53:02 +0000 |
commit | 8b79f2051d831eb7cb51205b27661d43e3cf3f5e (patch) | |
tree | fca871353fec9cdc5c0c644580a7007d1f67ca26 /crypto/x509 | |
parent | 799562704032021e111a998c0a2e286e7b405a28 (diff) |
Recent and not so recent changes from 0.9.7-stable, all conflicts resolved.
Diffstat (limited to 'crypto/x509')
-rw-r--r-- | crypto/x509/Makefile.ssl | 2 | ||||
-rw-r--r-- | crypto/x509/by_dir.c | 34 | ||||
-rw-r--r-- | crypto/x509/x509_txt.c | 2 |
3 files changed, 34 insertions, 4 deletions
diff --git a/crypto/x509/Makefile.ssl b/crypto/x509/Makefile.ssl index 6a5a879691..3a3452536c 100644 --- a/crypto/x509/Makefile.ssl +++ b/crypto/x509/Makefile.ssl @@ -57,7 +57,7 @@ files: $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO links: - @$(TOP)/util/point.sh Makefile.ssl Makefile + @sh $(TOP)/util/point.sh Makefile.ssl Makefile @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) diff --git a/crypto/x509/by_dir.c b/crypto/x509/by_dir.c index 448bd7e69c..c9bfe40ab6 100644 --- a/crypto/x509/by_dir.c +++ b/crypto/x509/by_dir.c @@ -302,8 +302,38 @@ 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 OPENSSL_SYS_VMS + char 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. */ + BIO_snprintf(b->data,b->max, + "%s%08lx.%s%d",ctx->dirs[i],h, + postfix,k); + } + else + { + BIO_snprintf(b->data,b->max, + "%s%c%08lx.%s%d",ctx->dirs[i],c,h, + postfix,k); + } k++; if (stat(b->data,&st) < 0) break; diff --git a/crypto/x509/x509_txt.c b/crypto/x509/x509_txt.c index 4f83db8ba2..5a945a70fb 100644 --- a/crypto/x509/x509_txt.c +++ b/crypto/x509/x509_txt.c @@ -148,7 +148,7 @@ const char *X509_verify_cert_error_string(long n) return("unhandled critical extension"); default: - sprintf(buf,"error number %ld",n); + BIO_snprintf(buf,sizeof buf,"error number %ld",n); return(buf); } } |