Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tests/api/test_ossl_asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@ int test_wolfSSL_ASN1_INTEGER_BN(void)
}
#if defined(WOLFSSL_QT) || defined(WOLFSSL_HAPROXY)
ExpectNotNull(bn = ASN1_INTEGER_to_BN(ai, NULL));
BN_free(bn);
bn = NULL;
#else
ExpectNull(ASN1_INTEGER_to_BN(ai, NULL));
ExpectNull(bn = ASN1_INTEGER_to_BN(ai, NULL));
#endif
BN_free(bn);
bn = NULL;

if (ai != NULL) {
ai->data[0] = 0x02; /* tag for ASN_INTEGER */
Expand All @@ -213,11 +213,11 @@ int test_wolfSSL_ASN1_INTEGER_BN(void)
#if defined(WOLFSSL_QT) || defined(WOLFSSL_HAPROXY)
/* Interpreted as a number 0x020403. */
ExpectNotNull(bn = ASN1_INTEGER_to_BN(ai, NULL));
BN_free(bn);
bn = NULL;
#else
ExpectNull(ASN1_INTEGER_to_BN(ai, NULL));
ExpectNull(bn = ASN1_INTEGER_to_BN(ai, NULL));
#endif
BN_free(bn);
bn = NULL;

if (ai != NULL) {
ai->data[0] = 0x02; /* tag for ASN_INTEGER */
Expand Down
3 changes: 3 additions & 0 deletions tests/api/test_x509.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,9 @@ static int craft_malicious_time_cert(const byte* orig, int origSz,

notBeforeLenOff = validityOff + 3; /* the 0x0D byte */
notBeforeDataEnd = notBeforeLenOff + 1 + 13; /* tag(1) was at +2, data starts at +4 */
if (notBeforeDataEnd >= origSz) {
return -1;
}

/* Build the new buffer:
* [0 .. notBeforeLenOff-1] unchanged prefix
Expand Down
Loading