File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 1414 * See the License for the specific language governing permissions and
1515 * limitations under the License.
1616 */
17+ #include < mbed.h>
18+ #include < platform.h>
1719#include " psa/crypto.h"
1820#include " mbedtls/version.h"
1921#include < string.h>
@@ -764,6 +766,13 @@ static void generate_and_export_a_public_key()
764766int main (void )
765767{
766768 printf (" -- Begin Mbed Crypto Getting Started --\n\n " );
769+
770+ int ret = 0 ;
771+
772+ if ((ret = mbedtls_platform_setup (NULL )) != 0 ) {
773+ mbedtls_printf (" Platform initialization failed with error %d\r\n " , ret);
774+ return 1 ;
775+ }
767776
768777 import_a_key (AES_KEY, sizeof (AES_KEY));
769778 sign_a_message_using_rsa (RSA_KEY, sizeof (RSA_KEY));
@@ -777,6 +786,7 @@ int main(void)
777786 authenticate_and_decrypt_a_message ();
778787 generate_and_export_a_public_key ();
779788
789+ mbedtls_platform_teardown (NULL );
780790 printf (" \n -- End Mbed Crypto Getting Started --\n " );
781791
782792 return 0 ;
You can’t perform that action at this time.
0 commit comments