OpenSSL: fix reload of changed OCSP proof
[exim.git] / test / src / client.c
index 1cec2cb922ebf1159c7f783b17f29e695b8cb509..29712bb5e6128cf489a68048d135700495664252 100644 (file)
@@ -297,7 +297,7 @@ if (rc <= 0)
   return 0;
   }
 
-printf("SSL connection using %s\n", SSL_get_cipher (*ssl));
+/* printf("SSL connection using %s\n", SSL_get_cipher (*ssl)); */
 return 1;
 }
 
@@ -802,6 +802,8 @@ nextinput:
              }
            fflush(stdout);
            }
+           else
+             printf("Succeeded in starting TLS (with OCSP)\n");
          #endif
          }
        #endif
@@ -1179,14 +1181,30 @@ if (interface != NULL)
 #if HAVE_IPV6
 if (host_af == AF_INET6)
   {
+# ifdef HAVE_GETADDRINFO
+  struct addrinfo hints, *res;
+  memset(&hints, 0, sizeof(hints));
+  hints.ai_family = AF_INET6;
+  hints.ai_socktype = SOCK_STREAM;
+  hints.ai_flags = AI_NUMERICHOST;
+  if ((rc = getaddrinfo(address, NULL, &hints, &res)) != 0 || res == NULL)
+    {
+    printf("unable to parse \"%s\" as an IP address: %s\n", address,
+      rc == 0 ? "NULL result returned" : gai_strerror(rc));
+    exit(86);
+    }
+  memcpy(&s_in6, res->ai_addr, res->ai_addrlen);
+  freeaddrinfo(res);
+# else
   memset(&s_in6, 0, sizeof(s_in6));
   s_in6.sin6_family = AF_INET6;
-  s_in6.sin6_port = htons(port);
   if (inet_pton(host_af, address, &s_in6.sin6_addr) != 1)
     {
     printf("Unable to parse \"%s\"", address);
     exit(86);
     }
+# endif
+  s_in6.sin6_port = htons(port);
   }
 else
 #endif
@@ -1218,6 +1236,13 @@ if (rc < 0)
   exit(85);
   }
 
+#ifdef TCP_QUICKACK
+  {
+  int off = 0;
+  (void) setsockopt(srv.sock, IPPROTO_TCP, TCP_QUICKACK, US &off, sizeof(off));
+  }
+#endif
+
 printf("connected\n");
 
 
@@ -1318,7 +1343,7 @@ if (tls_on_connect)
     printf("Failed to verify certificate status\n");
 #endif
   else
-    printf("Succeeded in starting TLS\n");
+    printf("Succeeded in starting TLS%s\n", ocsp_stapling ? " (with OCSP)":"");
   }
 #endif