summaryrefslogtreecommitdiff
path: root/content/llcache.c
Commit message (Collapse)AuthorAgeFilesLines
* HSTS: propagate enabled state for HTTPS URLs, tooJohn-Mark Bell2024-01-201-2/+9
| | | | | | | While we have no need to transform the URL in the HTTPS case, the HSTS policy should still result in a hard failure when something is untoward (i.e. not providing the user with a way to proceed). Ensure this is so.
* Clean up print format specifier usageMichael Drake2023-06-171-1/+1
|
* Avoid integer types with platform dependent sizeDeltaVonNeumann2023-06-171-4/+4
|
* fetchers/curl: disable TLS1.0 and TLS1.1 supportJohn-Mark Bell2022-11-051-1/+1
|
* inttypes: custom format for UnixLib ssize_tJohn-Mark Bell2022-06-031-5/+5
| | | | | | | | UnixLib defines ssize_t to be a long int, which forces the corresponding format string to need to be %ld to avoid compiler warnings. Making this change uncovered a number of places where we were using the wrong format specifier entirely (namely PRIssizet where we meant PRIsizet). Fix these, too.
* hoist the Referer header generation logic up to the low level cacheVincent Sanders2021-03-251-44/+142
| | | | | | | This removes the need for the fetchers to have any interaction with the Referer header. It has not been completely removed from the fetch interface as fetch.c:fetch_set_cookie() still uses it for unverifiable cookie decision logic. (There is an anchient todo here)
* llcache: Free existing chain if we get a new oneDaniel Silverstone2020-05-241-0/+5
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* llcache: Actually pass on certificate chain properlyDaniel Silverstone2020-05-041-5/+10
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* Low level cache: Squash use of uninitialised value.Michael Drake2020-02-241-3/+2
| | | | | | | Coverity issue: CID 1419828: Memory - corruptions (UNINIT) >>> Using uninitialized value "output_length".
* llcache: Persist anything available during llcache_finaliseDaniel Silverstone2020-02-231-0/+5
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* Keep the complete certificate chain from a fetchVincent Sanders2020-02-231-195/+90
| | | | | | | | | Instead of extracting information from the X509 certificate chain in the fetcher the entire chain is propagated in Distinguished Encoding Rules (DER) format. This allows all the information contained in a certificate chain to be retained which can subsequently be presented to the user
* llcache: Reload SSL certificate data from serialised storeDaniel Silverstone2019-11-301-0/+130
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* llcache: Persist SSL certificate dataDaniel Silverstone2019-11-301-0/+117
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* llcache: Support storing SSL certificate dataDaniel Silverstone2019-11-301-3/+68
| | | | | | | In order to support persisting SSL data we first have to store it and support catching up new users. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* llcache: Avoid putting local content in the disc cache.Michael Drake2019-11-101-0/+39
|
* llcache: Split out scheme is cachable check.Michael Drake2019-11-101-27/+38
|
* llcache: URLs with data scheme are cachable.Michael Drake2019-11-101-1/+4
|
* llcache: Uncachable scheme checks don't need to be caseless.Michael Drake2019-11-091-4/+6
|
* llcache: Allow file and resource schemes to be cached.Michael Drake2019-11-091-7/+11
| | | | | This means things like the default css file and adblock css file are only loaded and parsed once.
* Improve timeout error messagingVincent Sanders2019-10-281-9/+52
|
* Reimplement handling of BAD_AUTH inside browser_windowDaniel Silverstone2019-08-061-1/+1
| | | | | | | | | | | | | We now handle authentication requests via an `about:` page which presents a nice form built into the browser window. In order to do this, we add internal navigation as a concept to the browser window and we strip the 401login support from all frontends except monkey. The 401login callback is now intended for password safe type support rather than an immediately interactive prompt. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* Excise the llcache query pathway.Daniel Silverstone2019-08-051-89/+24
| | | | | | | | In further preparation for the auth and cert queries being handled as special contents from `about:` this excises the query pathway from the llcache pretty much entirely. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* Migrate SSL certificate storage to the browser windowDaniel Silverstone2019-08-051-9/+12
| | | | | | | | | | * Fetchers now provide the certificates before headers * This is propagated all the way to the browser window * When a query occurs, we retrieve it from there and fire the query with those stored certificates. * The serial number is a bignum, store it as hex. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* llcache: Do not delete objects if they were iterator targetsDaniel Silverstone2019-08-041-1/+1
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* llcache: pass the cb_pw in query_finishedDaniel Silverstone2019-08-041-0/+1
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* Migrate query dispatch up from llcache to hlcacheDaniel Silverstone2019-08-031-37/+37
| | | | | | | | | | | | As a first step in refactoring query handling to be managed by `browser_window`, this migrates the calling of the query handler from the llcache object code up to the hlcache. In theory this may result in multiple queries happening for one object, but we mitigate multiple-responses in the llcache so all should be well. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* llcache: Ensure we preserve iteratorness when sending messagesDaniel Silverstone2019-08-021-1/+2
| | | | | | | | | In order to prevent a problem where iterating causes an abort which causes an iteration which clears the iteratorness of a user allowing it to delete itself causing a segfault, preserve the iteratorness when iterating in send_message Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* llcache: Use last_modified instead of dateDaniel Silverstone2019-08-021-2/+2
| | | | | | | | | When sending an If-Modified-Since header we should use the `last_modified` rather than the `date` property of the cached object in order to not incorrectly assume things have a modification date when they do not. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* llcache: Abort cleanly if called back during shutdownDaniel Silverstone2019-06-151-0/+7
| | | | | | | | | | In order to help us debug shutting down with active fetches, this will abort the process cleanly if we get a callback to an "active" llcache handle after the abort process has actually killed them all. This can happen with deferred fetcher aborts in the cURL fetcher. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* LLCache: validate max-age before useJohn-Mark Bell2019-06-101-1/+3
|
* LLCache: use Cache-Control parserJohn-Mark Bell2019-06-101-48/+18
|
* use jmb suggested fix to cache-control header parse errorVincent Sanders2019-06-101-7/+6
|
* fix parsing of invalid syntax max-age value Cache-control headerVincent Sanders2019-06-101-2/+8
|
* fix size_t format specifiersVincent Sanders2018-08-181-10/+12
|
* refactor llcache header processingVincent Sanders2018-08-121-115/+159
| | | | | refactor the header processing in the low level object cache to make cache control header processing more explicit.
* HSTS: make llcache update policy on 3xx responsesJohn-Mark Bell2018-04-221-0/+2
|
* HSTS: prevent llcache being niceJohn-Mark Bell2018-04-221-9/+25
| | | | | | | | If the server has defined a HSTS policy, then the user no longer gets to click-through a garbage certificate. Additionally, if the server has provided a HSTS policy, it should do TLS properly, so don't permit client-driven TLS version downgrades in that case, either.
* HSTS: teach llcache to update and enforce policy.John-Mark Bell2018-04-221-13/+126
|
* LLCache: correct typos/grammar/etc.John-Mark Bell2018-04-221-21/+21
|
* Squash remaining GCC7 -Wimplicit-fallthrough warnings.Michael Drake2017-10-231-3/+1
|
* fix time_t loggingVincent Sanders2017-09-081-1/+1
|
* Hopefully quash warning about time_t formatting on openbsdDaniel Silverstone2017-09-081-1/+1
|
* add low level cache category and use itVincent Sanders2017-09-061-76/+69
|
* Use coccinelle to change logging macro calls in c filesVincent Sanders2017-09-061-19/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done @@ expression E; @@ -LOG(E); +NSLOG(netsurf, INFO, E); @@ expression E, E1; @@ -LOG(E, E1); +NSLOG(netsurf, INFO, E, E1); @@ expression E, E1, E2; @@ -LOG(E, E1, E2); +NSLOG(netsurf, INFO, E, E1, E2); @@ expression E, E1, E2, E3; @@ -LOG(E, E1, E2, E3); +NSLOG(netsurf, INFO, E, E1, E2, E3); @@ expression E, E1, E2, E3, E4; @@ -LOG(E, E1, E2, E3, E4); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4); @@ expression E, E1, E2, E3, E4, E5; @@ -LOG(E, E1, E2, E3, E4, E5); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5); @@ expression E, E1, E2, E3, E4, E5, E6; @@ -LOG(E, E1, E2, E3, E4, E5, E6); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6); @@ expression E, E1, E2, E3, E4, E5, E6, E7; @@ -LOG(E, E1, E2, E3, E4, E5, E6, E7); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
* create netsurf inttypes header to have portable integer formatting macrosVincent Sanders2017-01-211-3/+1
|
* fix spelling in low level cache codeVincent Sanders2016-11-201-47/+47
|
* Allow certificate verification user prompt creation to return errorsVincent Sanders2016-07-311-0/+9
|
* move misc header into public APIVincent Sanders2016-05-301-1/+1
|
* create date and time to seconds since epoch processing utility functionVincent Sanders2016-04-161-29/+53
| | | | | | | currently NetSurf uses curl_getdate to convert textural date and time strings into seconds since epoch. It is betetr to move this functionality to a utility function so curl_getdate can easily be replaced if required.
* complete the rename of the gui browser tableVincent Sanders2016-04-161-4/+4
| | | | | | When the operations tables were created the browser table was renamed to miscellaneous except the actual rename patch was never applied, this fixes that situation.