aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Class/CommonState.hs
diff options
context:
space:
mode:
authorCédric Couralet <cedric.couralet@gmail.com>2020-04-13 23:58:42 +0200
committerGitHub <noreply@github.com>2020-04-13 14:58:42 -0700
commit34775b4128de2801e4d127064f012501ca18d208 (patch)
tree7e88716b3404b5d91839979fe8d882b1dbed7ca5 /src/Text/Pandoc/Class/CommonState.hs
parent21b1358a52d2825dbfa825ae06e7b15d022cc12c (diff)
downloadpandoc-34775b4128de2801e4d127064f012501ca18d208.tar.gz
Add an option to disable certificate validation (#6156)
This commit adds the option `--no-check-certificate`, which disables certificate checking when resources are fetched by HTTP. Co-authored-by: Cécile Chemin <cecile.chemin@insee.fr> Co-authored-by: Juliette Fourcot <juliette.fourcot@insee.fr>
Diffstat (limited to 'src/Text/Pandoc/Class/CommonState.hs')
-rw-r--r--src/Text/Pandoc/Class/CommonState.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Class/CommonState.hs b/src/Text/Pandoc/Class/CommonState.hs
index 4a0f66859..7e1735c2b 100644
--- a/src/Text/Pandoc/Class/CommonState.hs
+++ b/src/Text/Pandoc/Class/CommonState.hs
@@ -37,6 +37,8 @@ data CommonState = CommonState
-- ^ Absolute URL + dir of 1st source file
, stRequestHeaders :: [(Text, Text)]
-- ^ Headers to add for HTTP requests
+ , stNoCheckCertificate :: Bool
+ -- ^ Controls whether certificate validation is disabled
, stMediaBag :: MediaBag
-- ^ Media parsed from binary containers
, stTranslations :: Maybe (Lang, Maybe Translations)
@@ -67,6 +69,7 @@ defaultCommonState = CommonState
, stUserDataDir = Nothing
, stSourceURL = Nothing
, stRequestHeaders = []
+ , stNoCheckCertificate = False
, stMediaBag = mempty
, stTranslations = Nothing
, stInputFiles = []