2013-12-18 21:27:31 +08:00
|
|
|
#***************************************************************************
|
|
|
|
# _ _ ____ _
|
|
|
|
# Project ___| | | | _ \| |
|
|
|
|
# / __| | | | |_) | |
|
|
|
|
# | (__| |_| | _ <| |___
|
|
|
|
# \___|\___/|_| \_\_____|
|
|
|
|
#
|
2022-01-10 05:28:48 +08:00
|
|
|
# Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
|
2013-12-18 21:27:31 +08:00
|
|
|
#
|
|
|
|
# This software is licensed as described in the file COPYING, which
|
|
|
|
# you should have received as part of this distribution. The terms
|
2020-11-04 21:02:01 +08:00
|
|
|
# are also available at https://curl.se/docs/copyright.html.
|
2013-12-18 21:27:31 +08:00
|
|
|
#
|
|
|
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
# copies of the Software, and permit persons to whom the Software is
|
|
|
|
# furnished to do so, under the terms of the COPYING file.
|
|
|
|
#
|
|
|
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
# KIND, either express or implied.
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: curl
|
2022-05-17 17:16:50 +08:00
|
|
|
#
|
2013-12-18 21:27:31 +08:00
|
|
|
###########################################################################
|
2007-07-24 05:46:26 +08:00
|
|
|
|
2021-01-14 15:46:11 +08:00
|
|
|
LIB_VAUTH_CFILES = \
|
|
|
|
vauth/cleartext.c \
|
|
|
|
vauth/cram.c \
|
|
|
|
vauth/digest.c \
|
|
|
|
vauth/digest_sspi.c \
|
2020-12-25 02:48:45 +08:00
|
|
|
vauth/gsasl.c \
|
2021-01-14 15:46:11 +08:00
|
|
|
vauth/krb5_gssapi.c \
|
|
|
|
vauth/krb5_sspi.c \
|
|
|
|
vauth/ntlm.c \
|
|
|
|
vauth/ntlm_sspi.c \
|
|
|
|
vauth/oauth2.c \
|
|
|
|
vauth/spnego_gssapi.c \
|
|
|
|
vauth/spnego_sspi.c \
|
2020-04-14 17:19:12 +08:00
|
|
|
vauth/vauth.c
|
2015-09-12 18:48:24 +08:00
|
|
|
|
2021-01-14 15:46:11 +08:00
|
|
|
LIB_VAUTH_HFILES = \
|
|
|
|
vauth/digest.h \
|
|
|
|
vauth/ntlm.h \
|
|
|
|
vauth/vauth.h
|
2015-09-12 18:48:24 +08:00
|
|
|
|
2021-01-14 15:46:11 +08:00
|
|
|
LIB_VTLS_CFILES = \
|
|
|
|
vtls/bearssl.c \
|
|
|
|
vtls/gskit.c \
|
|
|
|
vtls/gtls.c \
|
2022-02-04 17:44:02 +08:00
|
|
|
vtls/hostcheck.c \
|
2021-01-14 15:46:11 +08:00
|
|
|
vtls/keylog.c \
|
|
|
|
vtls/mbedtls.c \
|
|
|
|
vtls/mbedtls_threadlock.c \
|
|
|
|
vtls/nss.c \
|
|
|
|
vtls/openssl.c \
|
2020-12-13 15:55:09 +08:00
|
|
|
vtls/rustls.c \
|
2021-01-14 15:46:11 +08:00
|
|
|
vtls/schannel.c \
|
|
|
|
vtls/schannel_verify.c \
|
|
|
|
vtls/sectransp.c \
|
|
|
|
vtls/vtls.c \
|
2022-02-04 17:44:02 +08:00
|
|
|
vtls/wolfssl.c \
|
|
|
|
vtls/x509asn1.c
|
2020-01-16 15:17:04 +08:00
|
|
|
|
2021-01-14 15:46:11 +08:00
|
|
|
LIB_VTLS_HFILES = \
|
|
|
|
vtls/bearssl.h \
|
|
|
|
vtls/gskit.h \
|
|
|
|
vtls/gtls.h \
|
2022-02-04 17:44:02 +08:00
|
|
|
vtls/hostcheck.h \
|
2021-01-14 15:46:11 +08:00
|
|
|
vtls/keylog.h \
|
|
|
|
vtls/mbedtls.h \
|
|
|
|
vtls/mbedtls_threadlock.h \
|
|
|
|
vtls/nssg.h \
|
|
|
|
vtls/openssl.h \
|
2020-12-13 15:55:09 +08:00
|
|
|
vtls/rustls.h \
|
2021-01-14 15:46:11 +08:00
|
|
|
vtls/schannel.h \
|
|
|
|
vtls/sectransp.h \
|
|
|
|
vtls/vtls.h \
|
2022-11-11 18:45:34 +08:00
|
|
|
vtls/vtls_int.h \
|
2022-02-04 17:44:02 +08:00
|
|
|
vtls/wolfssl.h \
|
|
|
|
vtls/x509asn1.h
|
2013-12-18 21:25:43 +08:00
|
|
|
|
2021-01-14 15:46:11 +08:00
|
|
|
LIB_VQUIC_CFILES = \
|
2022-04-11 00:21:37 +08:00
|
|
|
vquic/msh3.c \
|
2021-01-14 15:46:11 +08:00
|
|
|
vquic/ngtcp2.c \
|
|
|
|
vquic/quiche.c \
|
|
|
|
vquic/vquic.c
|
2019-07-22 05:48:58 +08:00
|
|
|
|
2021-01-14 15:46:11 +08:00
|
|
|
LIB_VQUIC_HFILES = \
|
2022-04-11 00:21:37 +08:00
|
|
|
vquic/msh3.h \
|
2021-01-14 15:46:11 +08:00
|
|
|
vquic/ngtcp2.h \
|
|
|
|
vquic/quiche.h \
|
|
|
|
vquic/vquic.h
|
2019-07-22 05:48:58 +08:00
|
|
|
|
2021-01-14 15:46:11 +08:00
|
|
|
LIB_VSSH_CFILES = \
|
|
|
|
vssh/libssh.c \
|
|
|
|
vssh/libssh2.c \
|
|
|
|
vssh/wolfssh.c
|
2019-08-16 22:01:42 +08:00
|
|
|
|
2021-01-14 15:46:11 +08:00
|
|
|
LIB_VSSH_HFILES = \
|
|
|
|
vssh/ssh.h
|
2019-11-18 04:04:37 +08:00
|
|
|
|
2020-12-14 21:10:33 +08:00
|
|
|
LIB_CFILES = \
|
|
|
|
altsvc.c \
|
|
|
|
amigaos.c \
|
|
|
|
asyn-ares.c \
|
|
|
|
asyn-thread.c \
|
|
|
|
base64.c \
|
2021-03-23 09:02:18 +08:00
|
|
|
bufref.c \
|
2020-12-14 21:10:33 +08:00
|
|
|
c-hyper.c \
|
2022-11-11 18:45:34 +08:00
|
|
|
cfilters.c \
|
2020-12-14 21:10:33 +08:00
|
|
|
conncache.c \
|
|
|
|
connect.c \
|
|
|
|
content_encoding.c \
|
|
|
|
cookie.c \
|
|
|
|
curl_addrinfo.c \
|
|
|
|
curl_des.c \
|
|
|
|
curl_endian.c \
|
|
|
|
curl_fnmatch.c \
|
|
|
|
curl_get_line.c \
|
|
|
|
curl_gethostname.c \
|
|
|
|
curl_gssapi.c \
|
|
|
|
curl_memrchr.c \
|
|
|
|
curl_multibyte.c \
|
|
|
|
curl_ntlm_core.c \
|
|
|
|
curl_ntlm_wb.c \
|
|
|
|
curl_path.c \
|
|
|
|
curl_range.c \
|
|
|
|
curl_rtmp.c \
|
|
|
|
curl_sasl.c \
|
|
|
|
curl_sspi.c \
|
|
|
|
curl_threads.c \
|
|
|
|
dict.c \
|
|
|
|
doh.c \
|
|
|
|
dynbuf.c \
|
|
|
|
easy.c \
|
|
|
|
easygetopt.c \
|
|
|
|
easyoptions.c \
|
|
|
|
escape.c \
|
|
|
|
file.c \
|
|
|
|
fileinfo.c \
|
2022-05-25 16:09:53 +08:00
|
|
|
fopen.c \
|
2020-12-14 21:10:33 +08:00
|
|
|
formdata.c \
|
|
|
|
ftp.c \
|
|
|
|
ftplistparser.c \
|
|
|
|
getenv.c \
|
|
|
|
getinfo.c \
|
|
|
|
gopher.c \
|
2022-02-07 00:52:16 +08:00
|
|
|
h2h3.c \
|
2020-12-14 21:10:33 +08:00
|
|
|
hash.c \
|
2022-03-17 17:20:19 +08:00
|
|
|
headers.c \
|
2020-12-14 21:10:33 +08:00
|
|
|
hmac.c \
|
|
|
|
hostasyn.c \
|
|
|
|
hostip.c \
|
|
|
|
hostip4.c \
|
|
|
|
hostip6.c \
|
|
|
|
hostsyn.c \
|
|
|
|
hsts.c \
|
|
|
|
http.c \
|
|
|
|
http2.c \
|
|
|
|
http_chunks.c \
|
|
|
|
http_digest.c \
|
|
|
|
http_negotiate.c \
|
|
|
|
http_ntlm.c \
|
|
|
|
http_proxy.c \
|
http: introduce AWS HTTP v4 Signature
It is a security process for HTTP.
It doesn't seems to be standard, but it is used by some cloud providers.
Aws:
https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html
Outscale:
https://wiki.outscale.net/display/EN/Creating+a+Canonical+Request
GCP (I didn't test that this code work with GCP though):
https://cloud.google.com/storage/docs/access-control/signing-urls-manually
most of the code is in lib/http_v4_signature.c
Information require by the algorithm:
- The URL
- Current time
- some prefix that are append to some of the signature parameters.
The data extracted from the URL are: the URI, the region,
the host and the API type
example:
https://api.eu-west-2.outscale.com/api/latest/ReadNets
~~~ ~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
^ ^ ^
/ \ URI
API type region
Small description of the algorithm:
- make canonical header using content type, the host, and the date
- hash the post data
- make canonical_request using custom request, the URI,
the get data, the canonical header, the signed header
and post data hash
- hash canonical_request
- make str_to_sign using one of the prefix pass in parameter,
the date, the credential scope and the canonical_request hash
- compute hmac from date, using secret key as key.
- compute hmac from region, using above hmac as key
- compute hmac from api_type, using above hmac as key
- compute hmac from request_type, using above hmac as key
- compute hmac from str_to_sign using above hmac as key
- create Authorization header using above hmac, prefix pass in parameter,
the date, and above hash
Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
Closes #5703
2020-07-09 19:58:37 +08:00
|
|
|
http_aws_sigv4.c \
|
2020-12-14 21:10:33 +08:00
|
|
|
idn_win32.c \
|
|
|
|
if2ip.c \
|
|
|
|
imap.c \
|
|
|
|
inet_ntop.c \
|
|
|
|
inet_pton.c \
|
|
|
|
krb5.c \
|
|
|
|
ldap.c \
|
|
|
|
llist.c \
|
|
|
|
md4.c \
|
|
|
|
md5.c \
|
|
|
|
memdebug.c \
|
|
|
|
mime.c \
|
|
|
|
mprintf.c \
|
|
|
|
mqtt.c \
|
|
|
|
multi.c \
|
|
|
|
netrc.c \
|
|
|
|
nonblock.c \
|
2022-10-20 21:21:12 +08:00
|
|
|
noproxy.c \
|
2020-12-14 21:10:33 +08:00
|
|
|
openldap.c \
|
|
|
|
parsedate.c \
|
|
|
|
pingpong.c \
|
|
|
|
pop3.c \
|
|
|
|
progress.c \
|
|
|
|
psl.c \
|
|
|
|
rand.c \
|
|
|
|
rename.c \
|
|
|
|
rtsp.c \
|
|
|
|
select.c \
|
|
|
|
sendf.c \
|
|
|
|
setopt.c \
|
|
|
|
sha256.c \
|
|
|
|
share.c \
|
|
|
|
slist.c \
|
|
|
|
smb.c \
|
|
|
|
smtp.c \
|
|
|
|
socketpair.c \
|
|
|
|
socks.c \
|
|
|
|
socks_gssapi.c \
|
|
|
|
socks_sspi.c \
|
|
|
|
speedcheck.c \
|
|
|
|
splay.c \
|
|
|
|
strcase.c \
|
|
|
|
strdup.c \
|
|
|
|
strerror.c \
|
|
|
|
strtok.c \
|
|
|
|
strtoofft.c \
|
|
|
|
system_win32.c \
|
|
|
|
telnet.c \
|
|
|
|
tftp.c \
|
2020-08-29 18:54:30 +08:00
|
|
|
timediff.c \
|
2020-12-14 21:10:33 +08:00
|
|
|
timeval.c \
|
|
|
|
transfer.c \
|
|
|
|
url.c \
|
|
|
|
urlapi.c \
|
|
|
|
version.c \
|
|
|
|
version_win32.c \
|
|
|
|
warnless.c \
|
2022-09-09 21:11:14 +08:00
|
|
|
wildcard.c \
|
|
|
|
ws.c
|
2012-12-28 19:40:20 +08:00
|
|
|
|
2020-12-14 21:10:33 +08:00
|
|
|
LIB_HFILES = \
|
|
|
|
altsvc.h \
|
|
|
|
amigaos.h \
|
|
|
|
arpa_telnet.h \
|
|
|
|
asyn.h \
|
2021-03-23 09:02:18 +08:00
|
|
|
bufref.h \
|
2020-12-14 21:10:33 +08:00
|
|
|
c-hyper.h \
|
2022-11-11 18:45:34 +08:00
|
|
|
cfilters.h \
|
2020-12-14 21:10:33 +08:00
|
|
|
conncache.h \
|
|
|
|
connect.h \
|
|
|
|
content_encoding.h \
|
|
|
|
cookie.h \
|
|
|
|
curl_addrinfo.h \
|
|
|
|
curl_base64.h \
|
|
|
|
curl_ctype.h \
|
|
|
|
curl_des.h \
|
|
|
|
curl_endian.h \
|
|
|
|
curl_fnmatch.h \
|
|
|
|
curl_get_line.h \
|
|
|
|
curl_gethostname.h \
|
|
|
|
curl_gssapi.h \
|
|
|
|
curl_hmac.h \
|
|
|
|
curl_krb5.h \
|
|
|
|
curl_ldap.h \
|
|
|
|
curl_md4.h \
|
|
|
|
curl_md5.h \
|
|
|
|
curl_memory.h \
|
|
|
|
curl_memrchr.h \
|
|
|
|
curl_multibyte.h \
|
|
|
|
curl_ntlm_core.h \
|
|
|
|
curl_ntlm_wb.h \
|
|
|
|
curl_path.h \
|
|
|
|
curl_printf.h \
|
|
|
|
curl_range.h \
|
|
|
|
curl_rtmp.h \
|
|
|
|
curl_sasl.h \
|
|
|
|
curl_setup.h \
|
|
|
|
curl_setup_once.h \
|
|
|
|
curl_sha256.h \
|
|
|
|
curl_sspi.h \
|
|
|
|
curl_threads.h \
|
|
|
|
curlx.h \
|
|
|
|
dict.h \
|
|
|
|
doh.h \
|
|
|
|
dynbuf.h \
|
2022-04-05 21:46:03 +08:00
|
|
|
easy_lock.h \
|
2020-12-14 21:10:33 +08:00
|
|
|
easyif.h \
|
|
|
|
easyoptions.h \
|
|
|
|
escape.h \
|
|
|
|
file.h \
|
|
|
|
fileinfo.h \
|
2022-05-25 16:09:53 +08:00
|
|
|
fopen.h \
|
2020-12-14 21:10:33 +08:00
|
|
|
formdata.h \
|
2022-09-26 17:45:18 +08:00
|
|
|
functypes.h \
|
2020-12-14 21:10:33 +08:00
|
|
|
ftp.h \
|
|
|
|
ftplistparser.h \
|
|
|
|
getinfo.h \
|
|
|
|
gopher.h \
|
2022-02-07 00:52:16 +08:00
|
|
|
h2h3.h \
|
2020-12-14 21:10:33 +08:00
|
|
|
hash.h \
|
2022-03-17 17:20:19 +08:00
|
|
|
headers.h \
|
2020-12-14 21:10:33 +08:00
|
|
|
hostip.h \
|
|
|
|
hsts.h \
|
|
|
|
http.h \
|
|
|
|
http2.h \
|
|
|
|
http_chunks.h \
|
|
|
|
http_digest.h \
|
|
|
|
http_negotiate.h \
|
|
|
|
http_ntlm.h \
|
|
|
|
http_proxy.h \
|
http: introduce AWS HTTP v4 Signature
It is a security process for HTTP.
It doesn't seems to be standard, but it is used by some cloud providers.
Aws:
https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html
Outscale:
https://wiki.outscale.net/display/EN/Creating+a+Canonical+Request
GCP (I didn't test that this code work with GCP though):
https://cloud.google.com/storage/docs/access-control/signing-urls-manually
most of the code is in lib/http_v4_signature.c
Information require by the algorithm:
- The URL
- Current time
- some prefix that are append to some of the signature parameters.
The data extracted from the URL are: the URI, the region,
the host and the API type
example:
https://api.eu-west-2.outscale.com/api/latest/ReadNets
~~~ ~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
^ ^ ^
/ \ URI
API type region
Small description of the algorithm:
- make canonical header using content type, the host, and the date
- hash the post data
- make canonical_request using custom request, the URI,
the get data, the canonical header, the signed header
and post data hash
- hash canonical_request
- make str_to_sign using one of the prefix pass in parameter,
the date, the credential scope and the canonical_request hash
- compute hmac from date, using secret key as key.
- compute hmac from region, using above hmac as key
- compute hmac from api_type, using above hmac as key
- compute hmac from request_type, using above hmac as key
- compute hmac from str_to_sign using above hmac as key
- create Authorization header using above hmac, prefix pass in parameter,
the date, and above hash
Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
Closes #5703
2020-07-09 19:58:37 +08:00
|
|
|
http_aws_sigv4.h \
|
2020-12-14 21:10:33 +08:00
|
|
|
if2ip.h \
|
|
|
|
imap.h \
|
|
|
|
inet_ntop.h \
|
|
|
|
inet_pton.h \
|
|
|
|
llist.h \
|
|
|
|
memdebug.h \
|
|
|
|
mime.h \
|
|
|
|
mqtt.h \
|
|
|
|
multihandle.h \
|
|
|
|
multiif.h \
|
|
|
|
netrc.h \
|
|
|
|
nonblock.h \
|
2022-10-20 21:21:12 +08:00
|
|
|
noproxy.h \
|
2020-12-14 21:10:33 +08:00
|
|
|
parsedate.h \
|
|
|
|
pingpong.h \
|
|
|
|
pop3.h \
|
|
|
|
progress.h \
|
|
|
|
psl.h \
|
|
|
|
quic.h \
|
|
|
|
rand.h \
|
|
|
|
rename.h \
|
|
|
|
rtsp.h \
|
|
|
|
select.h \
|
|
|
|
sendf.h \
|
|
|
|
setopt.h \
|
|
|
|
setup-vms.h \
|
|
|
|
share.h \
|
|
|
|
sigpipe.h \
|
|
|
|
slist.h \
|
|
|
|
smb.h \
|
|
|
|
smtp.h \
|
|
|
|
sockaddr.h \
|
|
|
|
socketpair.h \
|
|
|
|
socks.h \
|
|
|
|
speedcheck.h \
|
|
|
|
splay.h \
|
|
|
|
strcase.h \
|
|
|
|
strdup.h \
|
|
|
|
strerror.h \
|
|
|
|
strtok.h \
|
|
|
|
strtoofft.h \
|
|
|
|
system_win32.h \
|
|
|
|
telnet.h \
|
|
|
|
tftp.h \
|
2020-08-29 18:54:30 +08:00
|
|
|
timediff.h \
|
2020-12-14 21:10:33 +08:00
|
|
|
timeval.h \
|
|
|
|
transfer.h \
|
|
|
|
url.h \
|
|
|
|
urlapi-int.h \
|
|
|
|
urldata.h \
|
|
|
|
version_win32.h \
|
|
|
|
warnless.h \
|
2022-09-09 21:11:14 +08:00
|
|
|
wildcard.h \
|
|
|
|
ws.h
|
2014-05-10 05:27:40 +08:00
|
|
|
|
2014-05-19 04:43:40 +08:00
|
|
|
LIB_RCFILES = libcurl.rc
|
2014-05-12 03:52:52 +08:00
|
|
|
|
2019-07-22 05:48:58 +08:00
|
|
|
CSOURCES = $(LIB_CFILES) $(LIB_VAUTH_CFILES) $(LIB_VTLS_CFILES) \
|
2019-08-16 22:01:42 +08:00
|
|
|
$(LIB_VQUIC_CFILES) $(LIB_VSSH_CFILES)
|
2019-07-22 05:48:58 +08:00
|
|
|
HHEADERS = $(LIB_HFILES) $(LIB_VAUTH_HFILES) $(LIB_VTLS_HFILES) \
|
2019-11-18 04:04:37 +08:00
|
|
|
$(LIB_VQUIC_HFILES) $(LIB_VSSH_HFILES)
|