• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:hsts

21  * SPDX-License-Identifier: curl
27 #include "hsts.h"
44 return 0; /* nothing to do when HTTP or HSTS are disabled */
51 const char *chost; /* if non-NULL, use to lookup with */
58 { "-", "readfrom.example", NULL, CURLE_OK},
59 { "-", "old.example", NULL, CURLE_OK},
61 { "readfrom.example", NULL, "max-age=\"0\"", CURLE_OK},
63 { "example.com", NULL, "max-age=\"31536000\"\r\n", CURLE_OK },
64 { "example.com", NULL, "max-age=\"21536000\"\r\n", CURLE_OK },
65 { "example.com", NULL, "max-age=\"21536000\"; \r\n", CURLE_OK },
66 { "example.com", NULL, "max-age=\"21536000\"; includeSubDomains\r\n",
68 { "example.org", NULL, "max-age=\"31536000\"\r\n", CURLE_OK },
70 { "this.example", NULL, "max-age=\"31536", CURLE_BAD_FUNCTION_ARGUMENT },
71 { "this.example", NULL, "max-age=31536\"", CURLE_OK },
72 /* max-age=0 removes the entry */
73 { "this.example", NULL, "max-age=0", CURLE_OK },
77 /* Two max-age is illegal */
79 "max-age=\"21536000\"; includeSubDomains; max-age=\"3\";",
83 "max-age=\"21536000\"; includeSubDomains; includeSubDomains;",
86 { "3.example.com", NULL, "max-age=\"21536000\"; include; includeSubDomains;",
89 { "3.example.com", NULL, "max-age=\"0\"; includeSubDomains;",
91 { "-", "foo.example.com", NULL, CURLE_OK},
92 { "-", "foo.xample.com", NULL, CURLE_OK},
95 { "example.net", "forexample.net", "max-age=\"31536000\"\r\n", CURLE_OK },
100 "max-age=\"31536000\"; includeSubDomains\r\n", CURLE_OK },
102 { "example.net", NULL, "max-age=\"0\"; includeSubDomains\r\n", CURLE_OK },
105 { "expire.example", NULL, "max-age=\"7\"\r\n", CURLE_OK },
112 printf("'%s' is not HSTS\n", chost);
115 chost, e->host, e->expires,
116 e->includeSubDomains ? " includeSubDomains" : "");
124 struct hsts *h = Curl_hsts_init();
162 printf("Number of entries: %zu\n", h->list.size);