Browse Source

Release v3.12.2 (lib 14.0.0). Updated copywright.

David Garske 6 years ago
parent
commit
911b6f95f8
100 changed files with 522 additions and 417 deletions
  1. 1 1
      IDE/GCC-ARM/Header/user_settings.h
  2. 1 1
      IDE/GCC-ARM/Source/benchmark_main.c
  3. 1 1
      IDE/IAR-EWARM/Projects/benchmark/benchmark-main.c
  4. 2 2
      IDE/IAR-EWARM/Projects/benchmark/current_time.c
  5. 1 1
      IDE/IAR-EWARM/Projects/common/minimum-startup.c
  6. 1 1
      IDE/IAR-EWARM/Projects/test/test-main.c
  7. 1 1
      IDE/LPCXPRESSO/lib_wolfssl/lpc_18xx_port.c
  8. 1 1
      IDE/LPCXPRESSO/wolf_example/src/lpc_18xx_startup.c
  9. 33 33
      IDE/MDK-ARM/LPC43xx/time-LCP43xx.c
  10. 1 1
      IDE/MDK-ARM/MDK-ARM/wolfSSL/cert_data.c
  11. 6 6
      IDE/MDK-ARM/MDK-ARM/wolfSSL/config-BARE-METAL.h
  12. 7 7
      IDE/MDK-ARM/MDK-ARM/wolfSSL/config-FS.h
  13. 7 7
      IDE/MDK-ARM/MDK-ARM/wolfSSL/config-RTX-TCP-FS.h
  14. 1 1
      IDE/MDK-ARM/MDK-ARM/wolfSSL/config.h
  15. 14 14
      IDE/MDK-ARM/MDK-ARM/wolfSSL/main.c
  16. 42 42
      IDE/MDK-ARM/MDK-ARM/wolfSSL/shell.c
  17. 5 5
      IDE/MDK-ARM/MDK-ARM/wolfSSL/time-CortexM3-4.c
  18. 5 5
      IDE/MDK-ARM/MDK-ARM/wolfSSL/time-dummy.c
  19. 38 38
      IDE/MDK-ARM/MDK-ARM/wolfSSL/wolfssl_MDK_ARM.c
  20. 8 8
      IDE/MDK-ARM/MDK-ARM/wolfSSL/wolfssl_MDK_ARM.h
  21. 1 1
      IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c
  22. 5 5
      IDE/MDK5-ARM/Conf/config-Crypt.h
  23. 1 1
      IDE/MDK5-ARM/Inc/config.h
  24. 6 6
      IDE/MDK5-ARM/Inc/wolfssl_MDK_ARM.h
  25. 7 7
      IDE/MDK5-ARM/Projects/CryptBenchmark/main.c
  26. 5 5
      IDE/MDK5-ARM/Projects/CryptBenchmark/time-CortexM3-4.c
  27. 7 7
      IDE/MDK5-ARM/Projects/CryptTest/main.c
  28. 1 1
      IDE/MDK5-ARM/Projects/EchoClient/config-EchoClient.h
  29. 7 7
      IDE/MDK5-ARM/Projects/EchoClient/main.c
  30. 6 6
      IDE/MDK5-ARM/Projects/EchoServer/main.c
  31. 1 1
      IDE/MDK5-ARM/Projects/SimpleClient/config-SimpleClient.h
  32. 12 12
      IDE/MDK5-ARM/Projects/SimpleClient/main.c
  33. 5 5
      IDE/MDK5-ARM/Projects/SimpleClient/time-CortexM3-4.c
  34. 1 1
      IDE/MDK5-ARM/Projects/SimpleServer/config-SimpleServer.h
  35. 10 10
      IDE/MDK5-ARM/Projects/SimpleServer/main.c
  36. 8 8
      IDE/MDK5-ARM/Projects/wolfSSL-Full/main.c
  37. 57 57
      IDE/MDK5-ARM/Projects/wolfSSL-Full/shell.c
  38. 5 5
      IDE/MDK5-ARM/Projects/wolfSSL-Full/time-CortexM3-4.c
  39. 4 4
      IDE/MDK5-ARM/Src/ssl-dummy.c
  40. 5 5
      IDE/ROWLEY-CROSSWORKS-ARM/arm_startup.c
  41. 4 4
      IDE/ROWLEY-CROSSWORKS-ARM/benchmark_main.c
  42. 8 8
      IDE/ROWLEY-CROSSWORKS-ARM/kinetis_hw.c
  43. 1 1
      IDE/ROWLEY-CROSSWORKS-ARM/retarget.c
  44. 4 4
      IDE/ROWLEY-CROSSWORKS-ARM/test_main.c
  45. 53 0
      README
  46. 52 0
      README.md
  47. 3 3
      configure.ac
  48. 1 1
      ctaocrypt/src/misc.c
  49. 1 1
      ctaocrypt/src/wolfcrypt_first.c
  50. 1 1
      ctaocrypt/src/wolfcrypt_last.c
  51. 1 1
      cyassl/callbacks.h
  52. 1 1
      cyassl/crl.h
  53. 1 1
      cyassl/ctaocrypt/aes.h
  54. 1 1
      cyassl/ctaocrypt/arc4.h
  55. 1 1
      cyassl/ctaocrypt/asn.h
  56. 1 1
      cyassl/ctaocrypt/asn_public.h
  57. 1 1
      cyassl/ctaocrypt/blake2-impl.h
  58. 1 1
      cyassl/ctaocrypt/blake2-int.h
  59. 1 1
      cyassl/ctaocrypt/blake2.h
  60. 1 1
      cyassl/ctaocrypt/camellia.h
  61. 1 1
      cyassl/ctaocrypt/chacha.h
  62. 1 1
      cyassl/ctaocrypt/coding.h
  63. 1 1
      cyassl/ctaocrypt/compress.h
  64. 1 1
      cyassl/ctaocrypt/des3.h
  65. 1 1
      cyassl/ctaocrypt/dh.h
  66. 1 1
      cyassl/ctaocrypt/dsa.h
  67. 1 1
      cyassl/ctaocrypt/ecc.h
  68. 1 1
      cyassl/ctaocrypt/error-crypt.h
  69. 1 1
      cyassl/ctaocrypt/fips_test.h
  70. 1 1
      cyassl/ctaocrypt/hc128.h
  71. 1 1
      cyassl/ctaocrypt/hmac.h
  72. 1 1
      cyassl/ctaocrypt/integer.h
  73. 1 1
      cyassl/ctaocrypt/logging.h
  74. 1 1
      cyassl/ctaocrypt/md2.h
  75. 1 1
      cyassl/ctaocrypt/md4.h
  76. 1 1
      cyassl/ctaocrypt/md5.h
  77. 1 1
      cyassl/ctaocrypt/memory.h
  78. 1 1
      cyassl/ctaocrypt/misc.h
  79. 1 1
      cyassl/ctaocrypt/mpi_class.h
  80. 1 1
      cyassl/ctaocrypt/mpi_superclass.h
  81. 1 1
      cyassl/ctaocrypt/pkcs7.h
  82. 1 1
      cyassl/ctaocrypt/poly1305.h
  83. 1 1
      cyassl/ctaocrypt/port/pic32/pic32mz-crypt.h
  84. 1 1
      cyassl/ctaocrypt/pwdbased.h
  85. 1 1
      cyassl/ctaocrypt/rabbit.h
  86. 1 1
      cyassl/ctaocrypt/random.h
  87. 1 1
      cyassl/ctaocrypt/ripemd.h
  88. 1 1
      cyassl/ctaocrypt/rsa.h
  89. 15 15
      cyassl/ctaocrypt/settings.h
  90. 1 1
      cyassl/ctaocrypt/settings_comp.h
  91. 1 1
      cyassl/ctaocrypt/sha.h
  92. 1 1
      cyassl/ctaocrypt/sha256.h
  93. 1 1
      cyassl/ctaocrypt/sha512.h
  94. 1 1
      cyassl/ctaocrypt/tfm.h
  95. 1 1
      cyassl/ctaocrypt/types.h
  96. 1 1
      cyassl/ctaocrypt/visibility.h
  97. 1 1
      cyassl/ctaocrypt/wc_port.h
  98. 1 1
      cyassl/error-ssl.h
  99. 1 1
      cyassl/internal.h
  100. 1 1
      cyassl/ocsp.h

+ 1 - 1
IDE/GCC-ARM/Header/user_settings.h

@@ -1,6 +1,6 @@
 /* user_settings.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
IDE/GCC-ARM/Source/benchmark_main.c

@@ -1,6 +1,6 @@
 /* benchmark_main.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
IDE/IAR-EWARM/Projects/benchmark/benchmark-main.c

@@ -1,6 +1,6 @@
 /* benchmark-main.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 2 - 2
IDE/IAR-EWARM/Projects/benchmark/current_time.c

@@ -1,6 +1,6 @@
 /* current-time.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -53,7 +53,7 @@ void InitTimer(void) {
 
 static int initFlag = false ;
 double current_time(int reset)
-{   
+{
     if(!initFlag)InitTimer() ;
     initFlag = true ;
     if(reset)ROM_TimerLoadSet(TIMER0_BASE, TIMER_A, -1);

+ 1 - 1
IDE/IAR-EWARM/Projects/common/minimum-startup.c

@@ -1,6 +1,6 @@
 /* minimum-startup.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
IDE/IAR-EWARM/Projects/test/test-main.c

@@ -1,6 +1,6 @@
 /* test-main.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
IDE/LPCXPRESSO/lib_wolfssl/lpc_18xx_port.c

@@ -1,6 +1,6 @@
 /* lpc_18xx_port.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
IDE/LPCXPRESSO/wolf_example/src/lpc_18xx_startup.c

@@ -1,6 +1,6 @@
 /* lpc_18xx_startup.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 33 - 33
IDE/MDK-ARM/LPC43xx/time-LCP43xx.c

@@ -1,6 +1,6 @@
 /* time.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -19,25 +19,25 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  */
 
- 
+
 #ifdef HAVE_CONFIG_H
     #include <config.h>
 #endif
 
 
 /*-----------------------------------------------------------------------------
- *        initialize RTC 
+ *        initialize RTC
  *----------------------------------------------------------------------------*/
 #include <stdio.h>
 #include "lpc43xx_rtc.h"
 #include "lpc43xx_cgu.h"
 
-static void init_RTC() 
-{	
+static void init_RTC()
+{
 		/* Enable GPIO register interface clock                                     */
 		LPC_CCU1->CLK_M4_GPIO_CFG     |= 1;
 		while (!(LPC_CCU1->CLK_M4_GPIO_STAT   & 1)) ;
-	
+
     /* RTC Block section ------------------------------------------------------ */
     /* Init RTC module */
     RTC_Init(LPC_RTC);
@@ -53,13 +53,13 @@ static void init_RTC()
 
     /* Enable rtc (starts increase the tick counter and second counter register) */
     RTC_Cmd(LPC_RTC, ENABLE);
-				
+
 }
 
 /*-----------------------------------------------------------------------------
  *        initialize TIM
  *----------------------------------------------------------------------------*/
- 
+
 #include "lpc43xx_timer.h"
 
 static void init_TIM()
@@ -75,9 +75,9 @@ static void init_TIM()
     TIM_Cmd(LPC_TIMER2,ENABLE);
 }
 
-double current_time() 
+double current_time()
 {
-    return (double)LPC_TIMER2->TC/1000000.0; 
+    return (double)LPC_TIMER2->TC/1000000.0;
 }
 
 
@@ -88,9 +88,9 @@ void init_time(void) {
 
 #include <time.h>
 
-struct tm *Cyassl_MDK_gmtime(const time_t *c) 
-{ 
-    static struct tm date ; 
+struct tm *Cyassl_MDK_gmtime(const time_t *c)
+{
+    static struct tm date ;
 
   	RTC_TIME_Type RTCFullTime;
 	  RTC_GetFullTime (LPC_RTC, &RTCFullTime);
@@ -102,17 +102,17 @@ struct tm *Cyassl_MDK_gmtime(const time_t *c)
     date.tm_min = RTCFullTime.MIN ;
     date.tm_sec = RTCFullTime.SEC ;
 
-    #if defined(DEBUG_CYASSL) 
+    #if defined(DEBUG_CYASSL)
     {
 			  extern void CYASSL_MSG(char *msg) ;
         char msg[100] ;
         sprintf(msg, "Debug::Cyassl_KEIL_gmtime(DATE=/%4d/%02d/%02d TIME=%02d:%02d:%02d)\n",
         RTCFullTime.YEAR+2000,  RTCFullTime.MONTH, RTCFullTime.DOM,
-        RTCFullTime.HOUR,  RTCFullTime.MIN,  RTCFullTime.SEC) ; 
-        CYASSL_MSG(msg) ;   
+        RTCFullTime.HOUR,  RTCFullTime.MIN,  RTCFullTime.SEC) ;
+        CYASSL_MSG(msg) ;
     }
     #endif
-    
+
     return(&date) ;
 }
 
@@ -124,42 +124,42 @@ typedef struct func_args {
 
 #include <stdio.h>
 
-void time_main(void *args) 
+void time_main(void *args)
 {
     char * datetime ;
 	  int year ;
   	RTC_TIME_Type RTCFullTime;
 
-    if( args == NULL || ((func_args *)args)->argc == 1) {  
+    if( args == NULL || ((func_args *)args)->argc == 1) {
 		    RTC_GetFullTime (LPC_RTC, &RTCFullTime);
-        printf("Date: %d/%d/%d, Time: %02d:%02d:%02d\n", 
-             RTCFullTime.MONTH, RTCFullTime.DOM, RTCFullTime.YEAR+2000,  
-             RTCFullTime.HOUR,  RTCFullTime.MIN,  RTCFullTime.SEC) ;              
-    } else if(((func_args *)args)->argc == 3 && 
-              ((func_args *)args)->argv[1][0] == '-' && 
+        printf("Date: %d/%d/%d, Time: %02d:%02d:%02d\n",
+             RTCFullTime.MONTH, RTCFullTime.DOM, RTCFullTime.YEAR+2000,
+             RTCFullTime.HOUR,  RTCFullTime.MIN,  RTCFullTime.SEC) ;
+    } else if(((func_args *)args)->argc == 3 &&
+              ((func_args *)args)->argv[1][0] == '-' &&
               ((func_args *)args)->argv[1][1] == 'd' ) {
 
 								datetime = ((func_args *)args)->argv[2];
-        sscanf(datetime, "%d/%d/%d", 
+        sscanf(datetime, "%d/%d/%d",
              (int *)&RTCFullTime.MONTH, (int *)&RTCFullTime.DOM, &year) ;
-        RTCFullTime.YEAR = year - 2000 ;   
+        RTCFullTime.YEAR = year - 2000 ;
 				RTC_SetTime (LPC_RTC, RTC_TIMETYPE_MONTH, RTCFullTime.MONTH);
         RTC_SetTime (LPC_RTC, RTC_TIMETYPE_YEAR, RTCFullTime.YEAR);
-        RTC_SetTime (LPC_RTC, RTC_TIMETYPE_DAYOFMONTH, RTCFullTime.DOM);       
-    } else if(((func_args *)args)->argc == 3 && 
-              ((func_args *)args)->argv[1][0] == '-' && 
+        RTC_SetTime (LPC_RTC, RTC_TIMETYPE_DAYOFMONTH, RTCFullTime.DOM);
+    } else if(((func_args *)args)->argc == 3 &&
+              ((func_args *)args)->argv[1][0] == '-' &&
               ((func_args *)args)->argv[1][1] == 't' ) {
 		    RTC_GetFullTime (LPC_RTC, &RTCFullTime);
 								datetime = ((func_args *)args)->argv[2];
-        sscanf(datetime, "%d:%d:%d",            
-            (int *)&RTCFullTime.HOUR, 
-            (int *)&RTCFullTime.MIN, 
+        sscanf(datetime, "%d:%d:%d",
+            (int *)&RTCFullTime.HOUR,
+            (int *)&RTCFullTime.MIN,
             (int *)&RTCFullTime.SEC
         ) ;
         RTC_SetTime (LPC_RTC, RTC_TIMETYPE_SECOND, RTCFullTime.SEC);
         RTC_SetTime (LPC_RTC, RTC_TIMETYPE_MINUTE, RTCFullTime.MIN);
         RTC_SetTime (LPC_RTC, RTC_TIMETYPE_HOUR, RTCFullTime.HOUR);
-    } else printf("Invalid argument\n") ; 
+    } else printf("Invalid argument\n") ;
 }
 
 

+ 1 - 1
IDE/MDK-ARM/MDK-ARM/wolfSSL/cert_data.c

@@ -1,6 +1,6 @@
 /* certs_test.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 6 - 6
IDE/MDK-ARM/MDK-ARM/wolfSSL/config-BARE-METAL.h

@@ -1,6 +1,6 @@
 /* config-BEREFOOT.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -72,7 +72,7 @@
 //      <e>Crypt/Cipher Benchmark
 #define MDK_CONF_CTaoCryptBenchmark 1
 #if MDK_CONF_CTaoCryptBenchmark == 0
-#define NO_CRYPT_BENCHMARK 
+#define NO_CRYPT_BENCHMARK
 #define BENCH_EMBEDDED
 #endif
 //  </e>
@@ -120,10 +120,10 @@
 #define WOLFSSL_SHA384
 #endif
 //  </e>
-//      <e>SHA-512          
+//      <e>SHA-512
 #define MDK_CONF_SHA512     0
 #if MDK_CONF_SHA512     == 1
-#define WOLFSSL_SHA512   
+#define WOLFSSL_SHA512
 #endif
 //  </e>
 //      <e>RIPEMD
@@ -151,7 +151,7 @@
 #endif
 //  </e>
 
-//      <e>AEAD     
+//      <e>AEAD
 #define MDK_CONF_AEAD 0
 #if MDK_CONF_AEAD == 1
 #define HAVE_AEAD
@@ -178,7 +178,7 @@
 #endif
 //  </e>
 //      <e>DSA
-#define MDK_CONF_DSA 1 
+#define MDK_CONF_DSA 1
 #if MDK_CONF_DSA == 0
 #define NO_DSA
 #endif

+ 7 - 7
IDE/MDK-ARM/MDK-ARM/wolfSSL/config-FS.h

@@ -1,6 +1,6 @@
 /* config-FS.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -70,7 +70,7 @@
 //      <e>Crypt/Cipher Benchmark
 #define MDK_CONF_CTaoCryptBenchmark 1
 #if MDK_CONF_CTaoCryptBenchmark == 0
-#define NO_CRYPT_BENCHMARK 
+#define NO_CRYPT_BENCHMARK
 #endif
 //  </e>
 //   </h>
@@ -97,7 +97,7 @@
 //     <h>SSL (Included by default)
 //     </h>
 
-//      <e>TLS 
+//      <e>TLS
 #define MDK_CONF_TLS 1
 #if MDK_CONF_TLS == 0
 #define NO_TLS
@@ -157,10 +157,10 @@
 #define WOLFSSL_SHA384
 #endif
 //  </e>
-//      <e>SHA-512          
+//      <e>SHA-512
 #define MDK_CONF_SHA512     0
 #if MDK_CONF_SHA512     == 1
-#define WOLFSSL_SHA512   
+#define WOLFSSL_SHA512
 #endif
 //  </e>
 //      <e>RIPEMD
@@ -188,7 +188,7 @@
 #endif
 //  </e>
 
-//      <e>AEAD     
+//      <e>AEAD
 #define MDK_CONF_AEAD 0
 #if MDK_CONF_AEAD == 1
 #define HAVE_AEAD
@@ -215,7 +215,7 @@
 #endif
 //  </e>
 //      <e>DSA
-#define MDK_CONF_DSA 1 
+#define MDK_CONF_DSA 1
 #if MDK_CONF_DSA == 0
 #define NO_DSA
 #endif

+ 7 - 7
IDE/MDK-ARM/MDK-ARM/wolfSSL/config-RTX-TCP-FS.h

@@ -1,6 +1,6 @@
 /* config-RTX-TCP-FS.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -66,7 +66,7 @@
 //      <e>Crypt/Cipher Benchmark
 #define MDK_CONF_CTaoCryptBenchmark 1
 #if MDK_CONF_CTaoCryptBenchmark == 0
-#define NO_CRYPT_BENCHMARK 
+#define NO_CRYPT_BENCHMARK
 #define BENCH_EMBEDDED
 #endif
 //  </e>
@@ -120,7 +120,7 @@
 //     <h>SSL (Included by default)
 //     </h>
 
-//      <e>TLS 
+//      <e>TLS
 #define MDK_CONF_TLS 1
 #if MDK_CONF_TLS == 0
 #define NO_TLS
@@ -179,10 +179,10 @@
 #define WOLFSSL_SHA384
 #endif
 //  </e>
-//      <e>SHA-512          
+//      <e>SHA-512
 #define MDK_CONF_SHA512     0
 #if MDK_CONF_SHA512     == 1
-#define WOLFSSL_SHA512   
+#define WOLFSSL_SHA512
 #endif
 //  </e>
 //      <e>RIPEMD
@@ -210,7 +210,7 @@
 #endif
 //  </e>
 
-//      <e>AEAD     
+//      <e>AEAD
 #define MDK_CONF_AEAD 0
 #if MDK_CONF_AEAD == 1
 #define HAVE_AEAD
@@ -237,7 +237,7 @@
 #endif
 //  </e>
 //      <e>DSA
-#define MDK_CONF_DSA 1 
+#define MDK_CONF_DSA 1
 #if MDK_CONF_DSA == 0
 #define NO_DSA
 #endif

+ 1 - 1
IDE/MDK-ARM/MDK-ARM/wolfSSL/config.h

@@ -1,6 +1,6 @@
 /* config.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 14 - 14
IDE/MDK-ARM/MDK-ARM/wolfSSL/main.c

@@ -1,6 +1,6 @@
 /* main.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -19,7 +19,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  */
 
- 
+
 #ifdef HAVE_CONFIG_H
     #include <config.h>
 #endif
@@ -35,7 +35,7 @@
  *        Initialize a Flash Memory Card
  *----------------------------------------------------------------------------*/
 #if !defined(NO_FILESYSTEM)
-static void init_card (void) 
+static void init_card (void)
 {
     U32 retv;
 
@@ -55,14 +55,14 @@ static void init_card (void)
  *        TCP/IP tasks
  *----------------------------------------------------------------------------*/
 #ifdef WOLFSSL_KEIL_TCP_NET
-__task void tcp_tick (void) 
+__task void tcp_tick (void)
 {
-    
+
     WOLFSSL_MSG("Time tick started.") ;
     #if defined (HAVE_KEIL_RTX)
     os_itv_set (10);
     #endif
-  
+
     while (1) {
         #if defined (HAVE_KEIL_RTX)
         os_itv_wait ();
@@ -99,11 +99,11 @@ extern void benchmark_test(void) ;
 extern void SER_Init(void) ;
 
 /*-----------------------------------------------------------------------------
- *       mian entry 
+ *       mian entry
  *----------------------------------------------------------------------------*/
 
 /*** This is the parent task entry ***/
-void main_task (void) 
+void main_task (void)
 {
     #ifdef WOLFSSL_KEIL_TCP_NET
     init_TcpNet ();
@@ -111,8 +111,8 @@ void main_task (void)
     os_tsk_create (tcp_tick, 2);
     os_tsk_create (tcp_poll, 1);
     #endif
-    
-    #ifdef WOLFSSL_MDK_SHELL 
+
+    #ifdef WOLFSSL_MDK_SHELL
         #ifdef  HAVE_KEIL_RTX
            os_tsk_create_user(shell_main, 1, Shell_stack, SHELL_STACKSIZE) ;
        #else
@@ -124,8 +124,8 @@ void main_task (void)
     /*** USER APPLICATION HERE        ***/
     /************************************/
     printf("USER LOGIC STARTED\n") ;
-	
-    #endif 
+
+    #endif
 
     #ifdef   HAVE_KEIL_RTX
     WOLFSSL_MSG("Terminating tcp_main\n") ;
@@ -148,7 +148,7 @@ extern void 	SystemInit(void);
 
 int main() {
 
-    SystemInit();  
+    SystemInit();
     #if !defined(NO_FILESYSTEM)
     init_card () ;     /* initializing SD card */
     #endif
@@ -157,7 +157,7 @@ int main() {
          printf("Turning ON Debug message\n") ;
          wolfSSL_Debugging_ON() ;
     #endif
-    
+
     #ifdef   HAVE_KEIL_RTX
         os_sys_init (main_task) ;
     #else

+ 42 - 42
IDE/MDK-ARM/MDK-ARM/wolfSSL/shell.c

@@ -1,6 +1,6 @@
 /*shell.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -19,9 +19,9 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  */
 
- 
+
  /*** tiny Shell for wolfSSL apps ***/
- 
+
  #ifdef HAVE_CONFIG_H
     #include <config.h>
 #endif
@@ -185,7 +185,7 @@ extern void dh_test(void *arg) ;
 #ifndef NO_DSA
 extern void dsa_test(void *arg) ;
 #endif
-    
+
 #ifndef NO_PWDBASED
 extern void pwdbased_test(void *arg) ;
 #endif
@@ -276,8 +276,8 @@ static struct {
 #ifndef NO_DES3
   "des",  des_test,
   "des3",  des3_test,
-#endif  
-#ifndef NO_AES  
+#endif
+#ifndef NO_AES
   "aes",  aes_test,
     #ifdef HAVE_AESGCM
   "aesgcm",  aesgcm_test,
@@ -299,10 +299,10 @@ static struct {
 #endif
 #ifndef NO_DSA
     "dsa",  dsa_test,
-#endif 
+#endif
 #ifndef NO_PWDBASED
   "pwdbased",  pwdbased_test,
-#endif  
+#endif
 #ifdef OPENSSL_EXTRA
   "openssl",  openssl_test,
 #endif
@@ -320,22 +320,22 @@ enum jobtype { FORGROUND, BACKGROUND }  ;
 #define IF_DELIMITER(ch) ((ch) == ' ' || (ch) == '\n')
 
 /*******  Get Command Line *****************************/
-static int getline(char * line, int sz, func_args *args, int*bf_flg) 
+static int getline(char * line, int sz, func_args *args, int*bf_flg)
 {
     char * ret ;
     int i ;
-    
+
     #define MAXARGS 10
     #define MAXARGLEN 30
     static char *argv[MAXARGS] ;
     args->argv = argv ;
-    
+
     putchar('>') ;
     fflush(stdout) ;
     ret = fgets(line, sz, stdin) ;
     #define SHELL_ERROR_FGETS -102
     if(ret != line) return(SHELL_ERROR_FGETS) ;
-    
+
     if(line[strlen(line)-2] == '&') {
         (*bf_flg) = BACKGROUND ;
         line[strlen(line)-2] = '\n' ;
@@ -363,22 +363,22 @@ static int BackGround = 0 ; /* 1: background job is running */
 #define IP_SIZE 16
 
 #ifdef WOLFSSL_KEIL_NET
-static void ipaddr_comm(void *args) 
+static void ipaddr_comm(void *args)
 {
     if(((func_args *)args)->argc == 1) {
             printf("IP addr: %s, port %d\n", wolfSSLIP, wolfSSLPort) ;
     } else {
         if(BackGround != 0) {
         printf("Cannot change IP addr while background server is running\n") ;
-        } else if(((func_args *)args)->argc == 3 && 
-                  ((func_args *)args)->argv[1][0] == '-'&& 
+        } else if(((func_args *)args)->argc == 3 &&
+                  ((func_args *)args)->argv[1][0] == '-'&&
                   ((func_args *)args)->argv[1][1] == 'a' ) {
 /*          strcpy(wolfSSLIP, ((func_args *)args)->argv[2]) ; */
-        } else if(((func_args *)args)->argc == 3 && 
-                  ((func_args *)args)->argv[1][0] == '-' && 
+        } else if(((func_args *)args)->argc == 3 &&
+                  ((func_args *)args)->argv[1][0] == '-' &&
                   ((func_args *)args)->argv[1][1] == 'p' ) {
 /*          yasslPort = atoi(((func_args *)args)->argv[2]) ; */
-        } else printf("Invalid argument\n") ; 
+        } else printf("Invalid argument\n") ;
     }
 }
 
@@ -389,7 +389,7 @@ static void ipaddr_comm(void *args)
 #if defined(HAVE_KEIL_RTX)
 static int stack_ck = 0 ;
 
-static void stack_comm(void *args) 
+static void stack_comm(void *args)
 {
     if(stack_ck) {
         printf("Stack Check: Off\n") ;
@@ -399,7 +399,7 @@ static void stack_comm(void *args)
         stack_ck = 1 ;
     }
 }
-    
+
 #define FILL_PATTERN 0xa596695a
 void stack_fill(char * stack, int size)
 {
@@ -410,13 +410,13 @@ void stack_fill(char * stack, int size)
         ((int *)stack)[i] = FILL_PATTERN ;
 }
 
-void stack_check(char * stack, int size) 
+void stack_check(char * stack, int size)
 {
     int i ;
-    
+
     if(stack_ck == 0)return ;
     if(stack_ck == 1) {
-        stack_ck ++ ; return ; 
+        stack_ck ++ ; return ;
     }
     for(i=1; i<size/4 ; i++) {
         if(((int *)stack)[i] != FILL_PATTERN) break ;
@@ -432,7 +432,7 @@ void stack_check(char * stack, int size)
 
 static int for_iteration = 1 ;
 
-static void for_command(void *args) 
+static void for_command(void *args)
 {
     if( args == NULL || ((func_args *)args)->argc == 1) {
         printf("For %d times\n", for_iteration) ;
@@ -446,7 +446,7 @@ static void for_command(void *args)
 
 static int wolfsslDebug = 1 ;
 
-static void dbg_comm(void *args) 
+static void dbg_comm(void *args)
 {
     if(wolfsslDebug == 1) {
         wolfsslDebug = 0 ;
@@ -460,9 +460,9 @@ static void dbg_comm(void *args)
 }
 #endif
 
-static void help_comm(void *args) 
+static void help_comm(void *args)
 {
-    
+
 }
 
 
@@ -484,12 +484,12 @@ static   wolfSSL_Mutex command_mutex ;
 #endif
 
 /***********    Invoke Forground Command  *********************/
-static void command_invoke(void *args) 
+static void command_invoke(void *args)
 {
     void (*func)(void * ) ;
     int i,iteration ;
 
-    func = (void(*)(void *))((func_args *)args)->argv[0] ; 
+    func = (void(*)(void *))((func_args *)args)->argv[0] ;
     #ifdef  HAVE_KEIL_RTX
     wc_LockMutex((wolfSSL_Mutex *)&command_mutex) ;
     #endif
@@ -499,14 +499,14 @@ static void command_invoke(void *args)
         #if defined(HAVE_KEIL_RTX)
         stack_fill(command_stack, COMMAND_STACK_SIZE) ;
         #endif
-                
+
         func(args) ;        /* invoke command */
-                
+
         #if defined(HAVE_KEIL_RTX)
         stack_check(command_stack, COMMAND_STACK_SIZE) ;
         #endif
     }
-    if(iteration > 1) 
+    if(iteration > 1)
         for_iteration = 1 ;
     #ifdef HAVE_KEIL_RTX
     wc_UnLockMutex((wolfSSL_Mutex *)&command_mutex) ;
@@ -517,12 +517,12 @@ static void command_invoke(void *args)
 #if (!defined(NO_SIMPLE_SERVER) && !defined(NO_ECHOSERVER)) && \
                                                       defined(HAVE_KEIL_RTX)
 /*******  Invoke Background Job   *******************************/
-static void bg_job_invoke(void *args) 
+static void bg_job_invoke(void *args)
 {
     void (*func)(void * ) ;
-    BackGround = 1 ; 
+    BackGround = 1 ;
     stack_fill(bg_job_stack, BG_JOB_STACK_SIZE) ;
-    func = (void(*)(void *))((func_args *)args)->argv[0] ; 
+    func = (void(*)(void *))((func_args *)args)->argv[0] ;
     func(args) ;        /* invoke command */
     stack_check(bg_job_stack, BG_JOB_STACK_SIZE) ;
     #ifdef WOLFSSL_KEIL_NET
@@ -539,14 +539,14 @@ static char line[LINESIZE] ;
 
 /********* SHEULL MAIN LOOP ***********************************/
 void shell_main(void) {
-    int i ; 
+    int i ;
     func_args args ;
     int bf_flg ;
-   
-    i = BackGround ; 
+
+    i = BackGround ;
         /* Dummy for avoiding warning: BackGround is defined but not used. */
-    
-    
+
+
  #if defined(HAVE_KEIL_RTX)
     wc_InitMutex(&command_mutex) ;
 #endif
@@ -574,9 +574,9 @@ void shell_main(void) {
                     if(BackGround != 0) {
                         printf("Multiple background servers not supported.\n") ;
                     } else {
-                        printf("\"%s\" is running with the background mode.\n", 
+                        printf("\"%s\" is running with the background mode.\n",
                                                      commandTable[i].command) ;
-                        os_tsk_create_user_ex( (void(*)(void *))&bg_job_invoke, 
+                        os_tsk_create_user_ex( (void(*)(void *))&bg_job_invoke,
                                    6, bg_job_stack, BG_JOB_STACK_SIZE, &args) ;
                     }
                     #else

+ 5 - 5
IDE/MDK-ARM/MDK-ARM/wolfSSL/time-CortexM3-4.c

@@ -1,6 +1,6 @@
 /* time-STM32F2.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -19,14 +19,14 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  */
 
- 
+
 #ifdef HAVE_CONFIG_H
     #include <config.h>
 #endif
 
 
-#include <stdint.h>       
-#define DWT                 ((DWT_Type       *)     (0xE0001000UL)     ) 
+#include <stdint.h>
+#define DWT                 ((DWT_Type       *)     (0xE0001000UL)     )
 typedef struct
 {
   uint32_t CTRL;                    /*!< Offset: 0x000 (R/W)  Control Register                          */
@@ -35,7 +35,7 @@ typedef struct
 
 extern uint32_t SystemCoreClock ;
 
-double current_time(int reset) 
+double current_time(int reset)
 {
       if(reset) DWT->CYCCNT = 0 ;
       return ((double)DWT->CYCCNT/SystemCoreClock) ;

+ 5 - 5
IDE/MDK-ARM/MDK-ARM/wolfSSL/time-dummy.c

@@ -1,6 +1,6 @@
 /* time-dummy.c.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -19,16 +19,16 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  */
 
- 
+
 #ifdef HAVE_CONFIG_H
     #include <config.h>
 #endif
 
 #include "time.h"
 
-struct tm *wolfssl_MDK_gmtime(const time_t *c) 
-{ 
-    static struct tm date ; 
+struct tm *wolfssl_MDK_gmtime(const time_t *c)
+{
+    static struct tm date ;
     return(&date) ;
 }
 

+ 38 - 38
IDE/MDK-ARM/MDK-ARM/wolfSSL/wolfssl_MDK_ARM.c

@@ -1,6 +1,6 @@
 /* wolfssl_KEIL_RL.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -35,8 +35,8 @@
 
         #if defined(WOLFSSL_MDK5)
             #include "cmsis_os.h"
-            #include "rl_fs.h" 
-            #include "rl_net.h" 
+            #include "rl_fs.h"
+            #include "rl_net.h"
         #else
             #include "rtl.h"
         #endif
@@ -58,7 +58,7 @@
 /** TCPnet BSD socket does not have following functions. **/
 
 #if defined(WOLFSSL_KEIL_TCP_NET)
-char *inet_ntoa(struct in_addr in) 
+char *inet_ntoa(struct in_addr in)
 {
     #define NAMESIZE 16
     static char name[NAMESIZE] ;
@@ -76,11 +76,11 @@ unsigned long inet_addr(const char *cp)
 
 
 /*** tcp_connect is actually associated with following syassl_tcp_connect. ***/
-int wolfssl_connect(int sd, const  struct sockaddr* sa, int sz) 
+int wolfssl_connect(int sd, const  struct sockaddr* sa, int sz)
 {
     int ret = 0 ;
-    #if defined(WOLFSSL_KEIL_TCP_NET)  
-    
+    #if defined(WOLFSSL_KEIL_TCP_NET)
+
     SOCKADDR_IN addr ;
 
     addr = *(SOCKADDR_IN *)sa ;
@@ -91,19 +91,19 @@ int wolfssl_connect(int sd, const  struct sockaddr* sa, int sz)
         os_dly_wait(50);
     } while(ret == SCK_EWOULDBLOCK) ;
     #ifdef DEBUG_WOLFSSL
-    { 
+    {
         char msg[50] ;
         sprintf(msg, "BSD Connect return code: %d\n", ret) ;
         WOLFSSL_MSG(msg) ;
     }
     #endif
-    
+
     #endif /* WOLFSSL_KEIL_TCP_NET */
     return(ret ) ;
 }
 
 
-int wolfssl_accept(int sd, struct sockaddr *addr, int *addrlen) 
+int wolfssl_accept(int sd, struct sockaddr *addr, int *addrlen)
 {
     int ret = 0 ;
 
@@ -113,24 +113,24 @@ int wolfssl_accept(int sd, struct sockaddr *addr, int *addrlen)
         ret = accept(sd, addr,  addrlen) ;
         if(ret != SCK_EWOULDBLOCK) break ;
         os_dly_wait(1);
-    } 
+    }
     #ifdef DEBUG_WOLFSSL
     {
         char msg[50] ;
         sprintf(msg, "BSD Accept return code: %d\n", ret) ;
-        WOLFSSL_MSG(msg) ;   
+        WOLFSSL_MSG(msg) ;
     }
     #endif
-    
+
     #endif /* WOLFSSL_KEIL_TCP_NET */
     return(ret ) ;
 
 }
-    
-int wolfssl_recv(int sd, void *buf, size_t len, int flags) 
+
+int wolfssl_recv(int sd, void *buf, size_t len, int flags)
 {
     int ret  = 0;
-    #if defined(WOLFSSL_KEIL_TCP_NET)  
+    #if defined(WOLFSSL_KEIL_TCP_NET)
     while(1) {
         #undef recv  /* Go to KEIL TCPnet recv */
         ret = recv(sd, buf, len,  flags) ;
@@ -138,10 +138,10 @@ int wolfssl_recv(int sd, void *buf, size_t len, int flags)
         os_dly_wait(1);
     }
     #ifdef DEBUG_WOLFSSL
-    {       
+    {
         char msg[50] ;
         sprintf(msg, "BSD Recv return code: %d\n", ret) ;
-        WOLFSSL_MSG(msg) ;   
+        WOLFSSL_MSG(msg) ;
     }
     #endif
 
@@ -149,22 +149,22 @@ int wolfssl_recv(int sd, void *buf, size_t len, int flags)
     return(ret ) ;
 }
 
-int wolfssl_send(int sd, const void *buf, size_t len, int flags) 
+int wolfssl_send(int sd, const void *buf, size_t len, int flags)
 {
     int  ret = 0 ;
 
-    #if defined(WOLFSSL_KEIL_TCP_NET)  
+    #if defined(WOLFSSL_KEIL_TCP_NET)
     while(1) {
     #undef send  /* Go to KEIL TCPnet send */
         ret = send(sd, buf, len,  flags) ;
         if(ret != SCK_EWOULDBLOCK) break ;
         os_dly_wait(1);
-    } 
+    }
     #ifdef DEBUG_WOLFSSL
     {
         char msg[50] ;
         sprintf(msg, "BSD Send return code: %d\n", ret) ;
-        WOLFSSL_MSG(msg) ;   
+        WOLFSSL_MSG(msg) ;
     }
     #endif
 
@@ -175,49 +175,49 @@ int wolfssl_send(int sd, const void *buf, size_t len, int flags)
 
 #endif /* WOLFSSL_KEIL_TCP_NET */
 
-#if defined(WOLFSSL_KEIL_TCP_NET)  
-void wolfssl_sleep(int t) 
+#if defined(WOLFSSL_KEIL_TCP_NET)
+void wolfssl_sleep(int t)
 {
     #if defined(HAVE_KEIL_RTX)
     os_dly_wait(t/1000+1) ;
     #endif
 }
 
-int wolfssl_tcp_select(int sd, int timeout) 
+int wolfssl_tcp_select(int sd, int timeout)
 {
-    
+
     return 0 ;
-    
+
 }
 #endif
 
-FILE * wolfSSL_fopen(const char *name, const char *openmode) 
+FILE * wolfSSL_fopen(const char *name, const char *openmode)
 {
     int i ;  FILE * ret ;
     #define PATHSIZE 100
     char path[PATHSIZE] ; char *p ;
-    
+
     if(strlen(name) > PATHSIZE)return(NULL) ;
-    
+
     for(i = 0; i<= strlen(name); i++) {
         if(name[i] == '/')path[i] = '\\' ;
         else              path[i] = name[i] ;
-    }       
+    }
     if(path[0] == '.' && path[1] == '\\') p = path + 2 ;
     else                                  p = path ;
 
     ret = fopen (p, openmode) ;
-    
+
     return(ret) ;
 }
 
 #define getkey getchar
 #define sendchar putchar
 
-char * wolfssl_fgets ( char * str, int num, FILE * f ) 
+char * wolfssl_fgets ( char * str, int num, FILE * f )
 {
     int i ;
-    
+
     for(i = 0 ; i< num ; i++) {
             while((str[i] = getkey()) == 0) {
             #if defined (HAVE_KEIL_RTX) && !defined(WOLFSSL_CMSIS_RTOS)
@@ -228,15 +228,15 @@ char * wolfssl_fgets ( char * str, int num, FILE * f )
         }
         if(str[i] == '\n' || str[i] == '\012' || str[i] == '\015')  {
             sendchar('\n') ;
-            str[i++] = '\n' ; 
-            str[i] = '\0' ; 
+            str[i++] = '\n' ;
+            str[i] = '\0' ;
             break ;
         } else if(str[i] == '\010') { /* BS */
             if(i) { /* erace one char */
-                sendchar('\010') ; sendchar(' ') ; sendchar('\010') ; 
+                sendchar('\010') ; sendchar(' ') ; sendchar('\010') ;
                 i = (i>0 ? (i-2) : -1 ) ;
                 continue ;
-            } 
+            }
         } else if(str[i] == '\033'  || str[i] == '\004' ) {  /* ESC or ^D */
             str[i] = '\0' ;
             return(0) ;

+ 8 - 8
IDE/MDK-ARM/MDK-ARM/wolfSSL/wolfssl_MDK_ARM.h

@@ -1,6 +1,6 @@
 /* wolfssl_KEIL_RL.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -31,7 +31,7 @@
 #include <stdio.h>
 
 /* Go to STDIN */
-#define fgets(buff, sz, fd)   wolfssl_fgets(buff, sz, fd) 
+#define fgets(buff, sz, fd)   wolfssl_fgets(buff, sz, fd)
 extern char * wolfssl_fgets ( char * str, int num, FILE * f ) ;
 
 #define SOCKET_T int
@@ -53,19 +53,19 @@ struct timeval {
    long tv_usec;    /* microseconds */
 };
 
-#if defined(WOLFSSL_KEIL_TCP_NET) 
+#if defined(WOLFSSL_KEIL_TCP_NET)
 
 #if defined(WOLFSSL_MDK5)
 #define SCK_EWOULDBLOCK     BSD_ERROR_WOULDBLOCK
 #define SCK_ETIMEOUT        BSD_ERROR_TIMEOUT
-#include "rl_net.h" 
+#include "rl_net.h"
 #endif
- 
+
 typedef int socklen_t ;
 
 /* for avoiding conflict with KEIL-TCPnet BSD socket */
 /* Bodies are in wolfssl_KEIL_RL.c                    */
-#define connect(a,b,c)             wolfssl_connect(a,  (struct sockaddr* )(b), c) 
+#define connect(a,b,c)             wolfssl_connect(a,  (struct sockaddr* )(b), c)
 #define accept              wolfssl_accept
 #define recv                wolfssl_recv
 #define send                wolfssl_send
@@ -73,7 +73,7 @@ typedef int socklen_t ;
 
 /* for avoiding conflicting with KEIL-TCPnet TCP socket */
 /* Bodies are in test.h */
-#define tcp_connect wolfssl_tcp_connect    
+#define tcp_connect wolfssl_tcp_connect
 #define tcp_socket    wolfssl_tcp_soket
 #define tcp_listen      wolfssl_tcp_listen
 #define tcp_select     wolfssl_tcp_select
@@ -89,7 +89,7 @@ extern int wolfssl_tcp_select(int sd, int timeout) ;
 /* TCPnet BSD socket does not have following functions. */
 extern char *inet_ntoa(struct in_addr in);
 extern unsigned long inet_addr(const char *cp);
-extern int setsockopt(int sockfd, int level, int optname, 
+extern int setsockopt(int sockfd, int level, int optname,
                                       const void *optval, socklen_t optlen);
 extern int select(int nfds, fd_set *readfds, fd_set *writefds,
                           fd_set *exceptfds, const struct timeval *timeout);

+ 1 - 1
IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/time-STM32F2xx.c

@@ -1,6 +1,6 @@
 /* time-STM32F2xx.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 5 - 5
IDE/MDK5-ARM/Conf/config-Crypt.h

@@ -1,6 +1,6 @@
 /* config-Crypt.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -72,10 +72,10 @@
 #define WOLFSSL_SHA384
 #endif
 //  </e>
-//      <e>SHA-512          
+//      <e>SHA-512
 #define MDK_CONF_SHA512     1
 #if MDK_CONF_SHA512     == 1
-#define WOLFSSL_SHA512   
+#define WOLFSSL_SHA512
 #endif
 //  </e>
 //      <e>RIPEMD
@@ -180,14 +180,14 @@
 #endif
 //  </e>
 //      <e>DSA
-#define MDK_CONF_DSA 1 
+#define MDK_CONF_DSA 1
 #if MDK_CONF_DSA == 0
 #define NO_DSA
 #endif
 //  </e>
 
 //      <e>SRP
-#define MDK_CONF_SRP 1 
+#define MDK_CONF_SRP 1
 #if MDK_CONF_SRP == 1
 #define HAVE_SRP
 #endif

+ 1 - 1
IDE/MDK5-ARM/Inc/config.h

@@ -1,6 +1,6 @@
 /* config.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 6 - 6
IDE/MDK5-ARM/Inc/wolfssl_MDK_ARM.h

@@ -1,6 +1,6 @@
 /* wolfssl_KEIL_ARM.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -28,7 +28,7 @@
 #include <stdio.h>
 
 /* Go to STDIN */
-#define fgets(buff, sz, fd)   wolfssl_fgets(buff, sz, fd) 
+#define fgets(buff, sz, fd)   wolfssl_fgets(buff, sz, fd)
 extern char * wolfssl_fgets ( char * str, int num, FILE * f ) ;
 
 #define SOCKET_T int
@@ -51,12 +51,12 @@ struct timeval {
 };
 
 
-#if defined(WOLFSSL_KEIL_TCP_NET) 
+#if defined(WOLFSSL_KEIL_TCP_NET)
 
 #define SCK_EWOULDBLOCK     BSD_ERROR_WOULDBLOCK
 #define SCK_ETIMEOUT        BSD_ERROR_TIMEOUT
-#include "rl_net.h" 
- 
+#include "rl_net.h"
+
 typedef int socklen_t ;
 
 /* for avoiding conflict with KEIL-TCPnet BSD socket */
@@ -69,7 +69,7 @@ typedef int socklen_t ;
 
 /* for avoiding conflicting with KEIL-TCPnet TCP socket */
 /* Bodies are in test.h */
-#define tcp_connect   wolfssl_tcp_connect    
+#define tcp_connect   wolfssl_tcp_connect
 #define tcp_socket    wolfssl_tcp_soket
 #define tcp_listen    wolfssl_tcp_listen
 #define tcp_select(a,b)    (0)

+ 7 - 7
IDE/MDK5-ARM/Projects/CryptBenchmark/main.c

@@ -1,6 +1,6 @@
 /* main.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -18,7 +18,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  */
- 
+
 #ifdef HAVE_CONFIG_H
     #include <config.h>
 #endif
@@ -64,10 +64,10 @@ static void init_filesystem (void) {
 #endif
 
 /*-----------------------------------------------------------------------------
- *       mian entry 
+ *       mian entry
  *----------------------------------------------------------------------------*/
  void    benchmark_test(void *arg) ;
-int main() 
+int main()
 {
      void * arg = NULL ;
 
@@ -77,11 +77,11 @@ int main()
 	#if !defined(NO_FILESYSTEM)
        init_filesystem ();
 	#endif
-       osDelay(300) ;  
+       osDelay(300) ;
 
        printf("=== Start: Crypt Benchmark ===\n") ;
        benchmark_test(arg) ;
-       printf("=== End: Crypt Benchmark  ===\n") ;   
+       printf("=== End: Crypt Benchmark  ===\n") ;
+
 
-    
 }

+ 5 - 5
IDE/MDK5-ARM/Projects/CryptBenchmark/time-CortexM3-4.c

@@ -1,6 +1,6 @@
 /* time-STM32F2.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -19,14 +19,14 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  */
 
- 
+
 #ifdef HAVE_CONFIG_H
     #include <config.h>
 #endif
 
 
-#include <stdint.h>       
-#define DWT                 ((DWT_Type       *)     (0xE0001000UL)     ) 
+#include <stdint.h>
+#define DWT                 ((DWT_Type       *)     (0xE0001000UL)     )
 typedef struct
 {
   uint32_t CTRL;                    /*!< Offset: 0x000 (R/W)  Control Register                          */
@@ -35,7 +35,7 @@ typedef struct
 
 extern uint32_t SystemCoreClock ;
 
-double current_time(int reset) 
+double current_time(int reset)
 {
       if(reset) DWT->CYCCNT = 0 ;
       return ((double)DWT->CYCCNT/SystemCoreClock) ;

+ 7 - 7
IDE/MDK5-ARM/Projects/CryptTest/main.c

@@ -1,6 +1,6 @@
 /* main.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -18,7 +18,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  */
- 
+
 #ifdef HAVE_CONFIG_H
     #include <config.h>
 #endif
@@ -63,10 +63,10 @@ static void init_filesystem (void) {
 #endif
 
 /*-----------------------------------------------------------------------------
- *       mian entry 
+ *       mian entry
  *----------------------------------------------------------------------------*/
 
-int main() 
+int main()
 {
     void * arg = NULL ;
 
@@ -76,10 +76,10 @@ int main()
 	#if !defined(NO_FILESYSTEM)
     init_filesystem ();
 	#endif
-  osDelay(1000) ;  
+  osDelay(1000) ;
 
     printf("=== Start: Crypt test ===\n") ;
         wolfcrypt_test(arg) ;
-    printf("=== End: Crypt test  ===\n") ;    
-    
+    printf("=== End: Crypt test  ===\n") ;
+
 }

+ 1 - 1
IDE/MDK5-ARM/Projects/EchoClient/config-EchoClient.h

@@ -1,6 +1,6 @@
 /* config-RTX-TCP-FS.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 7 - 7
IDE/MDK5-ARM/Projects/EchoClient/main.c

@@ -1,6 +1,6 @@
 /* main.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -18,7 +18,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  */
- 
+
 #ifdef HAVE_CONFIG_H
     #include <config.h>
 #endif
@@ -28,7 +28,7 @@
 
 #include "stm32f2xx_hal.h"
 #include "cmsis_os.h"
-#include "rl_net.h" 
+#include "rl_net.h"
 #include <stdio.h>
 
 #include <wolfssl/ssl.h>
@@ -72,13 +72,13 @@ typedef struct func_args {
 extern void echoclient_test(func_args * args) ;
 
 /*-----------------------------------------------------------------------------
- *       mian entry 
+ *       mian entry
  *----------------------------------------------------------------------------*/
 int myoptind = 0;
 char* myoptarg = NULL;
 
-int main() 
-{ 
+int main()
+{
     func_args args ;
 		args.argc = 1 ;
 
@@ -87,7 +87,7 @@ int main()
     init_filesystem ();
     #endif
     netInitialize() ;
-    osDelay(300) ;  
+    osDelay(300) ;
     #if defined(DEBUG_WOLFSSL)
          printf("Turning ON Debug message\n") ;
          wolfSSL_Debugging_ON() ;

+ 6 - 6
IDE/MDK5-ARM/Projects/EchoServer/main.c

@@ -1,6 +1,6 @@
 /* main.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -18,7 +18,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  */
- 
+
 #ifdef HAVE_CONFIG_H
     #include <config.h>
 #endif
@@ -28,7 +28,7 @@
 
 #include "stm32f2xx_hal.h"
 #include "cmsis_os.h"
-#include "rl_net.h" 
+#include "rl_net.h"
 #include <stdio.h>
 
 #include <wolfssl/ssl.h>
@@ -66,7 +66,7 @@ static void init_filesystem (void) {
 
 
 /*-----------------------------------------------------------------------------
- *       mian entry 
+ *       mian entry
  *----------------------------------------------------------------------------*/
 
 typedef struct func_args {
@@ -76,7 +76,7 @@ typedef struct func_args {
 
 extern void echoserver_test(func_args * args) ;
 
-int main() 
+int main()
 {
     func_args args ;
 		args.argc = 1 ;
@@ -86,7 +86,7 @@ int main()
     init_filesystem ();
     #endif
     netInitialize() ;
-    osDelay(300) ;  
+    osDelay(300) ;
     #if defined(DEBUG_WOLFSSL)
          printf("Turning ON Debug message\n") ;
          wolfSSL_Debugging_ON() ;

+ 1 - 1
IDE/MDK5-ARM/Projects/SimpleClient/config-SimpleClient.h

@@ -1,6 +1,6 @@
 /* config-RTX-TCP-FS.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 12 - 12
IDE/MDK5-ARM/Projects/SimpleClient/main.c

@@ -1,6 +1,6 @@
 /* main.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -18,7 +18,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  */
- 
+
 #ifdef HAVE_CONFIG_H
     #include <config.h>
 #endif
@@ -28,7 +28,7 @@
 
 #include "stm32f2xx_hal.h"
 #include "cmsis_os.h"
-#include "rl_net.h" 
+#include "rl_net.h"
 #include <stdio.h>
 
 #include <wolfssl/ssl.h>
@@ -75,31 +75,31 @@ extern void client_test(func_args * args) ;
 int myoptind = 0;
 char* myoptarg = NULL;
 
-int main() 
+int main()
 {
-    static char *argv[] = 
-          {   "client",   "-h", WOLFSSL_CALLEE_IP, "-p", WOLFSSL_CALLEE_PORT, 
+    static char *argv[] =
+          {   "client",   "-h", WOLFSSL_CALLEE_IP, "-p", WOLFSSL_CALLEE_PORT,
                                    "-v",  WOLFSSL_SSL_VER,  WOLFSSL_HTTP_GET } ;
-    static   func_args args  = 
-          {  7 + WOLFSSL_HTTP_GET_COUNT, argv } ; 
-					
+    static   func_args args  =
+          {  7 + WOLFSSL_HTTP_GET_COUNT, argv } ;
+
     SystemClock_Config ();
     #if !defined(NO_FILESYSTEM)
     init_filesystem ();
     #endif
     netInitialize() ;
-    osDelay(300) ;  
+    osDelay(300) ;
     #if defined(DEBUG_WOLFSSL)
          printf("Turning ON Debug message\n") ;
          wolfSSL_Debugging_ON() ;
     #endif
-        
+
     if(args.argc == 7)
         printf("Simple SSL/TLS, ") ;
     else
         printf("HTTP GET, ") ;
 
-    printf("Callee IP: %s, Port: %s, Version:%s\n", argv[2], argv[4], argv[6]) ; 
+    printf("Callee IP: %s, Port: %s, Version:%s\n", argv[2], argv[4], argv[6]) ;
 
     while(1) {
           client_test(&args) ;

+ 5 - 5
IDE/MDK5-ARM/Projects/SimpleClient/time-CortexM3-4.c

@@ -1,6 +1,6 @@
 /* time-STM32F2.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -19,14 +19,14 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  */
 
- 
+
 #ifdef HAVE_CONFIG_H
     #include <config.h>
 #endif
 
 
-#include <stdint.h>       
-#define DWT                 ((DWT_Type       *)     (0xE0001000UL)     ) 
+#include <stdint.h>
+#define DWT                 ((DWT_Type       *)     (0xE0001000UL)     )
 typedef struct
 {
   uint32_t CTRL;                    /*!< Offset: 0x000 (R/W)  Control Register                          */
@@ -35,7 +35,7 @@ typedef struct
 
 extern uint32_t SystemCoreClock ;
 
-double current_time(int reset) 
+double current_time(int reset)
 {
       if(reset) DWT->CYCCNT = 0 ;
       return ((double)DWT->CYCCNT/SystemCoreClock) ;

+ 1 - 1
IDE/MDK5-ARM/Projects/SimpleServer/config-SimpleServer.h

@@ -1,6 +1,6 @@
 /* SimpleServer.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 10 - 10
IDE/MDK5-ARM/Projects/SimpleServer/main.c

@@ -1,6 +1,6 @@
 /* main.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -18,7 +18,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  */
- 
+
 #ifdef HAVE_CONFIG_H
     #include <config.h>
 #endif
@@ -28,7 +28,7 @@
 
 #include "stm32f2xx_hal.h"
 #include "cmsis_os.h"
-#include "rl_net.h" 
+#include "rl_net.h"
 #include <stdio.h>
 
 #include <wolfssl/ssl.h>
@@ -74,31 +74,31 @@ extern void server_test(func_args * args) ;
 #include "config-SimpleServer.h"
 
 /*-----------------------------------------------------------------------------
- *       mian entry 
+ *       mian entry
  *----------------------------------------------------------------------------*/
 int myoptind = 0;
 char* myoptarg = NULL;
 
-int main() 
+int main()
 {
     static char *argv[]    = {  "server",   "-p", WOLFSSL_LISTEN_PORT, "-d"} ;
-    static func_args args  = {  4, argv } ; 
-        
+    static func_args args  = {  4, argv } ;
+
     SystemClock_Config ();
     #if !defined(NO_FILESYSTEM)
     init_filesystem ();
     #endif
     netInitialize() ;
-    osDelay(300) ;  
+    osDelay(300) ;
     #if defined(DEBUG_WOLFSSL)
          printf("Turning ON Debug message\n") ;
          wolfSSL_Debugging_ON() ;
     #endif
-		
+
     printf("Simple Server: Started\n") ;
     while(1) {
        server_test(&args) ;
        printf("Enter any key to iterate.\n") ;
        getchar() ;
-   }	
+   }
 }

+ 8 - 8
IDE/MDK5-ARM/Projects/wolfSSL-Full/main.c

@@ -1,6 +1,6 @@
 /* main.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -18,7 +18,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  */
- 
+
 #ifdef HAVE_CONFIG_H
     #include <config.h>
 #endif
@@ -33,7 +33,7 @@
 #include "wolfcrypt/src/misc.c"
 #include "stm32f2xx_hal.h"
 #include "cmsis_os.h"
-#include "rl_net.h" 
+#include "rl_net.h"
 #include <stdio.h>
 
 #include <wolfssl/ssl.h>
@@ -79,12 +79,12 @@ typedef struct func_args {
 extern void shell_main(func_args * args) ;
 
 /*-----------------------------------------------------------------------------
- *       mian entry 
+ *       mian entry
  *----------------------------------------------------------------------------*/
 int myoptind = 0;
 char* myoptarg = NULL;
 
-int main() 
+int main()
 {
     void *arg = NULL ;
 
@@ -92,15 +92,15 @@ int main()
 	  #if !defined(NO_FILESYSTEM)
         init_filesystem ();
 	  #endif
-	
+
     netInitialize() ;
     osDelay(300) ;
- 
+
     #if defined(DEBUG_WOLFSSL)
          printf("Turning ON Debug message\n") ;
          wolfSSL_Debugging_ON() ;
     #endif
 
-    shell_main(arg) ;   
+    shell_main(arg) ;
 
 }

+ 57 - 57
IDE/MDK5-ARM/Projects/wolfSSL-Full/shell.c

@@ -1,6 +1,6 @@
 /*shell.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -19,9 +19,9 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  */
 
- 
+
  /*** tiny Shell for wolfSSL apps ***/
- 
+
  #ifdef HAVE_CONFIG_H
     #include <config.h>
 #endif
@@ -36,7 +36,7 @@
     #include <stdlib.h>
         #if defined(WOLFSSL_MDK5) || defined(WOLFSSL_KEIL_TCP_NET)
             #include "cmsis_os.h"
-        #include "rl_fs.h" 
+        #include "rl_fs.h"
     #else
             #include <rtl.h>
         #endif
@@ -192,7 +192,7 @@ extern void dh_test(void *arg) ;
 #ifndef NO_DSA
 extern void dsa_test(void *arg) ;
 #endif
-    
+
 #ifndef NO_PWDBASED
 extern void pwdbased_test(void *arg) ;
 #endif
@@ -283,8 +283,8 @@ static struct {
 #ifndef NO_DES3
   "des",  des_test,
   "des3",  des3_test,
-#endif  
-#ifndef NO_AES  
+#endif
+#ifndef NO_AES
   "aes",  aes_test,
     #ifdef HAVE_AESGCM
   "aesgcm",  aesgcm_test,
@@ -306,10 +306,10 @@ static struct {
 #endif
 #ifndef NO_DSA
     "dsa",  dsa_test,
-#endif 
+#endif
 #ifndef NO_PWDBASED
   "pwdbased",  pwdbased_test,
-#endif  
+#endif
 #ifdef OPENSSL_EXTRA
   "openssl",  openssl_test,
 #endif
@@ -328,29 +328,29 @@ enum jobtype { FORGROUND, BACKGROUND }  ;
 
 static int BackGround = 0 ; /* 1: background job is running */
 
-char * wolfssl_fgets ( char * str, int num, FILE * f ) 
+char * wolfssl_fgets ( char * str, int num, FILE * f )
 {
     int i ;
-    
+
     for(i = 0 ; i< num ; i++) {
             while((str[i] = getchar()) == 0) {
             #if defined (HAVE_KEIL_RTX) && !defined(WOLFSSL_CMSIS_RTOS)
                 os_tsk_pass ();
-            #else 
+            #else
                 osThreadYield ();
             #endif
         }
         if(str[i] == '\n' || str[i] == '\012' || str[i] == '\015')  {
             putchar('\n') ;
-            str[i++] = '\n' ; 
-            str[i] = '\0' ; 
+            str[i++] = '\n' ;
+            str[i] = '\0' ;
             break ;
         } else if(str[i] == '\010') { /* BS */
             if(i) { /* erace one char */
-                putchar('\010') ; putchar(' ') ; putchar('\010') ; 
+                putchar('\010') ; putchar(' ') ; putchar('\010') ;
                 i = (i>0 ? (i-2) : -1 ) ;
                 continue ;
-            } 
+            }
         } else if(str[i] == '\033'  || str[i] == '\004' ) {  /* ESC or ^D */
             str[i] = '\0' ;
             return(0) ;
@@ -361,23 +361,23 @@ char * wolfssl_fgets ( char * str, int num, FILE * f )
 }
 
 /*******  Get Command Line *****************************/
-static int getline(char * line, int sz, func_args *args, int*bf_flg) 
+static int getline(char * line, int sz, func_args *args, int*bf_flg)
 {
     char * ret ;
     int i ;
-    
+
     #define MAXARGS 10
     #define MAXARGLEN 30
     static char *argv[MAXARGS] ;
     args->argv = argv ;
-    
+
     putchar('>') ;
     fflush(stdout) ;
     ret = wolfssl_fgets(line, sz, stdin) ;
-    
+
     #define SHELL_ERROR_FGETS -102
     if(ret != line) return(SHELL_ERROR_FGETS) ;
-    
+
     if(line[strlen(line)-2] == '&') {
         (*bf_flg) = BACKGROUND ;
         line[strlen(line)-2] = '\n' ;
@@ -404,22 +404,22 @@ static int getline(char * line, int sz, func_args *args, int*bf_flg)
 #define IP_SIZE 16
 
 #ifdef WOLFSSL_KEIL_TCP_NET
-static void ipaddr_comm(void *args) 
+static void ipaddr_comm(void *args)
 {
     if(((func_args *)args)->argc == 1) {
             printf("IP addr: %s, port %d\n", wolfSSLIP, wolfSSLPort) ;
     } else {
         if(BackGround != 0) {
         printf("Cannot change IP addr while background server is running\n") ;
-        } else if(((func_args *)args)->argc == 3 && 
-                  ((func_args *)args)->argv[1][0] == '-'&& 
+        } else if(((func_args *)args)->argc == 3 &&
+                  ((func_args *)args)->argv[1][0] == '-'&&
                   ((func_args *)args)->argv[1][1] == 'a' ) {
 /*          strcpy(yasslIP, ((func_args *)args)->argv[2]) ; */
-        } else if(((func_args *)args)->argc == 3 && 
-                  ((func_args *)args)->argv[1][0] == '-' && 
+        } else if(((func_args *)args)->argc == 3 &&
+                  ((func_args *)args)->argv[1][0] == '-' &&
                   ((func_args *)args)->argv[1][1] == 'p' ) {
 /*          yasslPort = atoi(((func_args *)args)->argv[2]) ; */
-        } else printf("Invalid argument\n") ; 
+        } else printf("Invalid argument\n") ;
     }
 }
 
@@ -430,7 +430,7 @@ static void ipaddr_comm(void *args)
 #if defined(HAVE_KEIL_RTX)
 static int stack_ck = 0 ;
 
-void stack_comm(void *args) 
+void stack_comm(void *args)
 {
     if(stack_ck) {
         printf("Stack Check: Off\n") ;
@@ -440,7 +440,7 @@ void stack_comm(void *args)
         stack_ck = 1 ;
     }
 }
-    
+
 #define FILL_PATTERN 0xa596695a
 void stack_fill(char * stack, int size)
 {
@@ -451,13 +451,13 @@ void stack_fill(char * stack, int size)
         ((int *)stack)[i] = FILL_PATTERN ;
 }
 
-void stack_check(char * stack, int size) 
+void stack_check(char * stack, int size)
 {
     int i ;
-    
+
     if(stack_ck == 0)return ;
     if(stack_ck == 1) {
-        stack_ck ++ ; return ; 
+        stack_ck ++ ; return ;
     }
     for(i=1; i<size/4 ; i++) {
         if(((int *)stack)[i] != FILL_PATTERN) break ;
@@ -473,7 +473,7 @@ void stack_check(char * stack, int size)
 
 static int for_iteration = 1 ;
 
-static void for_command(void *args) 
+static void for_command(void *args)
 {
     if( args == NULL || ((func_args *)args)->argc == 1) {
         printf("For %d times\n", for_iteration) ;
@@ -487,7 +487,7 @@ static void for_command(void *args)
 
 static int wolfsslDebug = 1 ;
 
-static void dbg_comm(void *args) 
+static void dbg_comm(void *args)
 {
     if(wolfsslDebug == 1) {
         wolfsslDebug = 0 ;
@@ -501,10 +501,10 @@ static void dbg_comm(void *args)
 }
 #endif
 
-static void help_comm(void *args) 
+static void help_comm(void *args)
 {
     static char *commands[] = {
-        "test", 
+        "test",
         "benchmark",
         "echoserver&            : simple echo server in background mode",
         "echoclient             : simple echo client followed by any input string, or \"quit\", \"break\"",
@@ -513,7 +513,7 @@ static void help_comm(void *args)
         "client -g -v [0123] -h xxx.xxx.xxx.xxx -p 443  : usage example",
         "server/client -h        :  help for server/client command",
         "help",
-        ""  
+        ""
     } ;
 
     int i ;
@@ -555,12 +555,12 @@ void exit_command(void) {
 
 
 /***********    Invoke Forground Command  *********************/
-static void command_invoke(void const *args) 
+static void command_invoke(void const *args)
 {
     void (*func)(void const * ) ;
     int i,iteration ;
-    
-    func = (void(*)(void const *))((func_args *)args)->argv[0] ; 
+
+    func = (void(*)(void const *))((func_args *)args)->argv[0] ;
     #if defined(HAVE_KEIL_RTX)
     wc_LockMutex((wolfSSL_Mutex *)&command_mutex) ;
     #endif
@@ -570,15 +570,15 @@ static void command_invoke(void const *args)
         #if defined(HAVE_KEIL_RTX) && !defined(WOLFSSL_CMSIS_RTOS)
         stack_fill(command_stack, COMMAND_STACK_SIZE) ;
         #endif
-                
+
         func(args) ;        /* invoke command */
-                
+
         #if defined(HAVE_KEIL_RTX)&& !defined(WOLFSSL_CMSIS_RTOS)
         stack_check(command_stack, COMMAND_STACK_SIZE) ;
         #endif
     }
 
-    if(iteration > 1) 
+    if(iteration > 1)
     for_iteration = 1 ;
     osDelay(20000) ;
     #ifdef HAVE_KEIL_RTX
@@ -593,26 +593,26 @@ static void command_invoke(void const *args)
 
 #if defined(HAVE_KEIL_RTX) || defined(WOLFSSL_CMSIS_RTOS)
 /*******  Invoke Background Job   *******************************/
-static void bg_job_invoke(void const *args) 
+static void bg_job_invoke(void const *args)
 {
     void (*func)(void const * ) ;
-    BackGround = 1 ; 
+    BackGround = 1 ;
     #if defined(HAVE_KEIL_RTX)&& !defined(WOLFSSL_CMSIS_RTOS)
     stack_fill(bg_job_stack, BG_JOB_STACK_SIZE) ;
     #endif
 
-    func = (void(*)(void const *))((func_args *)args)->argv[0] ; 
+    func = (void(*)(void const *))((func_args *)args)->argv[0] ;
     func(args) ;        /* invoke command */
     #if defined(HAVE_KEIL_RTX) && !defined(WOLFSSL_CMSIS_RTOS)
     stack_check(bg_job_stack, BG_JOB_STACK_SIZE) ;
     #endif
-    
+
     osDelay(20000) ;
     BackGround = 0 ;
 
     #ifdef WOLFSSL_CMSIS_RTOS
         osThreadTerminate(osThreadGetId()) ;
-    #else   
+    #else
         os_tsk_delete_self() ; ;
     #endif
 }
@@ -627,18 +627,18 @@ static char line[LINESIZE] ;
 #endif
 /********* SHEULL MAIN LOOP ***********************************/
 void shell_main(void *arg) {
-    int i ; 
+    int i ;
     func_args args ;
     int bf_flg ;
     osThreadId 	 cmd ;
-    i = BackGround ; 
+    i = BackGround ;
         /* Dummy for avoiding warning: BackGround is defined but not used. */
-    
- #if defined(HAVE_KEIL_RTX) 
+
+ #if defined(HAVE_KEIL_RTX)
     wc_InitMutex(&command_mutex) ;
 #endif
     help_comm(NULL) ;
-    
+
     printf("Starting Shell\n") ;
     while(1) {
         if(getline(line,  LINESIZE, &args, &bf_flg) > 0) {
@@ -654,7 +654,7 @@ void shell_main(void *arg) {
                     #else
                         #if defined(WOLFSSL_CMSIS_RTOS)
                              wc_UnLockMutex((wolfSSL_Mutex *)&command_mutex) ;
-                             cmd = osThreadCreate (osThread (command_invoke) , &args); 
+                             cmd = osThreadCreate (osThread (command_invoke) , &args);
                              if(cmd == NULL) {
 															     printf("Cannon create command thread\n") ;
 														 }
@@ -673,13 +673,13 @@ void shell_main(void *arg) {
                     if(BackGround != 0) {
                         printf("Multiple background servers not supported.\n") ;
                     } else {
-                        printf("\"%s\" is running with the background mode.\n", 
+                        printf("\"%s\" is running with the background mode.\n",
                                                      commandTable[i].command) ;
                         #if  defined(HAVE_KEIL_RTX) && !defined(WOLFSSL_CMSIS_RTOS)
-                             os_tsk_create_user_ex( (void(*)(void *))&bg_job_invoke, 
+                             os_tsk_create_user_ex( (void(*)(void *))&bg_job_invoke,
                                    6, bg_job_stack, BG_JOB_STACK_SIZE, &args) ;
                         #else
-                                osThreadCreate (osThread (bg_job_invoke),  &args); 
+                                osThreadCreate (osThread (bg_job_invoke),  &args);
                                 osDelay (500) ;
                         #endif
                     }

+ 5 - 5
IDE/MDK5-ARM/Projects/wolfSSL-Full/time-CortexM3-4.c

@@ -1,6 +1,6 @@
 /* time-STM32F2.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -19,15 +19,15 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  */
 
- 
+
 #ifdef HAVE_CONFIG_H
     #include <config.h>
 #endif
 
 #include <wolfssl/wolfcrypt/settings.h>
 
-#include <stdint.h>       
-#define DWT                 ((DWT_Type       *)     (0xE0001000UL)     ) 
+#include <stdint.h>
+#define DWT                 ((DWT_Type       *)     (0xE0001000UL)     )
 typedef struct
 {
   uint32_t CTRL;                    /*!< Offset: 0x000 (R/W)  Control Register                          */
@@ -36,7 +36,7 @@ typedef struct
 
 extern uint32_t SystemCoreClock ;
 
-double current_time(int reset) 
+double current_time(int reset)
 {
       if(reset) DWT->CYCCNT = 0 ;
       return ((double)DWT->CYCCNT/SystemCoreClock) ;

+ 4 - 4
IDE/MDK5-ARM/Src/ssl-dummy.c

@@ -1,6 +1,6 @@
 /* ssl-dummy.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -27,8 +27,8 @@
 #include <cyassl/ssl.h>
 #include <cyassl/internal.h>
 
-Signer* GetCA(void* vp, byte* hash) 
-{ 
+Signer* GetCA(void* vp, byte* hash)
+{
     return NULL  ;
 }
 
@@ -47,7 +47,7 @@ Signer* GetCAByName(void* vp, byte* hash)
     return NULL ;
 }
 
-int CyaSSL_PemCertToDer(const char* fileName, unsigned char* derBuf, int derSz) 
+int CyaSSL_PemCertToDer(const char* fileName, unsigned char* derBuf, int derSz)
 {
         return NULL ;
 }

+ 5 - 5
IDE/ROWLEY-CROSSWORKS-ARM/arm_startup.c

@@ -1,6 +1,6 @@
 /* arm_startup.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -65,7 +65,7 @@ void reset_handler(void)
     memcpy32(__data_load_start__, __data_start__, __data_end__);
     meminit32(__bss_start__, __bss_end__);
     memcpy32(__fast_load_start__, __fast_start__, __fast_end__);
-    
+
     // Init heap
     __heap_start__[0] = 0;
     __heap_start__[1] = ((uint32_t)__heap_end__ - (uint32_t)__heap_start__);
@@ -120,8 +120,8 @@ void HardFault_HandlerC( uint32_t *hardfault_args )
 
     // Configurable Fault Status Register
     // Consists of MMSR, BFSR and UFSR
-    _CFSR = (*((volatile uint32_t *)(0xE000ED28)));	
-                             
+    _CFSR = (*((volatile uint32_t *)(0xE000ED28)));
+
     // Hard Fault Status Register
     _HFSR = (*((volatile uint32_t *)(0xE000ED2C)));
 
@@ -158,7 +158,7 @@ void HardFault_HandlerC( uint32_t *hardfault_args )
 	__asm("BKPT #0\n");
 }
 
-__attribute__( ( naked ) ) 
+__attribute__( ( naked ) )
 void HardFault_Handler(void)
 {
     __asm volatile

+ 4 - 4
IDE/ROWLEY-CROSSWORKS-ARM/benchmark_main.c

@@ -1,6 +1,6 @@
 /* benchmark_main.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -38,7 +38,7 @@ static func_args args = { 0 } ;
 
 extern double current_time(int reset);
 
-void main(void) 
+void main(void)
 {
     int test_num = 0;
 
@@ -47,12 +47,12 @@ void main(void)
         printf("\nBenchmark Test %d:\n", test_num);
         benchmark_test(&args);
         printf("Benchmark Test %d: Return code %d\n", test_num, args.return_code);
-        
+
         test_num++;
     } while(args.return_code == 0);
 }
 
-/* 
+/*
 SAMPLE OUTPUT: Freescale K64 running at 96MHz with no MMCAU:
 Benchmark Test 0:
 AES      25 kB took 0.073 seconds,    0.334 MB/s

+ 8 - 8
IDE/ROWLEY-CROSSWORKS-ARM/kinetis_hw.c

@@ -1,6 +1,6 @@
 /* kinetis_hw.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -100,9 +100,9 @@ static void hw_mcg_init(void)
     BOARD_BootClockHSRUN();
 #else
     /* Adjust clock dividers (core/system=div/1, bus=div/2, flex bus=div/2, flash=div/4) */
-    SIM->CLKDIV1 = SIM_CLKDIV1_OUTDIV1(SYS_CLK_DIV-1) | SIM_CLKDIV1_OUTDIV2(BUS_CLK_DIV-1) | 
+    SIM->CLKDIV1 = SIM_CLKDIV1_OUTDIV1(SYS_CLK_DIV-1) | SIM_CLKDIV1_OUTDIV2(BUS_CLK_DIV-1) |
         SIM_CLKDIV1_OUTDIV3(BUS_CLK_DIV-1) | SIM_CLKDIV1_OUTDIV4(FLASH_CLK_DIV-1);
-   
+
     /* Configure FEI internal clock speed */
     MCG->C4 = (SYS_CLK_DMX | SYS_CLK_DRS);
     while((MCG->C4 & (MCG_C4_DRST_DRS_MASK | MCG_C4_DMX32_MASK)) != (SYS_CLK_DMX | SYS_CLK_DRS));
@@ -146,7 +146,7 @@ static void hw_uart_init(void)
     /* Enable UART core clock */
     /* Note: Remember to update me if UART_PORT changes */
     SIM->SCGC1 |= SIM_SCGC1_UART4_MASK;
-    
+
     /* Configure UART TX pin */
     UART_TX_PORT->PCR[UART_TX_PIN] = PORT_PCR_MUX(UART_TX_MUX);
 
@@ -155,17 +155,17 @@ static void hw_uart_init(void)
 
     /* Configure the UART for 8-bit mode, no parity */
     UART_PORT->C1 = 0;
-    
+
     /* Calculate baud settings */
     sbr = (uint16_t)((BUS_CLK_KHZ * 1000)/(UART_BAUD * 16));
     temp = UART_PORT->BDH & ~(UART_BDH_SBR(0x1F));
     UART_PORT->BDH = temp | UART_BDH_SBR(((sbr & 0x1F00) >> 8));
     UART_PORT->BDL = (uint8_t)(sbr & UART_BDL_SBR_MASK);
-    
+
     /* Determine if a fractional divider is needed to get closer to the baud rate */
     brfa = (((BUS_CLK_KHZ * 32000)/(UART_BAUD * 16)) - (sbr * 32));
     temp = UART_PORT->C4 & ~(UART_C4_BRFA(0x1F));
-    UART_PORT->C4 = temp | UART_C4_BRFA(brfa);    
+    UART_PORT->C4 = temp | UART_C4_BRFA(brfa);
 
     /* Enable receiver and transmitter */
 	UART_PORT->C2 |= (UART_C2_TE_MASK | UART_C2_RE_MASK);
@@ -314,7 +314,7 @@ const struct flash_conf flash_conf __attribute__ ((section (".flashconf"),used))
 {
    .backdoor_key = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },
    .fprot = { 0xFF, 0xFF, 0xFF, 0xFF },
-   .fsec = NV_FSEC_SEC(FSEC_UNSECURE) | NV_FSEC_FSLACC(FSEC_FSLACC_GRANTED) | 
+   .fsec = NV_FSEC_SEC(FSEC_UNSECURE) | NV_FSEC_FSLACC(FSEC_FSLACC_GRANTED) |
            NV_FSEC_MEEN(FSEC_MASS_ERASE_ENABLE) | NV_FSEC_KEYEN(FSEC_KEY_DISABLED),
    .fopt = 0xFF,
    .feprot = 0xFF,

+ 1 - 1
IDE/ROWLEY-CROSSWORKS-ARM/retarget.c

@@ -1,6 +1,6 @@
 /* retarget.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 4 - 4
IDE/ROWLEY-CROSSWORKS-ARM/test_main.c

@@ -1,6 +1,6 @@
 /* test_main.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -38,7 +38,7 @@ typedef struct func_args {
 static func_args args = { 0 } ;
 
 
-void main(void) 
+void main(void)
 {
     int test_num = 0;
 
@@ -47,13 +47,13 @@ void main(void)
         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: 
+/* SAMPLE OUTPUT:
 Crypt Test 0:
 SHA      test passed!
 SHA-256  test passed!

+ 53 - 0
README

@@ -34,6 +34,59 @@ before calling wolfSSL_new();  Though it's not recommended.
 
 *** end Notes ***
 
+
+********* wolfSSL (Formerly CyaSSL) Release 3.12.2 (10/20/2017)
+
+Release 3.12.2 of wolfSSL has bug fixes and new features including:
+
+This release includes many performance improvements with Intel ASM (AVX/AVX2) and AES-NI. New single precision math option to speedup RSA, DH and ECC. Embedded hardware support has been expanded for STM32, PIC32MZ and ATECC508A. AES now supports XTS mode for disk encryption. Certificate improvements for setting serial number, key usage and extended key usage. Refactor of SSL_ and hash types to allow openssl coexistence. Improvements for TLS 1.3. Fixes for OCSP stapling to allow disable and WOLFSSL specific user context for callbacks. Fixes for openssl and MySQL compatibility. Updated Micrium port. Fixes for asynchronous modes.
+
+- Fix to not send OCSP stapling extensions in client_hello when not enabled
+- Added new API's for disabling OCSP stapling
+- Add check for SIZEOF_LONG with sun and LP64
+- Fixes for various TLS 1.3 disable options (RSA, ECC and ED/Curve 25519).
+- Fix to disallow upgrading to TLS v1.3
+- Fixes for wolfSSL_EVP_CipherFinal() when message size is a round multiple of a block size.
+- Add HMAC benchmark and expanded AES key size benchmarks
+- Added simple GCC ARM Makefile example
+- Add tests for 3072-bit RSA and DH.
+- Fixed DRAFT_18 define and fixed downgrading with TLS v1.3
+- Fixes to allow custom serial number during certificate generation
+- Add method to get WOLFSSL_CTX certificate manager
+- Improvement to `wolfSSL_SetOCSP_Cb` to allow context per WOLFSSL object
+- Alternate certificate chain support `WOLFSSL_ALT_CERT_CHAINS`. Enables checking cert against multiple CA's. 
+- Added new `--disable-oldnames` option to allow for using openssl along-side wolfssl headers (without OPENSSL_EXTRA).
+- Refactor SSL_ and hashing types to use wolf specific prefix (WOLFSSL and WC_) to allow openssl coexistence.
+- Fixes for HAVE_INTEL_MULX
+- Cleanup include paths for MySQL cmake build
+- Added configure option for building library for wolfSSH (--enable-wolfssh)
+- Openssl compatibility layer improvements
+- Expanded API unit tests
+- Fixes for STM32 crypto hardware acceleration
+- Added AES XTS mode (--enable-xts)
+- Added ASN Extended Key Usage Support (see wc_SetExtKeyUsage).
+- Math updates and added TFM_MIPS speedup.
+- Fix for creation of the KeyUsage BitString
+- Fix for 8k keys with MySQL compatibility
+- Fixes for ATECC508A.
+- Fixes for PIC32MZ hashing.
+- Fixes and improvements to asynchronous modes for Intel QuickAssist and Cavium Nitrox V.
+- Update HASH_DRBG Reseed mechanism and add test case
+- Rename the file io.h/io.c to wolfio.h/wolfio.c
+- Cleanup the wolfIO_Send function.
+- OpenSSL Compatibility Additions and Fixes
+- Improvements to Visual Studio DLL project/solution.
+- Added function to generate public ECC key from private key
+- Added async blocking support for sniffer tool.
+- Added wolfCrypt hash tests for empty string and large data.
+- Added ability to use of wolf implementation of `strtok` using `USE_WOLF_STRTOK`.
+- Updated Micrium uC/OS-III Port
+- Updated root certs for OCSP scripts
+- New Single Precision math option for RSA, DH and ECC (off by default). See `--enable-sp`.
+- Speedups for AES GCM with AESNI (--enable-aesni)
+- Speedups for SHA2, ChaCha20/Poly1035 using AVX/AVX2
+
+
 ********* wolfSSL (Formerly CyaSSL) Release 3.12.0 (8/04/2017)
 
 Release 3.12.0 of wolfSSL has bug fixes and new features including:

+ 52 - 0
README.md

@@ -38,6 +38,58 @@ wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0);
 before calling wolfSSL_new();  Though it's not recommended.
 ```
 
+# wolfSSL (Formerly CyaSSL) Release 3.12.2 (10/20/2017)
+
+## Release 3.12.2 of wolfSSL has bug fixes and new features including:
+
+This release includes many performance improvements with Intel ASM (AVX/AVX2) and AES-NI. New single precision math option to speedup RSA, DH and ECC. Embedded hardware support has been expanded for STM32, PIC32MZ and ATECC508A. AES now supports XTS mode for disk encryption. Certificate improvements for setting serial number, key usage and extended key usage. Refactor of SSL_ and hash types to allow openssl coexistence. Improvements for TLS 1.3. Fixes for OCSP stapling to allow disable and WOLFSSL specific user context for callbacks. Fixes for openssl and MySQL compatibility. Updated Micrium port. Fixes for asynchronous modes.
+
+* Fix to not send OCSP stapling extensions in client_hello when not enabled
+* Added new API's for disabling OCSP stapling
+* Add check for SIZEOF_LONG with sun and LP64
+* Fixes for various TLS 1.3 disable options (RSA, ECC and ED/Curve 25519).
+* Fix to disallow upgrading to TLS v1.3
+* Fixes for wolfSSL_EVP_CipherFinal() when message size is a round multiple of a block size.
+* Add HMAC benchmark and expanded AES key size benchmarks
+* Added simple GCC ARM Makefile example
+* Add tests for 3072-bit RSA and DH.
+* Fixed DRAFT_18 define and fixed downgrading with TLS v1.3
+* Fixes to allow custom serial number during certificate generation
+* Add method to get WOLFSSL_CTX certificate manager
+* Improvement to `wolfSSL_SetOCSP_Cb` to allow context per WOLFSSL object
+* Alternate certificate chain support `WOLFSSL_ALT_CERT_CHAINS`. Enables checking cert against multiple CA's. 
+* Added new `--disable-oldnames` option to allow for using openssl along-side wolfssl headers (without OPENSSL_EXTRA).
+* Refactor SSL_ and hashing types to use wolf specific prefix (WOLFSSL and WC_) to allow openssl coexistence.
+* Fixes for HAVE_INTEL_MULX
+* Cleanup include paths for MySQL cmake build
+* Added configure option for building library for wolfSSH (--enable-wolfssh)
+* Openssl compatibility layer improvements
+* Expanded API unit tests
+* Fixes for STM32 crypto hardware acceleration
+* Added AES XTS mode (--enable-xts)
+* Added ASN Extended Key Usage Support (see wc_SetExtKeyUsage).
+* Math updates and added TFM_MIPS speedup.
+* Fix for creation of the KeyUsage BitString
+* Fix for 8k keys with MySQL compatibility
+* Fixes for ATECC508A.
+* Fixes for PIC32MZ hashing.
+* Fixes and improvements to asynchronous modes for Intel QuickAssist and Cavium Nitrox V.
+* Update HASH_DRBG Reseed mechanism and add test case
+* Rename the file io.h/io.c to wolfio.h/wolfio.c
+* Cleanup the wolfIO_Send function.
+* OpenSSL Compatibility Additions and Fixes
+* Improvements to Visual Studio DLL project/solution.
+* Added function to generate public ECC key from private key
+* Added async blocking support for sniffer tool.
+* Added wolfCrypt hash tests for empty string and large data.
+* Added ability to use of wolf implementation of `strtok` using `USE_WOLF_STRTOK`.
+* Updated Micrium uC/OS-III Port
+* Updated root certs for OCSP scripts
+* New Single Precision math option for RSA, DH and ECC (off by default). See `--enable-sp`.
+* Speedups for AES GCM with AESNI (--enable-aesni)
+* Speedups for SHA2, ChaCha20/Poly1035 using AVX/AVX2
+
+
 # wolfSSL (Formerly CyaSSL) Release 3.12.0 (8/04/2017)
 
 ## Release 3.12.0 of wolfSSL has bug fixes and new features including:

+ 3 - 3
configure.ac

@@ -1,12 +1,12 @@
 # configure.ac
 #
-# Copyright (C) 2006-2016 wolfSSL Inc.
+# Copyright (C) 2006-2017 wolfSSL Inc.
 #
 # This file is part of wolfSSL. (formerly known as CyaSSL)
 #
 #
 
-AC_INIT([wolfssl],[3.12.0],[https://github.com/wolfssl/wolfssl/issues],[wolfssl],[http://www.wolfssl.com])
+AC_INIT([wolfssl],[3.12.2],[https://github.com/wolfssl/wolfssl/issues],[wolfssl],[http://www.wolfssl.com])
 
 AC_CONFIG_AUX_DIR([build-aux])
 
@@ -35,7 +35,7 @@ AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_HEADERS([config.h:config.in])dnl Keep filename to 8.3 for MS-DOS.
 
 #shared library versioning
-WOLFSSL_LIBRARY_VERSION=13:0:1
+WOLFSSL_LIBRARY_VERSION=14:0:0
 #                       | | |
 #                +------+ | +---+
 #                |        |     |

+ 1 - 1
ctaocrypt/src/misc.c

@@ -1,6 +1,6 @@
 /* misc.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
ctaocrypt/src/wolfcrypt_first.c

@@ -1,6 +1,6 @@
 /* wolfcrypt_first.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
ctaocrypt/src/wolfcrypt_last.c

@@ -1,6 +1,6 @@
 /* wolfcrypt_last.c
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/callbacks.h

@@ -1,6 +1,6 @@
 /* callbacks.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/crl.h

@@ -1,6 +1,6 @@
 /* crl.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/aes.h

@@ -1,6 +1,6 @@
 /* aes.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/arc4.h

@@ -1,6 +1,6 @@
 /* arc4.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/asn.h

@@ -1,6 +1,6 @@
 /* asn.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/asn_public.h

@@ -1,6 +1,6 @@
 /* asn_public.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/blake2-impl.h

@@ -12,7 +12,7 @@
 */
 /* blake2-impl.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/blake2-int.h

@@ -12,7 +12,7 @@
 */
 /* blake2-int.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/blake2.h

@@ -1,6 +1,6 @@
 /* blake2.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/camellia.h

@@ -1,6 +1,6 @@
 /* camellia.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/chacha.h

@@ -1,6 +1,6 @@
 /* chacha.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/coding.h

@@ -1,6 +1,6 @@
 /* coding.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/compress.h

@@ -1,6 +1,6 @@
 /* compress.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/des3.h

@@ -1,6 +1,6 @@
 /* des3.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/dh.h

@@ -1,6 +1,6 @@
 /* dh.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/dsa.h

@@ -1,6 +1,6 @@
 /* dsa.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/ecc.h

@@ -1,6 +1,6 @@
 /* ecc.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/error-crypt.h

@@ -1,6 +1,6 @@
 /* error-crypt.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/fips_test.h

@@ -1,6 +1,6 @@
 /* fips_test.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/hc128.h

@@ -1,6 +1,6 @@
 /* hc128.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/hmac.h

@@ -1,6 +1,6 @@
 /* hmac.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/integer.h

@@ -1,6 +1,6 @@
 /* integer.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/logging.h

@@ -1,6 +1,6 @@
 /* logging.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/md2.h

@@ -1,6 +1,6 @@
 /* md2.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/md4.h

@@ -1,6 +1,6 @@
 /* md4.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/md5.h

@@ -1,6 +1,6 @@
 /* md5.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/memory.h

@@ -1,6 +1,6 @@
 /* memory.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/misc.h

@@ -1,6 +1,6 @@
 /* misc.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/mpi_class.h

@@ -1,6 +1,6 @@
 /* mpi_class.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/mpi_superclass.h

@@ -1,6 +1,6 @@
 /* mpi_superclass.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/pkcs7.h

@@ -1,6 +1,6 @@
 /* pkcs7.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/poly1305.h

@@ -1,6 +1,6 @@
 /* poly1305.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/port/pic32/pic32mz-crypt.h

@@ -1,6 +1,6 @@
 /* pic32mz-crypt.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/pwdbased.h

@@ -1,6 +1,6 @@
 /* pwdbased.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/rabbit.h

@@ -1,6 +1,6 @@
 /* rabbit.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/random.h

@@ -1,6 +1,6 @@
 /* random.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/ripemd.h

@@ -1,6 +1,6 @@
 /* ripemd.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/rsa.h

@@ -1,6 +1,6 @@
 /* rsa.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 15 - 15
cyassl/ctaocrypt/settings.h

@@ -1,6 +1,6 @@
 /* settings.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *
@@ -54,7 +54,7 @@
 
 /* Uncomment next line if using PIC32MZ Crypto Engine */
 /* #define CYASSL_MICROCHIP_PIC32MZ */
-        
+
 /* Uncomment next line if using FreeRTOS */
 /* #define FREERTOS */
 
@@ -84,7 +84,7 @@
 
 /* Uncomment next line if building for EROAD */
 /* #define CYASSL_EROAD */
-      
+
 /* Uncomment next line if building for IAR EWARM */
 /* #define CYASSL_IAR_ARM */
 
@@ -111,7 +111,7 @@
 /* for reverse compatibility after name change */
 #include <cyassl/ctaocrypt/settings_comp.h>
 
-#ifdef THREADX 
+#ifdef THREADX
     #define SIZEOF_LONG_LONG 8
 #endif
 
@@ -125,8 +125,8 @@
     #define SINGLE_THREADED
     #define CYASSL_USER_IO
     #define NO_FILESYSTEM
-#endif 
-    
+#endif
+
 #if defined(CYASSL_IAR_ARM)
     #define NO_MAIN_DRIVER
     #define SINGLE_THREADED
@@ -137,7 +137,7 @@
     #define CYASSL_USER_IO
     #define  BENCH_EMBEDDED
 #endif
-      
+
 #ifdef MICROCHIP_PIC32
     /* #define CYASSL_MICROCHIP_PIC32MZ */
     #define SIZEOF_LONG_LONG 8
@@ -254,7 +254,7 @@
 #if defined(CYASSL_LEANPSK) && !defined(XMALLOC_USER)
     #include <stdlib.h>
     #define XMALLOC(s, h, type)  malloc((s))
-    #define XFREE(p, h, type)    free((p)) 
+    #define XFREE(p, h, type)    free((p))
     #define XREALLOC(p, n, h, t) realloc((p), (n))
 #endif
 
@@ -386,7 +386,7 @@
 
     #include "SafeRTOS/heap.h"
     #define XMALLOC(s, h, type)  pvPortMalloc((s))
-    #define XFREE(p, h, type)    vPortFree((p)) 
+    #define XFREE(p, h, type)    vPortFree((p))
     #define XREALLOC(p, n, h, t) pvPortRealloc((p), (n))
 #endif
 
@@ -462,7 +462,7 @@
                      (CPU_CHAR *)(pstr_src), (CPU_SIZE_T)(len_max)))
     #define XSTRNCMP(pstr_1, pstr_2, len_max) \
                     ((CPU_INT16S)Str_Cmp_N((CPU_CHAR *)(pstr_1), \
-                     (CPU_CHAR *)(pstr_2), (CPU_SIZE_T)(len_max)))  
+                     (CPU_CHAR *)(pstr_2), (CPU_SIZE_T)(len_max)))
     #define XSTRSTR(pstr, pstr_srch) \
                     ((CPU_CHAR *)Str_Str((CPU_CHAR *)(pstr), \
                      (CPU_CHAR *)(pstr_srch)))
@@ -477,7 +477,7 @@
     #define XMEMMOVE XMEMCPY
 
 #if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED)
-    #define MICRIUM_MALLOC    
+    #define MICRIUM_MALLOC
     #define XMALLOC(s, h, type) ((void *)NetSecure_BlkGet((CPU_INT08U)(type), \
                                  (CPU_SIZE_T)(s), (void *)0))
     #define XFREE(p, h, type)   (NetSecure_BlkFree((CPU_INT08U)(type), \
@@ -577,13 +577,13 @@
     #endif
 
     #if (SSL_CFG_USER_RNG_SEED_EN == DEF_ENABLED)
-        #define NO_DEV_RANDOM   
+        #define NO_DEV_RANDOM
     #else
         #undef  NO_DEV_RANDOM
     #endif
 
     #if (SSL_CFG_USER_IO_EN == DEF_ENABLED)
-        #define CYASSL_USER_IO   
+        #define CYASSL_USER_IO
     #else
         #undef  CYASSL_USER_IO
     #endif
@@ -697,8 +697,8 @@
         #define CYASSL_GENERAL_ALIGNMENT  4
     #elif defined(FREESCALE_MMCAU)
         #define CYASSL_GENERAL_ALIGNMENT  CYASSL_MMCAU_ALIGNMENT
-    #else 
-        #define CYASSL_GENERAL_ALIGNMENT  0 
+    #else
+        #define CYASSL_GENERAL_ALIGNMENT  0
     #endif
 #endif
 

+ 1 - 1
cyassl/ctaocrypt/settings_comp.h

@@ -1,6 +1,6 @@
 /* settings_comp.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/sha.h

@@ -1,6 +1,6 @@
 /* sha.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/sha256.h

@@ -1,6 +1,6 @@
 /* sha256.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/sha512.h

@@ -1,6 +1,6 @@
 /* sha512.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/tfm.h

@@ -1,6 +1,6 @@
 /* tfm.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/types.h

@@ -1,6 +1,6 @@
 /* types.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/visibility.h

@@ -1,6 +1,6 @@
 /* visibility.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ctaocrypt/wc_port.h

@@ -1,6 +1,6 @@
 /* port.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/error-ssl.h

@@ -1,6 +1,6 @@
 /* error-ssl.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/internal.h

@@ -1,6 +1,6 @@
 /* internal.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

+ 1 - 1
cyassl/ocsp.h

@@ -1,6 +1,6 @@
 /* ocsp.h
  *
- * Copyright (C) 2006-2016 wolfSSL Inc.
+ * Copyright (C) 2006-2017 wolfSSL Inc.
  *
  * This file is part of wolfSSL.
  *

Some files were not shown because too many files changed in this diff