]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
x509asn1: fix compile errors and warnings
authorjonrumsey <jrumsey@uk.ibm.com>
Thu, 5 Jan 2023 15:26:50 +0000 (15:26 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 5 Jan 2023 22:51:27 +0000 (23:51 +0100)
Various small issues when built for GSKit

Closes #10238

lib/vtls/x509asn1.c

index f74a7416ef87f42198d98d827e78f3f59ca988f8..39e4fb33bc37dec22c7c5024d6441321bfa8bb9c 100644 (file)
@@ -48,6 +48,7 @@
 #include "curl_ctype.h"
 #include "hostcheck.h"
 #include "vtls/vtls.h"
+#include "vtls/vtls_int.h"
 #include "sendf.h"
 #include "inet_pton.h"
 #include "curl_base64.h"
@@ -1313,7 +1314,8 @@ CURLcode Curl_verifyhost(struct Curl_cfilter *cf,
 
   /* Get the server IP address. */
 #ifdef ENABLE_IPV6
-  if(conn->bits.ipv6_ip && Curl_inet_pton(AF_INET6, connssl->hostname, &addr))
+  if(cf->conn->bits.ipv6_ip &&
+     Curl_inet_pton(AF_INET6, connssl->hostname, &addr))
     addrlen = sizeof(struct in6_addr);
   else
 #endif
@@ -1359,7 +1361,7 @@ CURLcode Curl_verifyhost(struct Curl_cfilter *cf,
           break;
 
         case 7: /* IP address. */
-          matched = (name.end - name.beg) == addrlen &&
+          matched = (size_t)(name.end - name.beg) == addrlen &&
             !memcmp(&addr, name.beg, addrlen);
           break;
         }