Added macro that indicates presence of the time callback feature. Also added C++...
[BearSSL] / tools / client.c
index acd8512..9838857 100644 (file)
@@ -72,9 +72,11 @@ host_connect(const char *host, const char *port, int verbose)
 
                        sa = (struct sockaddr *)p->ai_addr;
                        if (sa->sa_family == AF_INET) {
-                               addr = &((struct sockaddr_in *)sa)->sin_addr;
+                               addr = &((struct sockaddr_in *)
+                                       (void *)sa)->sin_addr;
                        } else if (sa->sa_family == AF_INET6) {
-                               addr = &((struct sockaddr_in6 *)sa)->sin6_addr;
+                               addr = &((struct sockaddr_in6 *)
+                                       (void *)sa)->sin6_addr;
                        } else {
                                addr = NULL;
                        }
@@ -950,6 +952,9 @@ do_client(int argc, char *argv[])
                if ((req & REQ_AESCBC) != 0) {
                        br_ssl_engine_set_default_aes_cbc(&cc.eng);
                }
+               if ((req & REQ_AESCCM) != 0) {
+                       br_ssl_engine_set_default_aes_ccm(&cc.eng);
+               }
                if ((req & REQ_AESGCM) != 0) {
                        br_ssl_engine_set_default_aes_gcm(&cc.eng);
                }