remove ecdh.h header
[openssl.git] / test / ecdhtest.c
index af124764c832cc26547b317bce42359c53775e56..d77e007248a4116a3bba30bcf9aaf94532b3ea8d 100644 (file)
@@ -90,7 +90,6 @@ int main(int argc, char *argv[])
 }
 #else
 # include <openssl/ec.h>
-# include <openssl/ecdh.h>
 
 static const char rnd_seed[] =
     "string to make the random number generator think it has entropy";
@@ -278,10 +277,8 @@ static int test_ecdh_curve(int nid, const char *text, BN_CTX *ctx, BIO *out)
  err:
     ERR_print_errors_fp(stderr);
 
-    if (abuf != NULL)
-        OPENSSL_free(abuf);
-    if (bbuf != NULL)
-        OPENSSL_free(bbuf);
+    OPENSSL_free(abuf);
+    OPENSSL_free(bbuf);
     BN_free(x_a);
     BN_free(y_a);
     BN_free(x_b);
@@ -433,8 +430,7 @@ static int ecdh_kat(BIO *out, const char *cname, int nid,
  err:
     EC_KEY_free(key1);
     EC_KEY_free(key2);
-    if (Ztmp)
-        OPENSSL_free(Ztmp);
+    OPENSSL_free(Ztmp);
     if (rv)
         BIO_puts(out, " ok\n");
     else {
@@ -469,7 +465,7 @@ int main(int argc, char *argv[])
     out = BIO_new(BIO_s_file());
     if (out == NULL)
         EXIT(1);
-    BIO_set_fp(out, stdout, BIO_NOCLOSE);
+    BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT);
 
     if ((ctx = BN_CTX_new()) == NULL)
         goto err;