master
1#***************************************************************************
2# _ _ ____ _
3# Project ___| | | | _ \| |
4# / __| | | | |_) | |
5# | (__| |_| | _ <| |___
6# \___|\___/|_| \_\_____|
7#
8# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
9#
10# This software is licensed as described in the file COPYING, which
11# you should have received as part of this distribution. The terms
12# are also available at https://curl.se/docs/copyright.html.
13#
14# You may opt to use, copy, modify, merge, publish, distribute and/or sell
15# copies of the Software, and permit persons to whom the Software is
16# furnished to do so, under the terms of the COPYING file.
17#
18# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19# KIND, either express or implied.
20#
21# SPDX-License-Identifier: curl
22#
23#***************************************************************************
25dnl ----------------------------------------------------
26dnl check for GnuTLS
27dnl ----------------------------------------------------
29AC_DEFUN([CURL_WITH_GNUTLS], [
30if test "x$OPT_GNUTLS" != "xno"; then
31 ssl_msg=
33 addld=""
34 addlib=""
35 gtlslib=""
36 version=""
37 addcflags=""
39 if test "x$OPT_GNUTLS" = "xyes"; then
40 dnl this is with no particular path given
41 CURL_CHECK_PKGCONFIG(gnutls)
43 if test "$PKGCONFIG" != "no"; then
44 addlib=`$PKGCONFIG --libs-only-l gnutls`
45 addld=`$PKGCONFIG --libs-only-L gnutls`
46 addcflags=`$PKGCONFIG --cflags-only-I gnutls`
47 version=`$PKGCONFIG --modversion gnutls`
48 gtlslib=`echo $addld | $SED -e 's/^-L//'`
49 else
50 dnl without pkg-config, we try libgnutls-config as that was how it
51 dnl used to be done
52 check=`libgnutls-config --version 2>/dev/null`
53 if test -n "$check"; then
54 addlib=`libgnutls-config --libs`
55 addcflags=`libgnutls-config --cflags`
56 version=`libgnutls-config --version`
57 gtlslib=`libgnutls-config --prefix`/lib$libsuff
58 fi
59 fi
60 else
61 dnl this is with a given path, first check if there is a libgnutls-config
62 dnl there and if not, make an educated guess
63 cfg=$OPT_GNUTLS/bin/libgnutls-config
64 check=`$cfg --version 2>/dev/null`
65 if test -n "$check"; then
66 addlib=`$cfg --libs`
67 addcflags=`$cfg --cflags`
68 version=`$cfg --version`
69 gtlslib=`$cfg --prefix`/lib$libsuff
70 else
71 dnl without pkg-config and libgnutls-config, we guess a lot!
72 addlib=-lgnutls
73 addld=-L$OPT_GNUTLS/lib$libsuff
74 addcflags=-I$OPT_GNUTLS/include
75 dnl we do not know
76 version=""
77 gtlslib=$OPT_GNUTLS/lib$libsuff
78 fi
79 fi
81 if test -z "$version"; then
82 dnl lots of efforts, still no go
83 version="unknown"
84 fi
86 if test -n "$addlib"; then
88 CLEANLIBS="$LIBS"
89 CLEANCPPFLAGS="$CPPFLAGS"
90 CLEANLDFLAGS="$LDFLAGS"
91 CLEANLDFLAGSPC="$LDFLAGSPC"
93 LIBS="$addlib $LIBS"
94 LDFLAGS="$LDFLAGS $addld"
95 LDFLAGSPC="$LDFLAGSPC $addld"
96 if test "$addcflags" != "-I/usr/include"; then
97 CPPFLAGS="$CPPFLAGS $addcflags"
98 fi
100 dnl this function is selected since it was introduced in 3.1.10
101 AC_CHECK_LIB(gnutls, gnutls_x509_crt_get_dn2,
102 [
103 AC_DEFINE(USE_GNUTLS, 1, [if GnuTLS is enabled])
104 GNUTLS_ENABLED=1
105 USE_GNUTLS="yes"
106 ssl_msg="GnuTLS"
107 QUIC_ENABLED=yes
108 test "gnutls" != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
109 ],
110 [
111 LIBS="$CLEANLIBS"
112 CPPFLAGS="$CLEANCPPFLAGS"
113 LDFLAGS="$CLEANLDFLAGS"
114 LDFLAGSPC="$CLEANLDFLAGSPC"
115 ])
117 if test "$USE_GNUTLS" = "yes"; then
118 AC_MSG_NOTICE([detected GnuTLS version $version])
119 check_for_ca_bundle=1
120 if test -n "$gtlslib"; then
121 dnl when shared libs were found in a path that the runtime
122 dnl linker does not search through, we need to add it to
123 dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
124 dnl due to this
125 if test "$cross_compiling" != "yes"; then
126 CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$gtlslib"
127 export CURL_LIBRARY_PATH
128 AC_MSG_NOTICE([Added $gtlslib to CURL_LIBRARY_PATH])
129 fi
130 fi
131 LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE gnutls"
132 fi
133 fi
135 test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
136fi dnl GnuTLS not disabled
138dnl
139dnl Check which crypto backend GnuTLS uses
140dnl
141if test "$GNUTLS_ENABLED" = "1"; then
142 USE_GNUTLS_NETTLE=
143 dnl First check if we can detect either crypto library via transitive linking
144 AC_CHECK_LIB(gnutls, nettle_md5_init, [ USE_GNUTLS_NETTLE=1 ])
146 dnl If not, try linking directly to both of them to see if they are available
147 if test -z "$USE_GNUTLS_NETTLE"; then
149 dnl this is with no particular path given
150 CURL_CHECK_PKGCONFIG(nettle)
152 if test "$PKGCONFIG" != "no"; then
153 addlib=`$PKGCONFIG --libs-only-l nettle`
154 addld=`$PKGCONFIG --libs-only-L nettle`
155 addcflags=`$PKGCONFIG --cflags-only-I nettle`
156 version=`$PKGCONFIG --modversion nettle`
157 gtlslib=`echo $addld | $SED -e 's/^-L//'`
159 if test -n "$addlib"; then
161 CLEANLIBS="$LIBS"
162 CLEANCPPFLAGS="$CPPFLAGS"
163 CLEANLDFLAGS="$LDFLAGS"
164 CLEANLDFLAGSPC="$LDFLAGSPC"
166 LIBS="$addlib $LIBS"
167 LDFLAGS="$LDFLAGS $addld"
168 LDFLAGSPC="$LDFLAGSPC $addld"
169 if test "$addcflags" != "-I/usr/include"; then
170 CPPFLAGS="$CPPFLAGS $addcflags"
171 fi
173 AC_CHECK_LIB(nettle, nettle_md5_init,
174 [
175 USE_GNUTLS_NETTLE=1
176 ],
177 [
178 LIBS="$CLEANLIBS"
179 CPPFLAGS="$CLEANCPPFLAGS"
180 LDFLAGS="$CLEANLDFLAGS"
181 LDFLAGSPC="$CLEANLDFLAGSPC"
182 ])
184 if test "$USE_GNUTLS_NETTLE" = "1"; then
185 if test -z "$version"; then
186 version="unknown"
187 fi
188 AC_MSG_NOTICE([detected nettle version $version])
189 fi
190 fi
191 fi
192 if test -z "$USE_GNUTLS_NETTLE"; then
193 AC_MSG_ERROR([GnuTLS found, but nettle was not found])
194 fi
195 else
196 LIBS="-lnettle $LIBS"
197 fi
199 if test "$USE_GNUTLS_NETTLE" = "1"; then
200 LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE nettle"
201 fi
203 USE_GNUTLS_HOGWEED=
204 dnl First check if we can detect either crypto library via transitive linking
205 AC_CHECK_LIB(gnutls, nettle_ed25519_sha512_sign, [ USE_GNUTLS_HOGWEED=1 ])
207 dnl If not, try linking directly to both of them to see if they are available
208 if test -z "$USE_GNUTLS_HOGWEED"; then
210 dnl this is with no particular path given
211 CURL_CHECK_PKGCONFIG(hogweed)
213 if test "$PKGCONFIG" != "no"; then
214 addlib=`$PKGCONFIG --libs-only-l hogweed`
215 addld=`$PKGCONFIG --libs-only-L hogweed`
216 addcflags=`$PKGCONFIG --cflags-only-I hogweed`
217 version=`$PKGCONFIG --modversion hogweed`
218 gtlslib=`echo $addld | $SED -e 's/^-L//'`
220 if test -n "$addlib"; then
222 CLEANLIBS="$LIBS"
223 CLEANCPPFLAGS="$CPPFLAGS"
224 CLEANLDFLAGS="$LDFLAGS"
225 CLEANLDFLAGSPC="$LDFLAGSPC"
227 LIBS="$addlib $LIBS"
228 LDFLAGS="$LDFLAGS $addld"
229 LDFLAGSPC="$LDFLAGSPC $addld"
230 if test "$addcflags" != "-I/usr/include"; then
231 CPPFLAGS="$CPPFLAGS $addcflags"
232 fi
234 AC_CHECK_LIB(hogweed, nettle_ed25519_sha512_sign,
235 [
236 USE_GNUTLS_HOGWEED=1
237 ],
238 [
239 LIBS="$CLEANLIBS"
240 CPPFLAGS="$CLEANCPPFLAGS"
241 LDFLAGS="$CLEANLDFLAGS"
242 LDFLAGSPC="$CLEANLDFLAGSPC"
243 ])
245 if test "$USE_GNUTLS_HOGWEED" = "1"; then
246 if test -z "$version"; then
247 version="unknown"
248 fi
249 AC_MSG_NOTICE([detected hogweed version $version])
250 fi
251 fi
252 fi
253 if test -z "$USE_GNUTLS_HOGWEED"; then
254 AC_MSG_ERROR([GnuTLS found, but hogweed was not found])
255 fi
256 else
257 LIBS="-lhogweed $LIBS"
258 fi
260 if test "$USE_GNUTLS_HOGWEED" = "1"; then
261 LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE hogweed"
262 fi
263fi
264])
Diagnostics4 git calls · 31 ms
CallStatusSizeTime031 ms
discover200152 B2 ms
git.upload-pack discover http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=3 git.response.bytes=152 git.server.agent=gitty/1.0 git.server.object_format=sha1 git.server.caps=agent ls-refs fetch object-format git.server.fetch=shallow filter sideband-all git.protocol.version=2 git.pkt.frames=8 git.pkt.data=6 git.pkt.flush=2 git.pkt.delim=0 git.pkt.bytes=152 git.pkt.payload.max=34
ls-refs200149 B · hit2 ms
git.upload-pack ls-refs http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=2 git.response.bytes=149 git.response.cache=HIT git.response.duration_ms=2 git.protocol.version=2 git.pkt.frames=3 git.pkt.data=2 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=149 git.pkt.payload.max=78 git.ls_refs.count=2 git.ls_refs.head=refs/heads/master
fetchblob:none · deepen 10200287 KiB · hit3 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=26 git.response.bytes=293470 git.response.cache=HIT git.response.duration_ms=3 git.fetch.filter=blob:none git.fetch.filter.requested=tree:0 git.fetch.filter.fallback=blob:none git.fetch.filter.learned=false git.fetch.wants=31c911efe5652725e930f4d2e60c9060e5f6646d git.fetch.haves.count=0 git.fetch.deepen=10 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=10 git.pkt.data=8 git.pkt.flush=1 git.pkt.delim=1 git.pkt.bytes=293470 git.pkt.payload.max=65516 git.sideband.band1.bytes=293354 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=87 git.pack.bytes=293354 git.pack.ofs_delta=0 git.pack.ref_delta=1 git.pack.chain.max=1 git.pack.trailer=6a646bcda6740bab42e321b51998b52ea15146c0 git.pack.full=86Open pack map
fetch2002.3 KiB · hit26 ms
git.upload-pack fetch http.response.status_code=200 git.response.bytes=2379 git.response.cache=HIT git.response.duration_ms=26 git.fetch.wants=59012a1ab5d982617c1cfb7cb4959e17004a9f80 git.fetch.haves.count=0 git.fetch.deepen=0 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=3 git.pkt.data=2 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=2379 git.pkt.payload.max=2358 git.sideband.band1.bytes=2357 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0
Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.
- Remote
- https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/curl.git
- Ref
- refs/heads/master
- Commit
- 31c911efe5652725e930f4d2e60c9060e5f6646d
- cf-ray
- a5e3716e5deb22ce
- Request
- 97b042fc…
- Protocol
- v2 · sha1
- Agent
- gitty/1.0
- Filter
- advertised
- Fetch
- shallow filter sideband-all
- Capabilities
- agent ls-refs fetch object-format