Skip to content

Commit cf6c172

Browse files
authored
Merge pull request #10027 from embhorn/zd21394
Remove FIPS guards in GetASN_BitString length check
2 parents 636f0e5 + 42bbaa1 commit cf6c172

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

wolfcrypt/src/asn.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,16 +1245,13 @@ static int GetASN_Integer(const byte* input, word32 idx, int length,
12451245
*/
12461246
int GetASN_BitString(const byte* input, word32 idx, int length)
12471247
{
1248-
#if (!defined(HAVE_SELFTEST) && !defined(HAVE_FIPS)) || \
1249-
(defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION > 2))
12501248
/* Check contents consist of one or more octets. */
12511249
if (length == 0) {
12521250
#ifdef WOLFSSL_DEBUG_ASN_TEMPLATE
12531251
WOLFSSL_MSG("Zero length BIT STRING not allowed");
12541252
#endif
12551253
return ASN_PARSE_E;
12561254
}
1257-
#endif
12581255
/* Ensure unused bits value is valid range. */
12591256
if (input[idx] > 7) {
12601257
#ifdef WOLFSSL_DEBUG_ASN_TEMPLATE

0 commit comments

Comments
 (0)