summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-09-09 00:58:21 +0200
committerRichard Levitte <levitte@openssl.org>2016-09-20 18:24:24 +0200
commit16c6deed2c42d4cf4a7676a32b718d6a867f482a (patch)
tree3b9dabde4b4ef76669f55763c12675541007dd6f
parentConvert WPACKET_put_bytes to use convenience macros (diff)
downloadopenssl-16c6deed2c42d4cf4a7676a32b718d6a867f482a.tar.xz
openssl-16c6deed2c42d4cf4a7676a32b718d6a867f482a.zip
Fixup BIO demos for OpenSSL 1.1.x
Note: server-cmod doesn't seem to do things right... from loading cmod.cnf, it tries to load libssl_conf.so. Reviewed-by: Rich Salz <rsalz@openssl.org>
-rw-r--r--demos/bio/client-arg.c4
-rw-r--r--demos/bio/client-conf.c4
-rw-r--r--demos/bio/saccept.c7
-rw-r--r--demos/bio/sconnect.c5
-rw-r--r--demos/bio/server-arg.c6
-rw-r--r--demos/bio/server-cmod.c5
-rw-r--r--demos/bio/server-conf.c5
7 files changed, 3 insertions, 33 deletions
diff --git a/demos/bio/client-arg.c b/demos/bio/client-arg.c
index 9e136e563d..e8d5e46ab5 100644
--- a/demos/bio/client-arg.c
+++ b/demos/bio/client-arg.c
@@ -23,10 +23,6 @@ int main(int argc, char **argv)
const char *connect_str = "localhost:4433";
int nargs = argc - 1;
- ERR_load_crypto_strings();
- ERR_load_SSL_strings();
- SSL_library_init();
-
ctx = SSL_CTX_new(TLS_client_method());
cctx = SSL_CONF_CTX_new();
SSL_CONF_CTX_set_flags(cctx, SSL_CONF_FLAG_CLIENT);
diff --git a/demos/bio/client-conf.c b/demos/bio/client-conf.c
index 66b5cac47c..e819030eec 100644
--- a/demos/bio/client-conf.c
+++ b/demos/bio/client-conf.c
@@ -26,10 +26,6 @@ int main(int argc, char **argv)
const char *connect_str = "localhost:4433";
long errline = -1;
- ERR_load_crypto_strings();
- ERR_load_SSL_strings();
- SSL_library_init();
-
conf = NCONF_new(NULL);
if (NCONF_load(conf, "connect.cnf", &errline) <= 0) {
diff --git a/demos/bio/saccept.c b/demos/bio/saccept.c
index 106a089daf..66c5c61755 100644
--- a/demos/bio/saccept.c
+++ b/demos/bio/saccept.c
@@ -26,7 +26,7 @@
static int done = 0;
-void interrupt()
+void interrupt(int sig)
{
done = 1;
}
@@ -58,11 +58,6 @@ int main(int argc, char *argv[])
else
port = argv[1];
- SSL_load_error_strings();
-
- /* Add ciphers and message digests */
- OpenSSL_add_ssl_algorithms();
-
ctx = SSL_CTX_new(TLS_server_method());
if (!SSL_CTX_use_certificate_chain_file(ctx, CERT_FILE))
goto err;
diff --git a/demos/bio/sconnect.c b/demos/bio/sconnect.c
index 284bc30944..664a1e038c 100644
--- a/demos/bio/sconnect.c
+++ b/demos/bio/sconnect.c
@@ -55,11 +55,6 @@ char *argv[];
sock_init();
#endif
- /* Lets get nice error messages */
- SSL_load_error_strings();
-
- /* Setup all the global SSL stuff */
- OpenSSL_add_ssl_algorithms();
ssl_ctx = SSL_CTX_new(TLS_client_method());
/* Enable trust chain verification */
diff --git a/demos/bio/server-arg.c b/demos/bio/server-arg.c
index 4e9b7bdcb0..6056969fe9 100644
--- a/demos/bio/server-arg.c
+++ b/demos/bio/server-arg.c
@@ -14,6 +14,7 @@
*/
#include <stdio.h>
+#include <string.h>
#include <signal.h>
#include <openssl/err.h>
#include <openssl/ssl.h>
@@ -30,11 +31,6 @@ int main(int argc, char *argv[])
char **args = argv + 1;
int nargs = argc - 1;
- SSL_load_error_strings();
-
- /* Add ciphers and message digests */
- OpenSSL_add_ssl_algorithms();
-
ctx = SSL_CTX_new(TLS_server_method());
cctx = SSL_CONF_CTX_new();
diff --git a/demos/bio/server-cmod.c b/demos/bio/server-cmod.c
index 77b456a459..dfe233538e 100644
--- a/demos/bio/server-cmod.c
+++ b/demos/bio/server-cmod.c
@@ -27,11 +27,6 @@ int main(int argc, char *argv[])
SSL_CTX *ctx;
int ret = 1, i;
- SSL_load_error_strings();
-
- /* Add ciphers and message digests */
- OpenSSL_add_ssl_algorithms();
-
if (CONF_modules_load_file("cmod.cnf", "testapp", 0) <= 0) {
fprintf(stderr, "Error processing config file\n");
goto err;
diff --git a/demos/bio/server-conf.c b/demos/bio/server-conf.c
index 32abefdf1d..84d39f5f70 100644
--- a/demos/bio/server-conf.c
+++ b/demos/bio/server-conf.c
@@ -14,6 +14,7 @@
*/
#include <stdio.h>
+#include <string.h>
#include <signal.h>
#include <openssl/err.h>
#include <openssl/ssl.h>
@@ -33,10 +34,6 @@ int main(int argc, char *argv[])
char buf[512];
int ret = 1, i;
- SSL_load_error_strings();
-
- /* Add ciphers and message digests */
- OpenSSL_add_ssl_algorithms();
conf = NCONF_new(NULL);