diff --git a/apps/restconf/clixon_http_data.c b/apps/restconf/clixon_http_data.c index 4a203e7f..70204aec 100644 --- a/apps/restconf/clixon_http_data.c +++ b/apps/restconf/clixon_http_data.c @@ -333,8 +333,8 @@ api_http_data_file(clicon_handle h, fsize = ftell(f); /* Extra sanity check, had some problems with wrong file types */ if (fsz != fsize){ - clicon_debug(1, "%s Error file %s size mismatch sz:%zu vs %zu", - __FUNCTION__, filename, fsz, fsize); + clicon_debug(1, "%s Error file %s size mismatch sz:%zu vs %li", + __FUNCTION__, filename, (size_t)fsz, fsize); if (api_http_data_err(h, req, 500) < 0) /* Internal error? */ goto done; goto ok; diff --git a/lib/src/clixon_netconf_lib.c b/lib/src/clixon_netconf_lib.c index bec6142e..0fef5874 100644 --- a/lib/src/clixon_netconf_lib.c +++ b/lib/src/clixon_netconf_lib.c @@ -2085,7 +2085,7 @@ netconf_input_chunked_framing(char ch, { int retval = 0; - clicon_debug(1, "%s ch:%c(%d) state:%d size:%lu", __FUNCTION__, ch, ch, *state, *size); + clicon_debug(1, "%s ch:%c(%d) state:%d size:%zu", __FUNCTION__, ch, ch, *state, *size); switch (*state){ case 0: if (ch == '\n'){ diff --git a/test/lib.sh b/test/lib.sh index 6bb6105f..2539c766 100755 --- a/test/lib.sh +++ b/test/lib.sh @@ -105,6 +105,9 @@ else netcat= fi +# SSL serv cert common name XXX should use DNS resolve +: ${SSLCN:="localhost"} + # Options passed to curl calls # -s : silent # -S : show error @@ -1104,7 +1107,7 @@ prompt = no distinguished_name = dn req_extensions = ext [dn] -CN = www.clicon.org # localhost +CN = ${SSLCN} # localhost emailAddress = olof@hagsand.se O = Clixon L = Stockholm diff --git a/test/test_perf_restconf.sh b/test/test_perf_restconf.sh index 2dc2a9b8..294f4d75 100755 --- a/test/test_perf_restconf.sh +++ b/test/test_perf_restconf.sh @@ -151,7 +151,8 @@ cat $fdataxml >> $ftest echo -n "" >> $ftest # -i (ignore case) dont always work properly sed '//!d' $foutput > $foutput2 -mv $foutput2 $foutput +# Strip potential newlines, curl seems to leave trailing newlines on some platforms/versions +tr -d "\n\r" < $foutput2 > $foutput ret=$(diff -i $ftest $foutput) if [ $? -ne 0 ]; then diff --git a/test/test_restconf_nmap.sh b/test/test_restconf_nmap.sh index dc11ddca..151eca7e 100755 --- a/test/test_restconf_nmap.sh +++ b/test/test_restconf_nmap.sh @@ -153,7 +153,7 @@ new "nmap ssl-cert-intaddr" expectpart "$(nmap --script ssl-cert-intaddr -p 443 127.0.0.1)" 0 "443/tcp open https" new "nmap ssl-cert" -expectpart "$(nmap --script ssl-cert -p 443 127.0.0.1)" 0 "443/tcp open https" "| ssl-cert: Subject: commonName=www.clicon.org/organizationName=Clixon/countryName=SE" +expectpart "$(nmap --script ssl-cert -p 443 127.0.0.1)" 0 "443/tcp open https" "| ssl-cert: Subject: commonName=${SSLCN}/organizationName=Clixon/countryName=SE" new "nmap ssl-date" expectpart "$(nmap --script ssl-date -p 443 127.0.0.1)" 0 "443/tcp open https"