summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2004-01-19 08:53:02 +0000
committerRichard Levitte <levitte@openssl.org>2004-01-19 08:53:02 +0000
commit8b79f2051d831eb7cb51205b27661d43e3cf3f5e (patch)
treefca871353fec9cdc5c0c644580a7007d1f67ca26
parent799562704032021e111a998c0a2e286e7b405a28 (diff)
Recent and not so recent changes from 0.9.7-stable, all conflicts resolved.
-rw-r--r--MacOS/GetHTTPS.src/CPStringUtils.cpp2
-rw-r--r--MacOS/GetHTTPS.src/ErrorHandling.cpp2
-rw-r--r--apps/Makefile.ssl2
-rw-r--r--apps/apps.c10
-rw-r--r--apps/ca.c51
-rw-r--r--apps/dgst.c5
-rw-r--r--apps/enc.c6
-rw-r--r--apps/engine.c4
-rw-r--r--apps/pkcs12.c4
-rw-r--r--apps/req.c40
-rw-r--r--apps/s_socket.c2
-rw-r--r--apps/s_time.c6
-rw-r--r--apps/speed.c1
-rw-r--r--apps/x509.c14
-rw-r--r--crypto/Makefile.ssl4
-rw-r--r--crypto/aes/Makefile.ssl2
-rw-r--r--crypto/asn1/Makefile.ssl2
-rw-r--r--crypto/asn1/a_gentm.c9
-rw-r--r--crypto/asn1/a_mbstr.c4
-rw-r--r--crypto/asn1/a_time.c9
-rw-r--r--crypto/asn1/a_utctm.c9
-rw-r--r--crypto/asn1/asn1_lib.c4
-rw-r--r--crypto/asn1/asn1_par.c6
-rw-r--r--crypto/asn1/t_pkey.c4
-rw-r--r--crypto/asn1/x_long.c10
-rw-r--r--crypto/bf/Makefile.ssl2
-rw-r--r--crypto/bio/Makefile.ssl2
-rw-r--r--crypto/bio/b_dump.c32
-rw-r--r--crypto/bio/b_print.c6
-rw-r--r--crypto/bio/b_sock.c12
-rw-r--r--crypto/bio/bio_cb.c36
-rw-r--r--crypto/bio/bss_conn.c6
-rw-r--r--crypto/bio/bss_file.c10
-rw-r--r--crypto/bn/Makefile.ssl2
-rw-r--r--crypto/bn/bn_lib.c8
-rw-r--r--crypto/bn/bn_print.c5
-rw-r--r--crypto/buffer/Makefile.ssl2
-rw-r--r--crypto/cast/Makefile.ssl2
-rw-r--r--crypto/comp/Makefile.ssl2
-rw-r--r--crypto/conf/Makefile.ssl2
-rw-r--r--crypto/conf/conf_def.c6
-rw-r--r--crypto/conf/conf_mod.c8
-rw-r--r--crypto/cversion.c8
-rw-r--r--crypto/des/Makefile.ssl2
-rw-r--r--crypto/des/ecb_enc.c4
-rw-r--r--crypto/dh/Makefile.ssl2
-rw-r--r--crypto/dsa/Makefile.ssl2
-rw-r--r--crypto/dso/Makefile.ssl2
-rw-r--r--crypto/dso/dso_lib.c4
-rw-r--r--crypto/ec/Makefile.ssl2
-rw-r--r--crypto/engine/Makefile.ssl2
-rw-r--r--crypto/engine/eng_ctrl.c10
-rw-r--r--crypto/engine/hw_cryptodev.c4
-rw-r--r--crypto/err/Makefile.ssl2
-rw-r--r--crypto/err/err.c2
-rw-r--r--crypto/evp/Makefile.ssl2
-rw-r--r--crypto/evp/bio_ok.c2
-rw-r--r--crypto/evp/evp_pbe.c2
-rw-r--r--crypto/evp/evp_pkey.c2
-rw-r--r--crypto/hmac/Makefile.ssl2
-rw-r--r--crypto/idea/Makefile.ssl2
-rw-r--r--crypto/krb5/Makefile.ssl2
-rw-r--r--crypto/lhash/Makefile.ssl2
-rw-r--r--crypto/md2/Makefile.ssl2
-rw-r--r--crypto/md4/Makefile.ssl2
-rw-r--r--crypto/md5/Makefile.ssl2
-rw-r--r--crypto/mdc2/Makefile.ssl2
-rw-r--r--crypto/mem_dbg.c17
-rw-r--r--crypto/objects/Makefile.ssl2
-rw-r--r--crypto/objects/obj_dat.c4
-rw-r--r--crypto/objects/obj_dat.pl4
-rw-r--r--crypto/ocsp/Makefile.ssl2
-rw-r--r--crypto/pem/Makefile.ssl2
-rw-r--r--crypto/pem/pem_lib.c14
-rw-r--r--crypto/pkcs12/Makefile.ssl2
-rw-r--r--crypto/pkcs7/Makefile.ssl2
-rw-r--r--crypto/rand/Makefile.ssl2
-rw-r--r--crypto/rand/rand_egd.c3
-rw-r--r--crypto/rand/rand_unix.c19
-rw-r--r--crypto/rand/rand_win.c2
-rw-r--r--crypto/rand/randfile.c67
-rw-r--r--crypto/rc2/Makefile.ssl2
-rw-r--r--crypto/rc4/Makefile.ssl2
-rw-r--r--crypto/rc5/Makefile.ssl2
-rw-r--r--crypto/ripemd/Makefile.ssl2
-rw-r--r--crypto/rsa/Makefile.ssl2
-rw-r--r--crypto/sha/Makefile.ssl2
-rw-r--r--crypto/stack/Makefile.ssl2
-rw-r--r--crypto/threads/mttest.c3
-rw-r--r--crypto/txt_db/Makefile.ssl2
-rw-r--r--crypto/ui/Makefile.ssl2
-rw-r--r--crypto/ui/ui_lib.c13
-rw-r--r--crypto/x509/Makefile.ssl2
-rw-r--r--crypto/x509/by_dir.c34
-rw-r--r--crypto/x509/x509_txt.c2
-rw-r--r--crypto/x509v3/Makefile.ssl2
-rw-r--r--crypto/x509v3/v3_alt.c3
-rw-r--r--crypto/x509v3/v3_info.c11
-rw-r--r--doc/apps/openssl.pod3
-rw-r--r--doc/apps/s_client.pod6
-rw-r--r--doc/crypto/OpenSSL_add_all_algorithms.pod2
-rw-r--r--doc/crypto/RSA_print.pod2
-rw-r--r--doc/crypto/pem.pod6
-rw-r--r--doc/ssleay.txt2
-rw-r--r--ssl/Makefile.ssl2
-rw-r--r--ssl/s2_clnt.c1
-rw-r--r--ssl/s2_enc.c1
-rw-r--r--ssl/s2_lib.c3
-rw-r--r--ssl/s2_pkt.c1
-rw-r--r--ssl/s2_srvr.c1
-rw-r--r--ssl/s3_clnt.c1
-rw-r--r--ssl/s3_enc.c12
-rw-r--r--ssl/s3_lib.c2
-rw-r--r--ssl/s3_srvr.c3
-rw-r--r--ssl/ssl_asn1.c1
-rw-r--r--ssl/ssl_ciph.c14
-rw-r--r--ssl/ssl_lib.c1
-rw-r--r--ssl/ssl_sess.c1
-rw-r--r--test/Makefile.ssl4
-rw-r--r--tools/Makefile.ssl2
120 files changed, 437 insertions, 289 deletions
diff --git a/MacOS/GetHTTPS.src/CPStringUtils.cpp b/MacOS/GetHTTPS.src/CPStringUtils.cpp
index 5f64afe967..617aae2c70 100644
--- a/MacOS/GetHTTPS.src/CPStringUtils.cpp
+++ b/MacOS/GetHTTPS.src/CPStringUtils.cpp
@@ -2750,4 +2750,4 @@ void SkipWhiteSpace(char **ioSrcCharPtr,const Boolean inStopAtEOL)
}
}
}
-} \ No newline at end of file
+}
diff --git a/MacOS/GetHTTPS.src/ErrorHandling.cpp b/MacOS/GetHTTPS.src/ErrorHandling.cpp
index 07a32de59e..80b6a675f4 100644
--- a/MacOS/GetHTTPS.src/ErrorHandling.cpp
+++ b/MacOS/GetHTTPS.src/ErrorHandling.cpp
@@ -167,4 +167,4 @@ void ThrowErrorMessageException(void)
ThrowDescriptiveException(gErrorMessage);
}
-#endif \ No newline at end of file
+#endif
diff --git a/apps/Makefile.ssl b/apps/Makefile.ssl
index 90e71dee76..7068286204 100644
--- a/apps/Makefile.ssl
+++ b/apps/Makefile.ssl
@@ -121,7 +121,7 @@ tags:
tests:
links:
- @$(TOP)/util/point.sh Makefile.ssl Makefile
+ @sh $(TOP)/util/point.sh Makefile.ssl Makefile
lint:
lint -DLINT $(INCLUDES) $(SRC)>fluff
diff --git a/apps/apps.c b/apps/apps.c
index 2a7c7f25a2..cfb7539a49 100644
--- a/apps/apps.c
+++ b/apps/apps.c
@@ -1385,14 +1385,16 @@ int load_config(BIO *err, CONF *cnf)
char *make_config_name()
{
const char *t=X509_get_default_cert_area();
+ size_t len;
char *p;
- p=OPENSSL_malloc(strlen(t)+strlen(OPENSSL_CONF)+2);
- strcpy(p,t);
+ len=strlen(t)+strlen(OPENSSL_CONF)+2;
+ p=OPENSSL_malloc(len);
+ BUF_strlcpy(p,t,len);
#ifndef OPENSSL_SYS_VMS
- strcat(p,"/");
+ BUF_strlcat(p,"/",len);
#endif
- strcat(p,OPENSSL_CONF);
+ BUF_strlcat(p,OPENSSL_CONF,len);
return p;
}
diff --git a/apps/ca.c b/apps/ca.c
index b5a08be246..f4299c3280 100644
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -569,16 +569,19 @@ bad:
if (configfile == NULL)
{
const char *s=X509_get_default_cert_area();
+ size_t len;
#ifdef OPENSSL_SYS_VMS
- tofree=OPENSSL_malloc(strlen(s)+sizeof(CONFIG_FILE));
+ len = strlen(s)+sizeof(CONFIG_FILE);
+ tofree=OPENSSL_malloc(len);
strcpy(tofree,s);
#else
- tofree=OPENSSL_malloc(strlen(s)+sizeof(CONFIG_FILE)+1);
- strcpy(tofree,s);
- strcat(tofree,"/");
+ len = strlen(s)+sizeof(CONFIG_FILE)+1;
+ tofree=OPENSSL_malloc(len);
+ BUF_strlcpy(tofree,s,len);
+ BUF_strlcat(tofree,"/",len);
#endif
- strcat(tofree,CONFIG_FILE);
+ BUF_strlcat(tofree,CONFIG_FILE,len);
configfile=tofree;
}
@@ -1302,7 +1305,7 @@ bad:
#ifdef OPENSSL_SYS_VMS
strcat(buf[0],"-new");
#else
- strcat(buf[0],".new");
+ BUF_strlcat(buf[0],".new",sizeof(buf[0]));
#endif
if (!save_serial(buf[0],serial)) goto err;
@@ -1312,7 +1315,7 @@ bad:
#ifdef OPENSSL_SYS_VMS
strcat(buf[1],"-new");
#else
- strcat(buf[1],".new");
+ BUF_strlcat(buf[1],".new",sizeof(buf[1]));
#endif
if (BIO_write_filename(out,buf[1]) <= 0)
@@ -1330,7 +1333,7 @@ bad:
for (i=0; i<sk_X509_num(cert_sk); i++)
{
int k;
- unsigned char *n;
+ char *n;
x=sk_X509_value(cert_sk,i);
@@ -1346,15 +1349,19 @@ bad:
strcpy(buf[2],outdir);
#ifndef OPENSSL_SYS_VMS
- strcat(buf[2],"/");
+ BUF_strlcat(buf[2],"/",sizeof(buf[2]));
#endif
- n=(unsigned char *)&(buf[2][strlen(buf[2])]);
+ n=(char *)&(buf[2][strlen(buf[2])]);
if (j > 0)
{
for (k=0; k<j; k++)
{
- sprintf((char *)n,"%02X",(unsigned char)*(p++));
+ if (n >= &(buf[2][sizeof(buf[2])]))
+ break;
+ BIO_snprintf(n,
+ &buf[2][0] + sizeof(buf[2]) - n,
+ "%02X",(unsigned char)*(p++));
n+=2;
}
}
@@ -1386,7 +1393,7 @@ bad:
#ifdef OPENSSL_SYS_VMS
strcat(buf[2],"-old");
#else
- strcat(buf[2],".old");
+ BUF_strlcat(buf[2],".old",sizeof(buf[2]));
#endif
BIO_free(in);
@@ -1415,7 +1422,7 @@ bad:
#ifdef OPENSSL_SYS_VMS
strcat(buf[2],"-old");
#else
- strcat(buf[2],".old");
+ BUF_strlcat(buf[2],".old",sizeof(buf[2]));
#endif
if (rename(dbfile,buf[2]) < 0)
@@ -1585,7 +1592,7 @@ bad:
strcpy(buf[0],dbfile);
#ifndef OPENSSL_SYS_VMS
- strcat(buf[0],".new");
+ BUF_strlcat(buf[0],".new",sizeof(buf[0]));
#else
strcat(buf[0],"-new");
#endif
@@ -1604,7 +1611,7 @@ bad:
strncpy(buf[1],dbfile,BSIZE-4);
buf[1][BSIZE-4]='\0';
#ifndef OPENSSL_SYS_VMS
- strcat(buf[1],".old");
+ BUF_strlcat(buf[1],".old",sizeof(buf[1]));
#else
strcat(buf[1],"-old");
#endif
@@ -2342,7 +2349,7 @@ again2:
BIO_printf(bio_err,"Memory allocation failure\n");
goto err;
}
- strcpy(row[DB_file],"unknown");
+ BUF_strlcpy(row[DB_file],"unknown",8);
row[DB_type][0]='V';
row[DB_type][1]='\0';
@@ -2643,7 +2650,7 @@ static int do_revoke(X509 *x509, TXT_DB *db, int type, char *value)
BIO_printf(bio_err,"Memory allocation failure\n");
goto err;
}
- strcpy(row[DB_file],"unknown");
+ BUF_strlcpy(row[DB_file],"unknown",8);
row[DB_type][0]='V';
row[DB_type][1]='\0';
@@ -2967,16 +2974,16 @@ char *make_revocation_str(int rev_type, char *rev_arg)
if (!str) return NULL;
- strcpy(str, (char *)revtm->data);
+ BUF_strlcpy(str, (char *)revtm->data, i);
if (reason)
{
- strcat(str, ",");
- strcat(str, reason);
+ BUF_strlcat(str, ",", i);
+ BUF_strlcat(str, reason, i);
}
if (other)
{<