Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pleroma pleroma
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 592
    • Issues 592
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 102
    • Merge requests 102
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Pleroma
  • pleromapleroma
  • Merge requests
  • !3661

hackney adapter helper: enable TLSv1.3

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Pierre-Louis Bonicoli requested to merge pilou/pleroma:hackney_reenable_TLSv1.3 into develop May 06, 2022
  • Overview 6
  • Commits 2
  • Changes 5

The list of TLS versions was added by 8bd2b6eb when hackney version was pinned to 1.15.2. Later hackney version was upgraded (166455c8) but the list of TLS versions wasn't removed. From the hackney point of view, this list has been replaced by the OTP defaults since 0.16.0 (734694ea4e24f267864c459a2f050e943adc6694).

It looks like the same issue already occurred before: 0cb7b0ea.

A way to test this issue (where example.com is an ActivityPub site which uses TLSv1.3 only):

$ PLEROMA_CONFIG_PATH=/path/to/config.exs pleroma start_iex
Erlang/OTP 22 [erts-10.7.2.16] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [hipe]

Erlang/OTP 22 [erts-10.7.2.16] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [hipe]

Interactive Elixir (1.10.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(pleroma@127.0.0.1)2> Pleroma.Object.Fetcher.fetch_and_contain_remote_object_from_id("https://example.com/@/Nick/")
{:error,
 {:tls_alert,
  {:protocol_version,
   'TLS client: In state hello received SERVER ALERT: Fatal - Protocol Version\n'}}}
With this patch, the output is the expected one.
iex(pleroma@127.0.0.1)3> Pleroma.Object.Fetcher.fetch_and_contain_remote_object_from_id("https://example.com/@/Nick/")
{:error,
{:ok,
 %{
   "@context" => [
     "https://www.w3.org/ns/activitystreams",
     "https://w3id.org/security/v1",
     %{
       "Emoji" => "toot:Emoji",
       "Hashtag" => "as:Hashtag",
       "atomUri" => "ostatus:atomUri",
       "conversation" => "ostatus:conversation",
       "featured" => "toot:featured",
       "focalPoint" => %{"@container" => "@list", "@id" => "toot:focalPoint"},
       "inReplyToAtomUri" => "ostatus:inReplyToAtomUri",
       "manuallyApprovesFollowers" => "as:manuallyApprovesFollowers",
       "movedTo" => "as:movedTo",
       "ostatus" => "http://ostatus.org#",
       "sensitive" => "as:sensitive",
       "toot" => "http://joinmastodon.org/ns#"
     }
   ],
   "endpoints" => %{"sharedInbox" => "https://example.com/inbox"},
   "followers" => "https://example.com/@/Nick/followers",
   "following" => nil,
   "icon" => %{
     "type" => "Image",
     "url" => "https://example.com/static/media/[...].png"
   },
   "id" => "https://example.com/@/Nick/",
   "inbox" => "https://example.com/@/Nick/inbox",
   "liked" => nil,
   "name" => "Nick",
   "outbox" => "https://example.com/@/Nick/outbox",
   "preferredUsername" => "Nick",
   "publicKey" => %{
     "id" => "https://example.com/@/Nick/#main-key",
     "owner" => "https://example.com/@/Nick/",
     "publicKeyPem" => "[...]
   },
   "summary" => "",
   "type" => "Person",
   "url" => "https://example.com/@/Nick/"
 }}
Edited May 30, 2022 by Pierre-Louis Bonicoli
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: hackney_reenable_TLSv1.3