bug 908617, address review comments, r=wtc
--- a/cmd/tstclnt/tstclnt.c
+++ b/cmd/tstclnt/tstclnt.c
@@ -232,16 +232,17 @@ static void PrintParameterUsage(void)
"%-20s 2: missing, old or invalid revocation data\n"
"%-20s 3: have fresh and valid revocation data, status revoked\n",
"-F", "", "", "", "", "", "", "", "", "");
fprintf(stderr, "%-20s Test -F allows 0=any (default), 1=only OCSP, 2=only CRL\n", "-M");
fprintf(stderr, "%-20s Restrict ciphers\n", "-c ciphers");
fprintf(stderr, "%-20s Print cipher values allowed for parameter -c and exit\n", "-Y");
fprintf(stderr, "%-20s Enforce using an IPv4 destination address\n", "-4");
fprintf(stderr, "%-20s Enforce using an IPv6 destination address\n", "-6");
+ fprintf(stderr, "%-20s (Options -4 and -6 cannot be combined.)\n", "");
}
static void Usage(const char *progName)
{
PrintUsageHeader(progName);
PrintParameterUsage();
exit(1);
}
@@ -988,25 +989,25 @@ int main(int argc, char **argv)
void *enumPtr = NULL;
addrInfo = PR_GetAddrInfoByName(host, PR_AF_UNSPEC,
PR_AI_ADDRCONFIG | PR_AI_NOCANONNAME);
if (!addrInfo) {
SECU_PrintError(progName, "error looking up host");
return 1;
}
- do {
+ for (;;) {
enumPtr = PR_EnumerateAddrInfo(enumPtr, addrInfo, portno, &addr);
- if (enumPtr) {
- if (addr.raw.family == PR_AF_INET && allowIPv4)
- break;
- if (addr.raw.family == PR_AF_INET6 && allowIPv6)
- break;
- }
- } while (enumPtr);
+ if (enumPtr == NULL)
+ break;
+ if (addr.raw.family == PR_AF_INET && allowIPv4)
+ break;
+ if (addr.raw.family == PR_AF_INET6 && allowIPv6)
+ break;
+ }
PR_FreeAddrInfo(addrInfo);
if (enumPtr == NULL) {
SECU_PrintError(progName, "error looking up host address");
return 1;
}
}
printHostNameAndAddr(host, &addr);
--- a/tests/ocsp/ocsp.sh
+++ b/tests/ocsp/ocsp.sh
@@ -46,16 +46,19 @@ ocsp_init()
REQF=${QADIR}/ssl/sslreq.dat
cd ${CLIENTDIR}
}
ocsp_stapling()
{
+ # Parameter -4 is used as a temporary workaround for lack of IPv6 connectivity
+ # on some build bot slaves.
+
TESTNAME="startssl valid, supports OCSP stapling"
echo "$SCRIPTNAME: $TESTNAME"
echo "tstclnt -4 -V tls1.0: -T -v -F -M 1 -O -h kuix.de -p 5143 -d . < ${REQF}"
${BINDIR}/tstclnt -4 -V tls1.0: -T -v -F -M 1 -O -h kuix.de -p 5143 -d . < ${REQF}
html_msg $? 0 "$TESTNAME"
TESTNAME="startssl revoked, supports OCSP stapling"
echo "$SCRIPTNAME: $TESTNAME"