12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- /* test_main.c
- *
- * Copyright (C) 2006-2015 wolfSSL Inc.
- *
- * This file is part of wolfSSL. (formerly known as CyaSSL)
- *
- * wolfSSL is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * wolfSSL is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
- #ifdef HAVE_CONFIG_H
- #include <config.h>
- #endif
- #include <wolfssl/wolfcrypt/settings.h>
- #include <wolfcrypt/test/test.h>
- #include <stdio.h>
- typedef struct func_args {
- int argc;
- char** argv;
- int return_code;
- } func_args;
- static func_args args = { 0 } ;
- void main(void)
- {
- int test_num = 0;
- do
- {
- printf("\nCrypt Test %d:\n", test_num);
- wolfcrypt_test(&args);
- printf("Crypt Test %d: Return code %d\n", test_num, args.return_code);
-
- test_num++;
- } while(args.return_code == 0);
- }
- /* SAMPLE OUTPUT:
- Crypt Test 1:
- MD5 test passed!
- MD4 test passed!
- SHA test passed!
- SHA-256 test passed!
- HMAC-MD5 test passed!
- HMAC-SHA test passed!
- HMAC-SHA256 test passed!
- ARC4 test passed!
- HC-128 test passed!
- Rabbit test passed!
- DES test passed!
- DES3 test passed!
- AES test passed!
- RANDOM test passed!
- RSA test passed!
- DH test passed!
- DSA test passed!
- PWDBASED test passed!
- Crypt Test 1: Return code 0
- */
|