summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormiod <>2014-06-01 14:47:14 +0000
committermiod <>2014-06-01 14:47:14 +0000
commit80aec33a6fd0623b001a8f27386db1459998842b (patch)
tree5241f2707aa94b0d15bad9c799e4ad0ea7cfa480
parentcfa204ac71b41465595c9237c888f02fd34c65e5 (diff)
downloadopenbsd-80aec33a6fd0623b001a8f27386db1459998842b.tar.gz
openbsd-80aec33a6fd0623b001a8f27386db1459998842b.tar.bz2
openbsd-80aec33a6fd0623b001a8f27386db1459998842b.zip
Build with WARNINGS=Yes and Werror.
-rw-r--r--src/regress/lib/libssl/ssl/Makefile4
-rw-r--r--src/regress/lib/libssl/ssl/ssltest.c12
2 files changed, 4 insertions, 12 deletions
diff --git a/src/regress/lib/libssl/ssl/Makefile b/src/regress/lib/libssl/ssl/Makefile
index 35a7a9a6be..b7359155da 100644
--- a/src/regress/lib/libssl/ssl/Makefile
+++ b/src/regress/lib/libssl/ssl/Makefile
@@ -1,8 +1,10 @@
1# $OpenBSD: Makefile,v 1.1 2014/05/24 14:56:32 jsing Exp $ 1# $OpenBSD: Makefile,v 1.2 2014/06/01 14:47:14 miod Exp $
2 2
3PROG= ssltest 3PROG= ssltest
4LDADD= -lcrypto -lssl 4LDADD= -lcrypto -lssl
5DPADD= ${LIBCRYPTO} ${LIBSSL} 5DPADD= ${LIBCRYPTO} ${LIBSSL}
6WARNINGS= Yes
7CFLAGS+= -Werror
6 8
7REGRESS_TARGETS=regress-ssltest 9REGRESS_TARGETS=regress-ssltest
8 10
diff --git a/src/regress/lib/libssl/ssl/ssltest.c b/src/regress/lib/libssl/ssl/ssltest.c
index 879bf4b3ed..38c70906bb 100644
--- a/src/regress/lib/libssl/ssl/ssltest.c
+++ b/src/regress/lib/libssl/ssl/ssltest.c
@@ -458,16 +458,6 @@ main(int argc, char *argv[])
458 458
459 CRYPTO_set_locking_callback(lock_dbg_cb); 459 CRYPTO_set_locking_callback(lock_dbg_cb);
460 460
461 /* enable memory leak checking unless explicitly disabled */
462 if (!((getenv("OPENSSL_DEBUG_MEMORY") != NULL) && (0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off")))) {
463 CRYPTO_malloc_debug_init();
464 CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL);
465 } else {
466 /* OPENSSL_DEBUG_MEMORY=off */
467 CRYPTO_set_mem_debug_functions(0, 0, 0, 0, 0);
468 }
469 CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
470
471 bio_stdout = BIO_new_fp(stdout, BIO_NOCLOSE|BIO_FP_TEXT); 461 bio_stdout = BIO_new_fp(stdout, BIO_NOCLOSE|BIO_FP_TEXT);
472 462
473 argc--; 463 argc--;
@@ -2148,7 +2138,7 @@ psk_client_callback(SSL *ssl, const char *hint, char *identity,
2148 unsigned int psk_len = 0; 2138 unsigned int psk_len = 0;
2149 2139
2150 ret = snprintf(identity, max_identity_len, "Client_identity"); 2140 ret = snprintf(identity, max_identity_len, "Client_identity");
2151 if (ret >= max_identity_len || ret == -1) 2141 if (ret == -1 || (unsigned int)ret >= max_identity_len)
2152 goto out_err; 2142 goto out_err;
2153 if (debug) 2143 if (debug)
2154 fprintf(stderr, "client: created identity '%s' len=%d\n", identity, ret); 2144 fprintf(stderr, "client: created identity '%s' len=%d\n", identity, ret);