2 * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
10 /* ====================================================================
11 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
13 * The Elliptic Curve Public-Key Crypto Library (ECC Code) included
14 * herein is developed by SUN MICROSYSTEMS, INC., and is contributed
15 * to the OpenSSL project.
17 * The ECC Code is licensed pursuant to the OpenSSL open source
18 * license provided below.
20 * The ECDH software is originally written by Douglas Stebila of
21 * Sun Microsystems Laboratories.
31 #include <openssl/opensslconf.h> /* for OPENSSL_NO_EC */
32 #include <openssl/crypto.h>
33 #include <openssl/bio.h>
34 #include <openssl/bn.h>
35 #include <openssl/objects.h>
36 #include <openssl/rand.h>
37 #include <openssl/sha.h>
38 #include <openssl/err.h>
41 int main(int argc, char *argv[])
43 printf("No ECDH support\n");
47 # include <openssl/ec.h>
49 static const char rnd_seed[] =
50 "string to make the random number generator think it has entropy";
52 int main(int argc, char *argv[])
57 CRYPTO_set_mem_debug(1);
58 CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
60 RAND_seed(rnd_seed, sizeof rnd_seed);
62 out = BIO_new(BIO_s_file());
65 BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT);
67 /* NAMED CURVES TESTS: moved to evptests.txt */
69 /* KATs: moved to evptests.txt */
71 /* NIST SP800-56A co-factor ECDH KATs: moved to evptests.txt */
76 ERR_print_errors_fp(stderr);
79 #ifndef OPENSSL_NO_CRYPTO_MDEBUG
80 if (CRYPTO_mem_leaks_fp(stderr) <= 0)