| OLD | NEW |
| 1 /* crypto/ecdh/ecdhtest.c */ | 1 /* crypto/ecdh/ecdhtest.c */ |
| 2 /* ==================================================================== | 2 /* ==================================================================== |
| 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. | 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. |
| 4 * | 4 * |
| 5 * The Elliptic Curve Public-Key Crypto Library (ECC Code) included | 5 * The Elliptic Curve Public-Key Crypto Library (ECC Code) included |
| 6 * herein is developed by SUN MICROSYSTEMS, INC., and is contributed | 6 * herein is developed by SUN MICROSYSTEMS, INC., and is contributed |
| 7 * to the OpenSSL project. | 7 * to the OpenSSL project. |
| 8 * | 8 * |
| 9 * The ECC Code is licensed pursuant to the OpenSSL open source | 9 * The ECC Code is licensed pursuant to the OpenSSL open source |
| 10 * license provided below. | 10 * license provided below. |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 if (!test_ecdh_curve(NID_sect571k1, "NIST Binary-Curve K-571", ctx, out)
) goto err; | 336 if (!test_ecdh_curve(NID_sect571k1, "NIST Binary-Curve K-571", ctx, out)
) goto err; |
| 337 if (!test_ecdh_curve(NID_sect571r1, "NIST Binary-Curve B-571", ctx, out)
) goto err; | 337 if (!test_ecdh_curve(NID_sect571r1, "NIST Binary-Curve B-571", ctx, out)
) goto err; |
| 338 | 338 |
| 339 ret = 0; | 339 ret = 0; |
| 340 | 340 |
| 341 err: | 341 err: |
| 342 ERR_print_errors_fp(stderr); | 342 ERR_print_errors_fp(stderr); |
| 343 if (ctx) BN_CTX_free(ctx); | 343 if (ctx) BN_CTX_free(ctx); |
| 344 BIO_free(out); | 344 BIO_free(out); |
| 345 CRYPTO_cleanup_all_ex_data(); | 345 CRYPTO_cleanup_all_ex_data(); |
| 346 » ERR_remove_state(0); | 346 » ERR_remove_thread_state(NULL); |
| 347 CRYPTO_mem_leaks_fp(stderr); | 347 CRYPTO_mem_leaks_fp(stderr); |
| 348 EXIT(ret); | 348 EXIT(ret); |
| 349 return(ret); | 349 return(ret); |
| 350 } | 350 } |
| 351 | 351 |
| 352 #if 0 | 352 #if 0 |
| 353 static void MS_CALLBACK cb(int p, int n, void *arg) | 353 static void MS_CALLBACK cb(int p, int n, void *arg) |
| 354 { | 354 { |
| 355 char c='*'; | 355 char c='*'; |
| 356 | 356 |
| 357 if (p == 0) c='.'; | 357 if (p == 0) c='.'; |
| 358 if (p == 1) c='+'; | 358 if (p == 1) c='+'; |
| 359 if (p == 2) c='*'; | 359 if (p == 2) c='*'; |
| 360 if (p == 3) c='\n'; | 360 if (p == 3) c='\n'; |
| 361 BIO_write((BIO *)arg,&c,1); | 361 BIO_write((BIO *)arg,&c,1); |
| 362 (void)BIO_flush((BIO *)arg); | 362 (void)BIO_flush((BIO *)arg); |
| 363 #ifdef LINT | 363 #ifdef LINT |
| 364 p=n; | 364 p=n; |
| 365 #endif | 365 #endif |
| 366 } | 366 } |
| 367 #endif | 367 #endif |
| 368 #endif | 368 #endif |
| OLD | NEW |