Azure IoT common library

Dependents:   STM32F746_iothub_client_sample_mqtt f767zi_mqtt iothub_client_sample_amqp iothub_client_sample_http ... more

Revision:
25:8507bf644fdf
Parent:
23:ba126c6eb699
Child:
26:b38c66e3e45e
diff -r 96ae4d5375ef -r 8507bf644fdf sastoken.c
--- a/sastoken.c	Thu Apr 06 14:12:06 2017 -0700
+++ b/sastoken.c	Fri Apr 21 14:51:10 2017 -0700
@@ -152,7 +152,7 @@
             }
             else
             {
-                char* expiryASCII = malloc(seStop - seStart + 1);
+                char* expiryASCII = (char*)malloc(seStop - seStart + 1);
                 /*Codes_SRS_SASTOKEN_25_031: [**If malloc fails during validation then SASToken_Validate shall return false.**]***/
                 if (expiryASCII == NULL)
                 {
@@ -265,7 +265,7 @@
                     /*Codes_SRS_SASTOKEN_06_022: [The string "&skn=" is appended to result.]*/
                     /*Codes_SRS_SASTOKEN_06_023: [The argument keyName is appended to result.]*/
                     if ((HMACSHA256_ComputeHash(outBuf, outLen, inBuf, inLen, hash) != HMACSHA256_OK) ||
-                        ((base64Signature = Base64_Encode(hash)) == NULL) ||
+                        ((base64Signature = Base64_Encoder(hash)) == NULL) ||
                         ((urlEncodedSignature = URL_Encode(base64Signature)) == NULL) ||
                         (STRING_copy(result, "SharedAccessSignature sr=") != 0) ||
                         (STRING_concat(result, scope) != 0) ||