Skip to content

Commit

Permalink
Bug 1670839 - Only build sha1-armv8.c code when USE_HW_SHA1 is define…
Browse files Browse the repository at this point in the history
…d. r=kjacobs

This matches what is done in sha256-armv8.c, and avoids inconsistency with
sha1-fast.c, which will define the same functions in the case USE_HW_SHA1
is not defined.

Differential Revision: https://phabricator.services.mozilla.com/D93303

--HG--
extra : moz-landing-system : lando
  • Loading branch information
glandium committed Oct 13, 2020
1 parent abae4f3 commit 6705b31
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/freebl/sha1-armv8.c
Expand Up @@ -2,7 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifdef __ARM_FEATURE_CRYPTO
#ifdef USE_HW_SHA1

#ifndef __ARM_FEATURE_CRYPTO
#error "Compiler option is invalid"
#endif

#ifdef FREEBL_NO_DEPEND
#include "stubs.h"
Expand Down Expand Up @@ -257,4 +261,4 @@ shaCompress(SHA_HW_t *X, const PRUint32 *inbuf)
XH(4) = e;
}

#endif /* __ARM_FEATURE_CRYPTO */
#endif /* USE_HW_SHA1 */

0 comments on commit 6705b31

Please sign in to comment.