Documentation ¶
Overview ¶
Package installer contains routines used for installing and or updating Tor Browser.
Index ¶
- Variables
- func DownloadsURL(cfg *config.Config, useOnion bool) string
- func ExtractBundle(destDir string, bundleTarXz []byte, cancelCh chan interface{}) error
- func UpdateURL(manif *config.Manifest, useOnion bool) (string, error)
- func ValidatePGPSignature(bundle, signature []byte) error
- func VerifyTorBrowserMAR(mar []byte) error
- type DownloadsEntry
- type Patch
- type UpdateEntry
Constants ¶
This section is empty.
Variables ¶
var ErrExtractionCanceled = errors.New("tar extraction canceled")
ErrExtractionCanceled is the error returned when the untar operation was canceled.
var StaticHPKPPins *hpkp.MemStorage
StaticHPKPPins is the backing store containing static HPKP pins for install/update related hosts.
Functions ¶
func DownloadsURL ¶
DownloadsURL returns the `downloads.json` URL for the configured channel.
func ExtractBundle ¶
ExtractBundle extracts the supplied tar.xz archive into destDir. Any writes to cancelCh will abort the extraction.
func ValidatePGPSignature ¶
ValidatePGPSignature validates the bundle and signature pair against the TBB key ring.
func VerifyTorBrowserMAR ¶
VerifyTorBrowserMAR validates the MAR signature against the TBB MAR signing keys.
Types ¶
type DownloadsEntry ¶
type DownloadsEntry struct { // Sig is the URL to the PGP signature of the Binary. Sig string // Binary is the URL to the tar.xz bundle. Binary string }
DownloadsEntry is a bundle download entry.
func GetDownloadsEntry ¶
GetDownloadsEntry parses the json file and returns the Version and appropriate DownloadsEntry for the current configuration.
type Patch ¶
type Patch struct { Url string `xml:"URL,attr"` HashFunction string `xml:"hashFunction,attr"` HashValue string `xml:"hashValue,attr"` Size int `xml:"size,attr"` Type string `xml:"type,attr"` }
Patch is an update patch.
type UpdateEntry ¶
type UpdateEntry struct { Type string `xml:"type,attr"` DisplayVersion string `xml:"displayVersion,attr"` AppVersion string `xml:"appVersion,attr"` PlatformVersion string `xml:"platformVersion,attr"` BuildID string `xml:"buildID,attr"` DetailsURL string `xml:"detailsURL,attr"` Actions string `xml:"actions,attr"` OpenURL string `xml:"openURL,attr"` Patch []Patch `xml:"patch"` }
UpdateEntry is a MAR update entry.
func GetUpdateEntry ¶
func GetUpdateEntry(b []byte) (*UpdateEntry, error)
GetUpdateEntry parses the xml file and returns the UpdateEntry if any.