diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-11-02 23:17:01 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-11-03 16:08:48 +0100 |
commit | 2cfc4ed98347047249b8f7f91ad513a4b0b84e45 (patch) | |
tree | 6e69f05aeeb76db0a7f15f9c8314f1e983ed42e8 /tests/unit/unit1660.c | |
parent | 7385610d0c74c6a254fea5e4cd6e1d559d848c8c (diff) | |
download | curl-2cfc4ed98347047249b8f7f91ad513a4b0b84e45.tar.gz |
hsts: add read/write callbacks
- read/write callback options
- man pages for the 4 new setopts
- test 1915 verifies the callbacks
Closes #5896
Diffstat (limited to 'tests/unit/unit1660.c')
-rw-r--r-- | tests/unit/unit1660.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/unit/unit1660.c b/tests/unit/unit1660.c index 1687cafa1..28b724611 100644 --- a/tests/unit/unit1660.c +++ b/tests/unit/unit1660.c @@ -125,8 +125,11 @@ UNITTEST_START CURL *easy; if(!h) return 1; + easy = curl_easy_init(); + if(!easy) + return 1; - Curl_hsts_load(h, "log/input1660"); + Curl_hsts_loadfile(easy, h, "log/input1660"); for(i = 0; headers[i].host ; i++) { if(headers[i].hdr) { @@ -159,13 +162,9 @@ UNITTEST_START deltatime++; /* another second passed */ } - easy = curl_easy_init(); - if(easy) { - (void)Curl_hsts_save(easy, h, "log/hsts1660"); - curl_easy_cleanup(easy); - } - + (void)Curl_hsts_save(easy, h, "log/hsts1660"); Curl_hsts_cleanup(&h); + curl_easy_cleanup(easy); return unitfail; } UNITTEST_STOP |