forked from wolfSSL/wolfssl
More fixes from Jenkins testing.
This commit is contained in:
@@ -4705,7 +4705,7 @@ int wc_GetDateAsCalendarTime(const byte* date, int length, byte format,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WOLFSSL_CERT_GEN
|
#if defined(WOLFSSL_CERT_GEN) && defined(WOLFSSL_ALT_NAMES)
|
||||||
int wc_GetCertDates(Cert* cert, struct tm* before, struct tm* after)
|
int wc_GetCertDates(Cert* cert, struct tm* before, struct tm* after)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
@@ -4731,7 +4731,7 @@ int wc_GetCertDates(Cert* cert, struct tm* before, struct tm* after)
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif /* WOLFSSL_CERT_GEN */
|
#endif /* WOLFSSL_CERT_GEN && WOLFSSL_ALT_NAMES */
|
||||||
#endif /* !NO_ASN_TIME */
|
#endif /* !NO_ASN_TIME */
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1281,12 +1281,6 @@ int asn_test(void)
|
|||||||
byte format;
|
byte format;
|
||||||
int length;
|
int length;
|
||||||
const byte* datePart;
|
const byte* datePart;
|
||||||
|
|
||||||
ret = wc_GetDateInfo(dateBuf, (int)sizeof(dateBuf), &datePart, &format,
|
|
||||||
&length);
|
|
||||||
if (ret != 0)
|
|
||||||
return -1300;
|
|
||||||
|
|
||||||
#ifndef NO_ASN_TIME
|
#ifndef NO_ASN_TIME
|
||||||
struct tm time;
|
struct tm time;
|
||||||
#ifdef WORD64_AVAILABLE
|
#ifdef WORD64_AVAILABLE
|
||||||
@@ -1294,7 +1288,14 @@ int asn_test(void)
|
|||||||
#else
|
#else
|
||||||
word32 now;
|
word32 now;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ret = wc_GetDateInfo(dateBuf, (int)sizeof(dateBuf), &datePart, &format,
|
||||||
|
&length);
|
||||||
|
if (ret != 0)
|
||||||
|
return -1300;
|
||||||
|
|
||||||
|
#ifndef NO_ASN_TIME
|
||||||
/* Parameter Validation tests. */
|
/* Parameter Validation tests. */
|
||||||
if (wc_GetTime(NULL, sizeof(now)) != BAD_FUNC_ARG)
|
if (wc_GetTime(NULL, sizeof(now)) != BAD_FUNC_ARG)
|
||||||
return -1301;
|
return -1301;
|
||||||
@@ -9801,7 +9802,7 @@ int rsa_test(void)
|
|||||||
#ifdef WOLFSSL_TEST_CERT
|
#ifdef WOLFSSL_TEST_CERT
|
||||||
DecodedCert decode;
|
DecodedCert decode;
|
||||||
#endif
|
#endif
|
||||||
#ifndef NO_ASN_TIME
|
#if defined(WOLFSSL_ALT_NAMES) && !defined(NO_ASN_TIME)
|
||||||
struct tm beforeTime;
|
struct tm beforeTime;
|
||||||
struct tm afterTime;
|
struct tm afterTime;
|
||||||
#endif
|
#endif
|
||||||
@@ -9946,13 +9947,6 @@ int rsa_test(void)
|
|||||||
ERROR_OUT(-5595, exit_rsa);
|
ERROR_OUT(-5595, exit_rsa);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NO_ASN_TIME
|
|
||||||
ret = wc_GetCertDates(&myCert, &beforeTime, &afterTime);
|
|
||||||
if (ret < 0) {
|
|
||||||
ERROR_OUT(-5576, exit_rsa);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
do {
|
do {
|
||||||
#if defined(WOLFSSL_ASYNC_CRYPT)
|
#if defined(WOLFSSL_ASYNC_CRYPT)
|
||||||
@@ -9964,7 +9958,7 @@ int rsa_test(void)
|
|||||||
}
|
}
|
||||||
} while (ret == WC_PENDING_E);
|
} while (ret == WC_PENDING_E);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
ERROR_OUT(-5597, exit_rsa);
|
ERROR_OUT(-5596, exit_rsa);
|
||||||
}
|
}
|
||||||
certSz = ret;
|
certSz = ret;
|
||||||
|
|
||||||
@@ -9973,13 +9967,13 @@ int rsa_test(void)
|
|||||||
ret = ParseCert(&decode, CERT_TYPE, NO_VERIFY, 0);
|
ret = ParseCert(&decode, CERT_TYPE, NO_VERIFY, 0);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
FreeDecodedCert(&decode);
|
FreeDecodedCert(&decode);
|
||||||
ERROR_OUT(-5598, exit_rsa);
|
ERROR_OUT(-5597, exit_rsa);
|
||||||
}
|
}
|
||||||
FreeDecodedCert(&decode);
|
FreeDecodedCert(&decode);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ret = SaveDerAndPem(der, certSz, pem, FOURK_BUF, otherCertDerFile,
|
ret = SaveDerAndPem(der, certSz, pem, FOURK_BUF, otherCertDerFile,
|
||||||
otherCertPemFile, CERT_TYPE, -5599);
|
otherCertPemFile, CERT_TYPE, -5598);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
goto exit_rsa;
|
goto exit_rsa;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user