Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions etc/db-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,11 @@
1: configuration data external
2: configuration and live data external
docdescription: See :doc:`the chapter on running DOMjudge as a shadow system<shadow>` for more information.
- name: external_contest_sources_allow_untrusted_certificates
type: bool
default_value: false
public: false
description: Whether to allow untrusted TLS certificates when reading from external contest sources.
- name: external_judgement_types
type: array_keyval
key_placeholder: ID
Expand Down
6 changes: 4 additions & 2 deletions webapp/src/Service/ExternalContestSourceService.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,11 @@ public function __construct(
'headers' => [
'User-Agent' => 'DOMjudge/' . $domjudgeVersion,
],
'verify_peer' => false,
'verify_host' => false,
];
if ($this->config->get('external_contest_sources_allow_untrusted_certificates')) {
$clientOptions['verify_host'] = false;
$clientOptions['verify_peer'] = false;
}
$this->httpClient = $httpClient->withOptions($clientOptions);
}

Expand Down