/*
 *  mbedtls_device.h
 *******************************************************************************
 * Copyright (c) 2017, STMicroelectronics
 *  SPDX-License-Identifier: Apache-2.0
 *
 *  Licensed under the Apache License, Version 2.0 (the "License"); you may
 *  not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */
#ifndef MBEDTLS_DEVICE_H
#define MBEDTLS_DEVICE_H

/* FIXME: Don't enable AES hardware acceleration until issue #4928 is fixed.
 * (https://github.com/ARMmbed/mbed-os/issues/4928) */
/* #define MBEDTLS_AES_ALT */

/* FIXME: Don't enable SHA1, SHA256 and MD5 hardware acceleration until issue
 * #5079 is fixed. (https://github.com/ARMmbed/mbed-os/issues/5079) */
/* #define MBEDTLS_SHA256_ALT */

/* #define MBEDTLS_SHA1_ALT */

/* #define MBEDTLS_MD5_ALT */

#endif /* MBEDTLS_DEVICE_H */

/*
 *  mbedtls_device.h
 *******************************************************************************
 * Copyright (c) 2017, STMicroelectronics
 *  SPDX-License-Identifier: Apache-2.0
 *
 *  Licensed under the Apache License, Version 2.0 (the "License"); you may
 *  not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */
#ifndef MBEDTLS_DEVICE_H
#define MBEDTLS_DEVICE_H

/* FIXME: Don't enable AES hardware acceleration until issue #4928 is fixed.
 * (https://github.com/ARMmbed/mbed-os/issues/4928) */
/* #define MBEDTLS_AES_ALT */

#define MBEDTLS_SHA256_ALT

#define MBEDTLS_SHA1_ALT

#define MBEDTLS_MD5_ALT

#endif /* MBEDTLS_DEVICE_H */

--- 
+++ 
@@ -24,10 +24,12 @@
  * (https://github.com/ARMmbed/mbed-os/issues/4928) */
 /* #define MBEDTLS_AES_ALT */
 
-#define MBEDTLS_SHA256_ALT
+/* FIXME: Don't enable SHA1, SHA256 and MD5 hardware acceleration until issue
+ * #5079 is fixed. (https://github.com/ARMmbed/mbed-os/issues/5079) */
+/* #define MBEDTLS_SHA256_ALT */
 
-#define MBEDTLS_SHA1_ALT
+/* #define MBEDTLS_SHA1_ALT */
 
-#define MBEDTLS_MD5_ALT
+/* #define MBEDTLS_MD5_ALT */
 
 #endif /* MBEDTLS_DEVICE_H */
mbedtls: Disable MD5, SHA1, SHA256 HW ACC for STM32F439xI

STM32F439xI-family MD5, SHA1 and SHA256 hardware acceleration
occasionally produces incorrect output (#5079).

Don't enable MD5, SHA1 and SHA256 HW acceleration on STM32F439xI-family
targets by default until issue #5079 is fixed.
