NetSurf
strict-transport-security.h
Go to the documentation of this file.
1/*
2 * Copyright 2018 John-Mark Bell <jmb@netsurf-browser.org>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef NETSURF_UTILS_HTTP_STRICT_TRANSPORT_SECURITY_H_
20#define NETSURF_UTILS_HTTP_STRICT_TRANSPORT_SECURITY_H_
21
22#include <libwapcaplet/libwapcaplet.h>
23
25
26/**
27 * Parse an HTTP Strict-Transport-Security header value
28 *
29 * \param header_value Header value to parse
30 * \param result Pointer to location to receive result
31 * \return NSERROR_OK on success,
32 * NSERROR_NOMEM on memory exhaustion,
33 * appropriate error otherwise
34 */
35nserror http_parse_strict_transport_security(const char *header_value,
37
38/**
39 * Destroy a strict transport security object
40 *
41 * \param victim Object to destroy
42 */
45
46/**
47 * Get the value of a strict transport security's max-age
48 *
49 * \param sts Object to inspect
50 * \return Max age, in delta-seconds
51 */
54
55/**
56 * Get the value of a strict transport security's includeSubDomains flag
57 *
58 * \param sts Object to inspect
59 * \return Whether subdomains should be included
60 */
63
64#endif
STATIC char result[100]
Definition: arexx.c:77
nserror
Enumeration of error codes.
Definition: errors.h:29
nserror http_parse_strict_transport_security(const char *header_value, http_strict_transport_security **result)
Parse an HTTP Strict-Transport-Security header value.
void http_strict_transport_security_destroy(http_strict_transport_security *victim)
Destroy a strict transport security object.
bool http_strict_transport_security_include_subdomains(http_strict_transport_security *sts)
Get the value of a strict transport security's includeSubDomains flag.
uint32_t http_strict_transport_security_max_age(http_strict_transport_security *sts)
Get the value of a strict transport security's max-age.
Representation of a Strict-Transport-Security.