Skip to content
Snippets Groups Projects
  1. Dec 31, 2024
  2. Oct 21, 2024
  3. May 21, 2024
    • Ariadne Conill's avatar
      libfetch: remove support for FTP · 41ea8a08
      Ariadne Conill authored
      
      As discussed in #10749, I suggested that we remove FTP support to reduce possible attack surface
      as there are no Alpine mirrors which use FTP.
      
      There are also no known mirrors of any other apk-using distribution which use FTP, so I believe
      we are safe to remove support for FTP-based mirrors in apk-tools 3.
      
      Signed-off-by: default avatarAriadne Conill <ariadne@dereferenced.org>
      41ea8a08
  4. Oct 12, 2023
  5. Apr 17, 2023
  6. Dec 20, 2022
  7. Aug 03, 2021
    • Timo Teräs's avatar
      libfetch: fix http chunked mode handling · b30e94c0
      Timo Teräs authored
      Unbreak handling of base 16 in fetch_parseuint(). It is used
      only in http chunked mode handling.
      
      Fixes: "libfetch: fix range checking for http/ftp protocol parsing"
      b30e94c0
  8. Jul 26, 2021
  9. Jan 27, 2021
  10. Jan 19, 2021
    • Timo Teräs's avatar
      libfetch: fix connection pooling for proxied http/https requests · acca5cbf
      Timo Teräs authored
      The connection pooling was broken in two ways:
      
       1. The original URL was always used as the connection pool URL,
          resulting in duplicate connections to the proxy for http URLs
          (each http URL would get separate proxy connection)
      
       2. The cache_url stored was always the socket level connect URL.
          In case of HTTPS, the lookup was done done with the real URL,
          but the proxy URL was stored as the "cache URL". Thus HTTPS
          CONNECT connections were never re-used.
      
      This fixes the code with following logic:
      
       1. The cache key url is the real URL when no-proxy, or when HTTPS
          with proxy (the socket is connected to proxy, but logically it
          is connected to the real URL due to HTTP CONNECT request).
          And for HTTP with proxy, it's the proxy URL so same proxy
          connection can be reused for all requests going through it.
      
       2. fetch_connect() now gets cache key URL separately, and it always
          gets the same value as the fetch_cache_get() calls.
      acca5cbf
    • Timo Teräs's avatar
      libfetch: fix use-after-free in connection cache management · d430a989
      Timo Teräs authored
      fixes #10734
      d430a989
  11. Jan 17, 2021
  12. May 29, 2020
  13. Apr 01, 2020
  14. Jan 31, 2018
    • A. Wilcox's avatar
      libfetch: support OpenSSL · 36f5cf8e
      A. Wilcox authored
      TLS_client_method is a LibreSSL extension.
      SSLv23_client_method is generic, and doesn't mean SSL v2/v3 only.
      36f5cf8e
  15. Oct 06, 2017
  16. Oct 05, 2017
    • Timo Teräs's avatar
      libfetch: improve ssl connections · 52fd85a8
      Timo Teräs authored
      loosely based on the freebsd implementation, implement https
      connection settings to override CA, and use client certificate.
      
      new files supported in /etc/apk/:
        ca.pem   - if exists, it contains CAs acceptable for https
      	     (otherwise system wide CAs are used)
        crl.pem  - if ca.pem is used, this is the (optional) CRL for it
        cert.pem - used as client authentication certificate (+ key)
        cert.key - used as client key (can be also inside cert.pem)
      52fd85a8
    • Timo Teräs's avatar
      libfetch: remove unwanted code conditionals · 531fea4c
      Timo Teräs authored
      531fea4c
    • Timo Teräs's avatar
      libfetch: fix ssl context leak · f6860e0e
      Timo Teräs authored
      from freebsd
      f6860e0e
    • Timo Teräs's avatar
      build and use bundled libfetch natively · 86436fce
      Timo Teräs authored
      86436fce
    • Timo Teräs's avatar
      import libfetch-2.38 from NetBSD · 9dc6278c
      Timo Teräs authored
      ftp://ftp.fu-berlin.de/unix/NetBSD/packages/current-src/pkgsrc/net/libfetch/files
      
      libfetch comes (at least) in netbsd and freebsd flavors which
      differing functionality. Alpine and Arch package netbsd one,
      but it's not widely packaged across other distributions.
      
      We need NetBSD version as it does not use funopen(3) which is not
      supported in musl, and supports connection pooling.
      
      FreeBSD seems to be the orignal and better maintained version
      with support for SSL CAs, client certificate authentication,
      proxy authentication, and improved http redirect handling.
      
      So this imports NetBSD version, and future commits will pick up
      the needed improvements from FreeBSD tree.
      
      Incidentally, this also fixes #7857 and likes for good.
      9dc6278c
Loading