mirror of
https://github.com/curl/curl.git
synced 2026-08-25 23:23:31 +03:00
hsts: add support for Strict-Transport-Security
- enable in the build (configure) - header parsing - host name lookup - unit tests for the above - CI build - CURL_VERSION_HSTS bit - curl_version_info support - curl -V output - curl-config --features - CURLOPT_HSTS_CTRL - man page for CURLOPT_HSTS_CTRL - curl --hsts (sets CURLOPT_HSTS_CTRL and works with --libcurl) - man page for --hsts - save cache to disk - load cache from disk - CURLOPT_HSTS - man page for CURLOPT_HSTS - added docs/HSTS.md - fixed --version docs - adjusted curl_easy_duphandle Closes #5896
This commit is contained in:
parent
9f43b28f78
commit
7385610d0c
38 changed files with 1122 additions and 21 deletions
|
|
@ -197,6 +197,7 @@ test1620 test1621 \
|
|||
test1630 test1631 test1632 test1633 \
|
||||
\
|
||||
test1650 test1651 test1652 test1653 test1654 test1655 \
|
||||
test1660 \
|
||||
\
|
||||
test1700 test1701 test1702 \
|
||||
\
|
||||
|
|
|
|||
81
tests/data/test1660
Normal file
81
tests/data/test1660
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
unittest
|
||||
HSTS
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
<client>
|
||||
<server>
|
||||
none
|
||||
</server>
|
||||
<features>
|
||||
unittest
|
||||
HSTS
|
||||
</features>
|
||||
|
||||
<file name="log/input1660">
|
||||
# Your HSTS cache. https://curl.haxx.se/docs/hsts.html
|
||||
# This file was generated by libcurl! Edit at your own risk.
|
||||
.readfrom.example "20211001 04:47:41"
|
||||
.old.example "20161001 04:47:41"
|
||||
</file>
|
||||
|
||||
# This date is exactly "20190124 22:34:21" UTC
|
||||
<setenv>
|
||||
CURL_TIME=1548369261
|
||||
</setenv>
|
||||
<name>
|
||||
HSTS
|
||||
</name>
|
||||
<command>
|
||||
-
|
||||
</command>
|
||||
</client>
|
||||
|
||||
<verify>
|
||||
<stdout>
|
||||
readfrom.example [readfrom.example]: 1633063661 includeSubDomains
|
||||
'old.example' is not HSTS
|
||||
'readfrom.example' is not HSTS
|
||||
example.com [example.com]: 1579905261
|
||||
example.com [example.com]: 1569905261
|
||||
example.com [example.com]: 1569905261
|
||||
example.com [example.com]: 1569905261 includeSubDomains
|
||||
example.org [example.org]: 1579905261
|
||||
Input 8: error 43
|
||||
Input 9: error 43
|
||||
this.example [this.example]: 1548400797
|
||||
'this.example' is not HSTS
|
||||
Input 12: error 43
|
||||
Input 13: error 43
|
||||
Input 14: error 43
|
||||
3.example.com [example.com]: 1569905261 includeSubDomains
|
||||
3.example.com [example.com]: 1569905261 includeSubDomains
|
||||
foo.example.com [example.com]: 1569905261 includeSubDomains
|
||||
'foo.xample.com' is not HSTS
|
||||
'forexample.net' is not HSTS
|
||||
'forexample.net' is not HSTS
|
||||
'example.net' is not HSTS
|
||||
expire.example [expire.example]: 1548369268
|
||||
Number of entries: 3
|
||||
expire.example [expire.example]: 1548369268
|
||||
expire.example [expire.example]: 1548369268
|
||||
expire.example [expire.example]: 1548369268
|
||||
expire.example [expire.example]: 1548369268
|
||||
expire.example [expire.example]: 1548369268
|
||||
expire.example [expire.example]: 1548369268
|
||||
expire.example [expire.example]: 1548369268
|
||||
'expire.example' is not HSTS
|
||||
'expire.example' is not HSTS
|
||||
'expire.example' is not HSTS
|
||||
</stdout>
|
||||
<file name="log/hsts1660">
|
||||
# Your HSTS cache. https://curl.haxx.se/docs/hsts.html
|
||||
# This file was generated by libcurl! Edit at your own risk.
|
||||
.example.com "20191001 04:47:41"
|
||||
example.org "20200124 22:34:21"
|
||||
</file>
|
||||
</verify>
|
||||
</testcase>
|
||||
Loading…
Add table
Add a link
Reference in a new issue