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 14
14
* See the License for the specific language governing permissions and
15
15
* limitations under the License.
16
16
*/
17
+ #include < mbed.h>
18
+ #include < platform.h>
17
19
#include " psa/crypto.h"
18
20
#include " mbedtls/version.h"
19
21
#include < string.h>
@@ -759,6 +761,13 @@ int main(void)
759
761
{
760
762
printf (" -- Begin Mbed Crypto Getting Started --\n\n " );
761
763
764
+ int ret = 0 ;
765
+
766
+ if ((ret = mbedtls_platform_setup (NULL )) != 0 ) {
767
+ mbedtls_printf (" Platform initialization failed with error %d\r\n " , ret);
768
+ return 1 ;
769
+ }
770
+
762
771
import_a_key ();
763
772
sign_a_message_using_rsa ();
764
773
encrypt_with_symmetric_ciphers ();
@@ -771,6 +780,7 @@ int main(void)
771
780
authenticate_and_decrypt_a_message ();
772
781
generate_and_export_a_public_key ();
773
782
783
+ mbedtls_platform_teardown (NULL );
774
784
printf (" \n -- End Mbed Crypto Getting Started --\n " );
775
785
776
786
return 0 ;
You can’t perform that action at this time.
0 commit comments