CyaSSL is an SSL library for devices like mbed.

Dependents:   mbed_cyassl

Fork of CyaSSL by Todd Ouska

Files at this revision

API Documentation at this revision

Comitter:
saranieves92
Date:
Sun May 31 19:30:30 2015 +0000
Parent:
0:5045d2638c29
Commit message:
RSA con cyassl

Changed in this revision

os_settings.h Show annotated file Show diff for this revision Revisions of this file
rsa.c Show annotated file Show diff for this revision Revisions of this file
diff -r 5045d2638c29 -r 04ea34bf3bff os_settings.h
--- a/os_settings.h	Sat Feb 05 01:09:17 2011 +0000
+++ b/os_settings.h	Sun May 31 19:30:30 2015 +0000
@@ -59,6 +59,7 @@
     #define NO_DH
     #define NO_DSA
     #define NO_HC128
+    #define CYASSL_KEY_GEN
 
 #endif /* MBED */
 
diff -r 5045d2638c29 -r 04ea34bf3bff rsa.c
--- a/rsa.c	Sat Feb 05 01:09:17 2011 +0000
+++ b/rsa.c	Sun May 31 19:30:30 2015 +0000
@@ -385,7 +385,7 @@
     }
    
     /* allocate buffer to work with */
-    buf = XCALLOC(1, len, heap);
+   buf = XMALLOC(len, heap, DYNAMIC_TYPE_RSA);
     if (buf == NULL) {
         return -1;
     }
@@ -413,6 +413,7 @@
             XFREE(buf, heap, DYNAMIC_TYPE_RSA);
             return err;
         }
+        XMEMSET(buf, 0, len);
     } while (res == MP_NO);
 
 #ifdef LTC_CLEAN_STACK