Adapt the example programs
Adapt the example programs if MBEDTLS_ENTROPY_HARDWARE_ALT
is defined.
diff --git a/programs/pkey/mpi_demo.c b/programs/pkey/mpi_demo.c
index ecdcd32..2ae441c 100644
--- a/programs/pkey/mpi_demo.c
+++ b/programs/pkey/mpi_demo.c
@@ -50,6 +50,18 @@
}
#else
+#if defined(MBEDTLS_ENTROPY_HARDWARE_ALT)
+int mbedtls_hardware_poll( void *data, unsigned char *output,
+ size_t len, size_t *olen )
+{
+ size_t i;
+ (void) data;
+ for( i = 0; i < len; ++i )
+ output[i] = rand();
+ *olen = len;
+ return( 0 );
+}
+#endif
int main( void )
{