Skip to content
Commits on Source (23)
image: registry.gitlab.gnome.org/gnome/glib-networking/master:v19
include:
- remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/c5626190ec14b475271288dda7a7dae8dbe0cd76/templates/fedora.yml'
variables:
FDO_UPSTREAM_REPO: GNOME/glib-networking
stages:
- prepare
- build
.fedora.container.common:
variables:
FDO_DISTRIBUTION_TAG: '2022-08-05.3'
FDO_DISTRIBUTION_VERSION: 'latest'
build.container.fedora@x86_64:
extends:
- '.fdo.container-build@fedora'
- '.fedora.container.common'
stage: prepare
variables:
GIT_STRATEGY: none
FDO_EXPIRES_AFTER: 8w
FDO_DISTRIBUTION_PACKAGES: >-
ca-certificates
clang-analyzer
gcc
gettext
git
lcov
libasan
meson
pkgconfig(gnutls)
pkgconfig(gsettings-desktop-schemas)
pkgconfig(libproxy-1.0)
pkgconfig(openssl)
pkgconfig(p11-kit-1)
FDO_DISTRIBUTION_EXEC: >-
git clone --depth=1 https://gitlab.gnome.org/GNOME/glib.git &&
pushd glib &&
meson _build --prefix=/usr &&
meson install -C _build &&
popd &&
rm -rf glib
fedora-x86_64:
extends:
- '.fdo.distribution-image@fedora'
- '.fedora.container.common'
stage: build
variables:
# Remove for PKCS11 logs, otherwise generates a lot of noise hitting gitlab's limit
PKCS11SPY_PATH: disabled
script:
- cp .gitlab-ci/lcovrc ~/.lcovrc
- meson --prefix=$HOME/glib-networking-installed
-Db_coverage=true
-Dgnutls=enabled
-Dopenssl=enabled
-Dlibproxy=enabled
-Dgnome_proxy=enabled
-Dwerror=true
_build/
- meson setup --prefix=$HOME/glib-networking-installed
-Db_coverage=true
-Dgnutls=enabled
-Dopenssl=enabled
-Denvironment_proxy=enabled
-Dlibproxy=enabled
-Dgnome_proxy=enabled
-Ddebug_logs=true
-Dwerror=true
_build/
- meson compile -C _build/
- meson test -v -C _build/ --repeat=1000
- meson test -v -C _build/ --repeat=10
- meson install -C _build/
- ninja -C _build coverage-html
- ninja -C _build/ coverage-html
artifacts:
paths:
- _build/test-results
......@@ -27,6 +75,9 @@ fedora-x86_64:
coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
fedora-x86_64-asan:
extends:
- '.fdo.distribution-image@fedora'
- '.fedora.container.common'
tags: [ asan ]
stage: build
variables:
......@@ -37,7 +88,9 @@ fedora-x86_64-asan:
-Dgnutls=enabled
-Dopenssl=enabled
-Dlibproxy=enabled
-Denvironment_proxy=enabled
-Dgnome_proxy=enabled
-Ddebug_logs=true
-Dwerror=true
_build/
- meson compile -C _build/
......@@ -48,12 +101,17 @@ fedora-x86_64-asan:
when: on_failure
fedora-x86_64-scan-build:
extends:
- '.fdo.distribution-image@fedora'
- '.fedora.container.common'
stage: build
script:
- meson -Dgnutls=enabled
-Dopenssl=enabled
-Denvironment_proxy=enabled
-Dlibproxy=enabled
-Dgnome_proxy=enabled
-Ddebug_logs=true
-Dwerror=true
_build/
- scan-build meson compile -C _build/
......@@ -63,15 +121,16 @@ fedora-x86_64-scan-build:
- _build/meson-logs/scanbuild
when: on_failure
vs2017-x64:
stage: build
except:
- tags
tags:
- win32-ps
script:
- .gitlab-ci/test-msvc.bat
artifacts:
paths:
- build/test-results
when: on_failure
# FIXME: Windows CI needs GLib 2.73.3
#vs2017-x64:
# stage: build
# except:
# - tags
# tags:
# - win32-ps
# script:
# - .gitlab-ci/test-msvc.bat
# artifacts:
# paths:
# - build/test-results
# when: on_failure
FROM fedora:latest
RUN dnf update -y \
&& dnf install -y 'dnf-command(builddep)' \
&& dnf builddep -y glib-networking glib2 \
&& dnf install -y clang-analyzer \
lcov \
libasan \
openssl-devel \
git \
opensc \
&& dnf clean all \
&& git clone https://gitlab.gnome.org/GNOME/glib.git \
&& pushd glib \
&& meson _build --prefix=/usr \
&& meson install -C _build \
&& popd \
&& rm -rf glib
ARG HOST_USER_ID=5555
ENV HOST_USER_ID ${HOST_USER_ID}
RUN useradd -u $HOST_USER_ID -ms /bin/bash user
USER user
WORKDIR /home/user
ENV LANG C.UTF-8
# CI support stuff
## Docker image
GitLab CI jobs run in a Docker image, defined here. To update that image
(perhaps to install some more packages):
1. Edit `.gitlab-ci/Dockerfile` with the changes you want
2. Edit `.gitlab-ci/run-docker.sh` and bump the version in `TAG`
3. Run `.gitlab-ci/run-docker.sh` to build the new image, and launch a shell
inside it
* When you're done, exit the shell in the usual way
4. Run `.gitlab-ci/run-docker.sh --push` to upload the new image to the GNOME
GitLab Docker registry
* If this is the first time you're doing this, you'll need to log into the
registry
* If you use 2-factor authentication on your GNOME GitLab account, you'll
need to [create a personal access token][pat] and use that rather than
your normal password
5. Edit `.gitlab-ci.yml` (in the root of this repository) to use your new
image
[pat]: https://gitlab.gnome.org/profile/personal_access_tokens
#!/bin/bash
set -e
TAG="registry.gitlab.gnome.org/gnome/glib-networking/master:v19"
cd "$(dirname "$0")"
podman pull registry.fedoraproject.org/fedora:latest
podman build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" --file "Dockerfile" --format=docker .
if [ "$1" = "--push" ]; then
podman login registry.gitlab.gnome.org
podman push $TAG
else
podman run --rm \
--volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
--tty --interactive "${TAG}" bash
fi
......@@ -26,8 +26,9 @@ set INCLUDE=%DEPS_DIR%\include;%DEPS_DIR%\include\glib-2.0;%INCLUDE%
set PKG_CONFIG_PATH=%DEPS_DIR%\lib\pkgconfig
:: FIXME: make warnings fatal
:: FIXME: Environment proxy ought to work on Windows: https://gitlab.gnome.org/GNOME/glib-networking/-/issues/185
pip3 install --upgrade --user meson==0.60.0 || goto :error
meson build -Dgnutls=disabled -Dopenssl=enabled || goto :error
meson build -Dgnutls=disabled -Dopenssl=enabled -Denvironment_proxy=disabled -Ddebug_logs=true || goto :error
ninja -C build || goto :error
meson test -C build --timeout-multiplier=10 || goto :error
......
2.72.2 - August 5, 2022
=======================
2.74.beta - August 5, 2022
==========================
- Drop environment proxy resolver to lowest priority (#190)
- Expose implementation of G_TLS_CHANNEL_BINDING_EXPORTER (#191)
- Add build option for environment proxy resolver (!217)
2.74.alpha - July 7, 2022
=========================
- Add build option for toggling debug logging (#188)
- Move gettext() usage out of hot paths (#188)
- Fix tests build when using openssl (!211, Nirbheek Chauhan)
- Properly free libproxy lookup results and require libproxy 0.4.16 (!212)
- Add additional validation for proxy lookup results (!212)
- Allow using static libraries via meson subprojects (!213, Olivier Crête)
- Updated translations
2.72.1 - June 29, 2022
======================
......
project(
'glib-networking', 'c',
version: '2.72.2',
version: '2.74.beta',
license: 'LGPL2.1+',
meson_version: '>= 0.50.0',
meson_version: '>= 0.54.0',
default_options: ['c_std=gnu99']
)
......@@ -21,6 +21,7 @@ host_system = host_machine.system()
config_h = configuration_data()
config_h.set_quoted('GETTEXT_PACKAGE', meson.project_name())
config_h.set10('ENABLE_DEBUG_LOGS', get_option('debug_logs'))
# compiler flags
common_flags = [
......@@ -48,7 +49,7 @@ if host_system.contains('linux') or host_system == 'android'
endif
# *** Check GLib GIO ***
glib_dep = dependency('glib-2.0', version: '>= 2.69.0',
glib_dep = dependency('glib-2.0', version: '>= 2.73.3',
fallback: ['glib', 'libglib_dep'])
gio_dep = dependency('gio-2.0',
fallback: ['glib', 'libgio_dep'])
......@@ -68,7 +69,11 @@ endif
assert(gio_module_dir != '', 'GIO_MODULE_DIR is missing from gio-2.0.pc')
# *** Checks for LibProxy ***
libproxy_dep = dependency('libproxy-1.0', version: '>= 0.3.1', required: get_option('libproxy'))
libproxy_dep = dependency('libproxy-1.0', version: '>= 0.4.16', required: get_option('libproxy'))
# *** Checks for environment proxy ***
environment_proxy_option = get_option('environment_proxy')
environment_proxy_enabled = environment_proxy_option.enabled() or (environment_proxy_option.auto() and not libproxy_dep.found())
# *** Checks for GNOME ***
gsettings_desktop_schemas_dep = dependency('gsettings-desktop-schemas', required: get_option('gnome_proxy'))
......@@ -80,7 +85,7 @@ have_rtld_noload = cc.has_header_symbol('dlfcn.h', 'RTLD_NOLOAD')
config_h.set('HAVE_RTLD_NOLOAD', have_rtld_noload)
# *** Checks for GnuTLS ***
gnutls_dep = dependency('gnutls', version: '>= 3.6.5', required: get_option('gnutls'))
gnutls_dep = dependency('gnutls', version: '>= 3.7.4', required: get_option('gnutls'))
if gnutls_dep.found()
backends += ['gnutls']
......@@ -147,8 +152,9 @@ if gio_querymodules.found()
endif
output = '\n\n'
output += ' gnutls support: ' + backends.contains('gnutls').to_string() + '\n'
output += ' openssl support: ' + backends.contains('openssl').to_string() + '\n'
output += ' libproxy support: ' + libproxy_dep.found().to_string() + '\n'
output += ' GNOME proxy support: ' + gsettings_desktop_schemas_dep.found().to_string() + '\n'
output += ' GnuTLS support: ' + backends.contains('gnutls').to_string() + '\n'
output += ' OpenSSL support: ' + backends.contains('openssl').to_string() + '\n'
output += ' environment proxy support: ' + environment_proxy_enabled.to_string() + '\n'
output += ' libproxy support: ' + libproxy_dep.found().to_string() + '\n'
output += ' GNOME proxy support: ' + gsettings_desktop_schemas_dep.found().to_string() + '\n'
message(output)
# The OpenSSL backend is provided for systems where licensing considerations
# prohibit use of certain dependencies of GnuTLS. General-purpose Linux distros
# should leave it disabled. Please don't second-guess our defaults.
#
# The environment variable proxy backend is intended for use if you are building
# without libproxy.
option('gnutls', type: 'feature', value: 'auto', description: 'support for GnuTLS networking configration')
option('openssl', type: 'feature', value: 'disabled', description: 'support for OpenSSL networking configration')
option('environment_proxy', type: 'feature', value: 'auto', description: 'support for environment variable proxy configuration')
option('libproxy', type: 'feature', value: 'auto', description: 'support for libproxy proxy configration')
option('gnome_proxy', type: 'feature', value: 'auto', description: 'support for GNOME desktop proxy configuration')
option('installed_tests', type: 'boolean', value: false, description: 'enable installed tests')
option('static_modules', type: 'boolean', value: false, description: 'build static modules')
option('debug_logs', type: 'boolean', value: false, description: 'enable debug log messages (slow)')
ab
an
ar
as
......@@ -31,6 +32,7 @@ hu
id
it
ja
ka
kk
km
kn
......
# Copyright (C) 2022 The Abkhazian language development fund named after Bagrat Shinkuba
# This file is distributed under the same license as the glib-networking package.
# Нанба Наала <naala-nanba@rambler.ru>, 2022.
#
msgid ""
msgstr ""
"Project-Id-Version: glib-networking\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/glib-networking/issues\n"
"POT-Creation-Date: 2022-07-07 14:23+0000\n"
"PO-Revision-Date: 2022-07-22 16:00+0000\n"
"Last-Translator: Нанба Наала <naala-nanba@rambler.ru>\n"
"Language-Team: Abkhazian <LL@li.org>\n"
"Language: ab\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: proxy/libproxy/glibproxyresolver.c:158
msgid "Proxy resolver internal error."
msgstr ""
#: tls/base/gtlsconnection-base.c:562 tls/base/gtlsinputstream.c:78
#: tls/base/gtlsinputstream.c:141 tls/base/gtlsoutputstream.c:78
#: tls/base/gtlsoutputstream.c:143
msgid "Connection is closed"
msgstr ""
#. Cannot perform a blocking operation during a handshake on the
#. * same thread that triggered the handshake. The only way this can
#. * occur is if the application is doing something weird in its
#. * accept-certificate callback. Allowing a blocking op would stall
#. * the handshake (forever, if there's no timeout). Even a close
#. * op would deadlock here.
#.
#: tls/base/gtlsconnection-base.c:636
msgid "Cannot perform blocking operation during TLS handshake"
msgstr ""
#: tls/base/gtlsconnection-base.c:701 tls/base/gtlsconnection-base.c:1249
#: tls/openssl/gtlsconnection-openssl.c:358
msgid "Socket I/O timed out"
msgstr ""
#: tls/base/gtlsconnection-base.c:875
msgid "Server required TLS certificate"
msgstr ""
#: tls/base/gtlsconnection-base.c:1454
#, c-format
msgid "Handshake is not finished, no channel binding information yet"
msgstr ""
#: tls/base/gtlsconnection-base.c:1533
msgid "Peer does not support safe renegotiation"
msgstr ""
#: tls/base/gtlsconnection-base.c:1681 tls/gnutls/gtlsconnection-gnutls.c:491
#: tls/openssl/gtlsconnection-openssl.c:209
#: tls/openssl/gtlsconnection-openssl.c:839
#, c-format
msgid "Unacceptable TLS certificate"
msgstr ""
#: tls/base/gtlsconnection-base.c:2153
#, c-format
msgid "Receive flags are not supported"
msgstr ""
#: tls/base/gtlsconnection-base.c:2300
#, c-format
msgid "Send flags are not supported"
msgstr ""
#: tls/gnutls/gtlscertificate-gnutls.c:361
#: tls/openssl/gtlscertificate-openssl.c:363
#, c-format
msgid "Could not parse DER certificate: %s"
msgstr ""
#: tls/gnutls/gtlscertificate-gnutls.c:382
#: tls/openssl/gtlscertificate-openssl.c:384
#, c-format
msgid "Could not parse PEM certificate: %s"
msgstr ""
#: tls/gnutls/gtlscertificate-gnutls.c:405
#: tls/openssl/gtlscertificate-openssl.c:404
#, c-format
msgid "Could not parse DER private key: %s"
msgstr ""
#: tls/gnutls/gtlscertificate-gnutls.c:428
#: tls/openssl/gtlscertificate-openssl.c:424
#, c-format
msgid "Could not parse PEM private key: %s"
msgstr ""
#: tls/gnutls/gtlscertificate-gnutls.c:455
#, c-format
msgid "Could not import PKCS #11 certificate URI: %s"
msgstr ""
#: tls/gnutls/gtlscertificate-gnutls.c:497
#: tls/openssl/gtlscertificate-openssl.c:459
msgid "No certificate data provided"
msgstr ""
#: tls/gnutls/gtlscertificate-gnutls.c:807
#: tls/gnutls/gtlsconnection-gnutls.c:1058
#, c-format
msgid "Cannot verify peer identity of unexpected type %s"
msgstr ""
#: tls/gnutls/gtlsconnection-gnutls.c:204
msgid "Could not create TLS connection:"
msgstr ""
#: tls/gnutls/gtlsconnection-gnutls.c:214
#: tls/gnutls/gtlsconnection-gnutls.c:234
#: tls/openssl/gtlsclientconnection-openssl.c:512
#: tls/openssl/gtlsserverconnection-openssl.c:456
#, c-format
msgid "Could not create TLS connection: %s"
msgstr ""
#: tls/gnutls/gtlsconnection-gnutls.c:435
#: tls/gnutls/gtlsconnection-gnutls.c:446
#: tls/gnutls/gtlsconnection-gnutls.c:460
#: tls/openssl/gtlsconnection-openssl.c:176
#, c-format
msgid "Peer failed to perform TLS handshake: %s"
msgstr ""
#: tls/gnutls/gtlsconnection-gnutls.c:468
msgid "TLS connection closed unexpectedly"
msgstr ""
#: tls/gnutls/gtlsconnection-gnutls.c:483
#: tls/openssl/gtlsconnection-openssl.c:201
msgid "TLS connection peer did not send a certificate"
msgstr ""
#: tls/gnutls/gtlsconnection-gnutls.c:499
#, c-format
msgid "Peer sent fatal TLS alert: %s"
msgstr ""
#: tls/gnutls/gtlsconnection-gnutls.c:509
msgid "Protocol version downgrade attack detected"
msgstr ""
#: tls/gnutls/gtlsconnection-gnutls.c:518
#, c-format
msgid "Message is too large for DTLS connection; maximum is %u byte"
msgid_plural "Message is too large for DTLS connection; maximum is %u bytes"
msgstr[0] ""
msgstr[1] ""
#: tls/gnutls/gtlsconnection-gnutls.c:527
msgid "The operation timed out"
msgstr ""
#: tls/gnutls/gtlsconnection-gnutls.c:879
#, c-format
msgid "Error performing TLS handshake: %s"
msgstr ""
#: tls/gnutls/gtlsconnection-gnutls.c:982
#: tls/openssl/gtlsconnection-openssl.c:614
msgid "Error performing TLS handshake"
msgstr ""
#: tls/gnutls/gtlsconnection-gnutls.c:1185
#, c-format
msgid ""
"Empty channel binding data indicates a bug in the TLS library implementation"
msgstr ""
#: tls/gnutls/gtlsconnection-gnutls.c:1203
#, c-format
msgid "Channel binding type is not implemented in the TLS library"
msgstr ""
#: tls/gnutls/gtlsconnection-gnutls.c:1207
#, c-format
msgid "Channel binding data is not yet available"
msgstr ""
#: tls/gnutls/gtlsconnection-gnutls.c:1245
#: tls/gnutls/gtlsconnection-gnutls.c:1257
#, c-format
msgid "X.509 certificate is not available on the connection"
msgstr ""
#: tls/gnutls/gtlsconnection-gnutls.c:1270
#, c-format
msgid "X.509 certificate is not available or is of unknown format: %s"
msgstr ""
#: tls/gnutls/gtlsconnection-gnutls.c:1281
#: tls/openssl/gtlsconnection-openssl.c:714
#, c-format
msgid "Unable to obtain certificate signature algorithm"
msgstr ""
#: tls/gnutls/gtlsconnection-gnutls.c:1297
#: tls/openssl/gtlsconnection-openssl.c:734
#, c-format
msgid ""
"Current X.509 certificate uses unknown or unsupported signature algorithm"
msgstr ""
#: tls/gnutls/gtlsconnection-gnutls.c:1391
#: tls/openssl/gtlsconnection-openssl.c:814
#, c-format
msgid "Requested channel binding type is not implemented"
msgstr ""
#: tls/gnutls/gtlsconnection-gnutls.c:1412
#: tls/gnutls/gtlsconnection-gnutls.c:1472
#: tls/openssl/gtlsconnection-openssl.c:832
#: tls/openssl/gtlsconnection-openssl.c:928
msgid "Error reading data from TLS socket"
msgstr ""
#. flags
#: tls/gnutls/gtlsconnection-gnutls.c:1494
#: tls/gnutls/gtlsconnection-gnutls.c:1557
#: tls/openssl/gtlsconnection-openssl.c:1007
msgid "Error writing data to TLS socket"
msgstr ""
#: tls/gnutls/gtlsconnection-gnutls.c:1527
#, c-format
msgid "Message of size %lu byte is too large for DTLS connection"
msgid_plural "Message of size %lu bytes is too large for DTLS connection"
msgstr[0] ""
msgstr[1] ""
#: tls/gnutls/gtlsconnection-gnutls.c:1529
#, c-format
msgid "(maximum is %u byte)"
msgid_plural "(maximum is %u bytes)"
msgstr[0] ""
msgstr[1] ""
#: tls/gnutls/gtlsconnection-gnutls.c:1576
#, c-format
msgid "Error performing TLS close: %s"
msgstr ""
#: tls/gnutls/gtlsdatabase-gnutls.c:556
msgid ""
"Failed to load system trust store: GnuTLS was not configured with a system "
"trust"
msgstr ""
#: tls/gnutls/gtlsdatabase-gnutls.c:561 tls/openssl/gtlsdatabase-openssl.c:255
#, c-format
msgid "Failed to load system trust store: %s"
msgstr ""
#: tls/gnutls/gtlsfiledatabase-gnutls.c:153
#: tls/openssl/gtlsfiledatabase-openssl.c:456
#, c-format
msgid "Failed to populate trust list from %s: %s"
msgstr ""
#: tls/gnutls/gtlsserverconnection-gnutls.c:124
#: tls/openssl/gtlsserverconnection-openssl.c:172
msgid "Certificate has no private key"
msgstr ""
#: tls/openssl/gtlsclientconnection-openssl.c:368
#: tls/openssl/gtlsserverconnection-openssl.c:299
#, c-format
msgid "Could not set TLS cipher list: %s"
msgstr ""
#: tls/openssl/gtlsclientconnection-openssl.c:396
#: tls/openssl/gtlsserverconnection-openssl.c:327
#, c-format
msgid "Could not set MAX protocol to %d: %s"
msgstr ""
#: tls/openssl/gtlsclientconnection-openssl.c:459
#: tls/openssl/gtlsserverconnection-openssl.c:390
#, c-format
msgid "Could not create TLS context: %s"
msgstr ""
#: tls/openssl/gtlsconnection-openssl.c:217
#, c-format
msgid "Unacceptable TLS certificate authority"
msgstr ""
#: tls/openssl/gtlsconnection-openssl.c:225
msgid "Digest too big for RSA key"
msgstr ""
#: tls/openssl/gtlsconnection-openssl.c:234
msgid "Secure renegotiation is disabled"
msgstr ""
#: tls/openssl/gtlsconnection-openssl.c:253
#, c-format
msgid "%s: The connection is broken"
msgstr ""
#: tls/openssl/gtlsconnection-openssl.c:660
#, c-format
msgid "The request is invalid."
msgstr ""
#: tls/openssl/gtlsconnection-openssl.c:683
#, c-format
msgid "Channel binding data tls-unique is not available"
msgstr ""
#: tls/openssl/gtlsconnection-openssl.c:706
#, c-format
msgid "X.509 Certificate is not available on the connection"
msgstr ""
#: tls/openssl/gtlsconnection-openssl.c:752
#, c-format
msgid "Failed to generate X.509 certificate digest"
msgstr ""
#: tls/openssl/gtlsconnection-openssl.c:783
#, c-format
msgid "TLS Connection does not support TLS-Exporter feature"
msgstr ""
#: tls/openssl/gtlsconnection-openssl.c:786
#, c-format
msgid "Unexpected error while exporting keying data"
msgstr ""
#: tls/openssl/gtlsconnection-openssl.c:1068
msgid "Error performing TLS close"
msgstr ""
#: tls/openssl/gtlsdatabase-openssl.c:167
msgid "Could not get trusted anchors from Keychain"
msgstr ""
#: tls/openssl/gtlsdatabase-openssl.c:232
msgid "Could not get root certificate store"
msgstr ""
#: tls/openssl/gtlsdatabase-openssl.c:239
msgid "Could not get CA certificate store"
msgstr ""
#: tls/openssl/gtlsdatabase-openssl.c:304
msgid "Could not create CA store"
msgstr ""
#: tls/openssl/gtlsserverconnection-openssl.c:184
#, c-format
msgid "There is a problem with the certificate: %s"
msgstr ""
#: tls/openssl/gtlsserverconnection-openssl.c:193
#, c-format
msgid "There is a problem with the certificate private key: %s"
msgstr ""
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: glib-networking.master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/glib-networking/"
"issues\n"
"POT-Creation-Date: 2022-05-17 18:47+0000\n"
"PO-Revision-Date: 2022-06-06 17:28+0200\n"
"Last-Translator: Temuri Doghonadze <temuri.doghonadze@gmail.com>\n"
"Language-Team: Georgian <(nothing)>\n"
"Language: ka\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 3.0.1\n"
#: proxy/libproxy/glibproxyresolver.c:164
msgid "Proxy resolver internal error."
msgstr "პროქსის გადამწყვეტის შიდა შეცდომა."
#: tls/base/gtlsconnection-base.c:562 tls/base/gtlsinputstream.c:78
#: tls/base/gtlsinputstream.c:141 tls/base/gtlsoutputstream.c:78
#: tls/base/gtlsoutputstream.c:143
msgid "Connection is closed"
msgstr "კავშირი დახურულია"
#. Cannot perform a blocking operation during a handshake on the
#. * same thread that triggered the handshake. The only way this can
#. * occur is if the application is doing something weird in its
#. * accept-certificate callback. Allowing a blocking op would stall
#. * the handshake (forever, if there's no timeout). Even a close
#. * op would deadlock here.
#.
#: tls/base/gtlsconnection-base.c:636
msgid "Cannot perform blocking operation during TLS handshake"
msgstr "TLS კავშირის დამყარებისას მბლოკავი ოპერაციის ჩატარება შეუძლებელია"
#: tls/base/gtlsconnection-base.c:701 tls/base/gtlsconnection-base.c:1249
#: tls/openssl/gtlsconnection-openssl.c:358
msgid "Socket I/O timed out"
msgstr "სოკეტის I/O ვადა გავიდა"
#: tls/base/gtlsconnection-base.c:875
msgid "Server required TLS certificate"
msgstr "სერვერი TLS სერტიფიკატს მოითხოვს"
#: tls/base/gtlsconnection-base.c:1454
#, c-format
msgid "Handshake is not finished, no channel binding information yet"
msgstr "დაკავშირება არ დასრულებულა, ჯერ არხის მიბმის ინფორმაცია არ მიგვიღია"
#: tls/base/gtlsconnection-base.c:1533
msgid "Peer does not support safe renegotiation"
msgstr "პარტნიორს შეერთების უსაფრთხოდ თავიდან დაწყების მხარდაჭერა არ გააჩნია"
#: tls/base/gtlsconnection-base.c:1681 tls/gnutls/gtlsconnection-gnutls.c:491
#: tls/openssl/gtlsconnection-openssl.c:209
#: tls/openssl/gtlsconnection-openssl.c:839
#, c-format
msgid "Unacceptable TLS certificate"
msgstr "მიუღებელი TLS სერთიფიკატი"
#: tls/base/gtlsconnection-base.c:2153
#, c-format
msgid "Receive flags are not supported"
msgstr "ალმების მიღება მხარდაუჭერელია"
#: tls/base/gtlsconnection-base.c:2300
#, c-format
msgid "Send flags are not supported"
msgstr "ალმების გაგზავნა მხარდაუჭერელია"
#: tls/gnutls/gtlscertificate-gnutls.c:361
#: tls/openssl/gtlscertificate-openssl.c:363
#, c-format
msgid "Could not parse DER certificate: %s"
msgstr "DER სერტიფიკატის დამუშავების შეცდომა: %s"
#: tls/gnutls/gtlscertificate-gnutls.c:382
#: tls/openssl/gtlscertificate-openssl.c:384
#, c-format
msgid "Could not parse PEM certificate: %s"
msgstr "PEM სერტიფიკატის დამუშავების შეცდომა: %s"
#: tls/gnutls/gtlscertificate-gnutls.c:405
#: tls/openssl/gtlscertificate-openssl.c:404
#, c-format
msgid "Could not parse DER private key: %s"
msgstr "DER პირადი გასაღების დამუშავების შეცდომა: %s"
#: tls/gnutls/gtlscertificate-gnutls.c:428
#: tls/openssl/gtlscertificate-openssl.c:424
#, c-format
msgid "Could not parse PEM private key: %s"
msgstr "PEM პირადი გასაღების დამუშავების შეცდომა: %s"
#: tls/gnutls/gtlscertificate-gnutls.c:455
#, c-format
msgid "Could not import PKCS #11 certificate URI: %s"
msgstr "PKCS #11 სერტიფიკატის URI-ის შემოტანის შეცდომა: %s"
#: tls/gnutls/gtlscertificate-gnutls.c:497
#: tls/openssl/gtlscertificate-openssl.c:459
msgid "No certificate data provided"
msgstr "სერტიფიკატის მონაცემები მოწოდებული არაა"
#: tls/gnutls/gtlscertificate-gnutls.c:807
#: tls/gnutls/gtlsconnection-gnutls.c:1058
#, c-format
msgid "Cannot verify peer identity of unexpected type %s"
msgstr "პარტიორის მოულოდნელი ტიპის შემოწმება შეუძლებელია: %s"
#: tls/gnutls/gtlsconnection-gnutls.c:204
msgid "Could not create TLS connection:"
msgstr "TLS შეერთების შექმნა შეუძლებელია:"
#: tls/gnutls/gtlsconnection-gnutls.c:214
#: tls/gnutls/gtlsconnection-gnutls.c:234
#: tls/openssl/gtlsclientconnection-openssl.c:512
#: tls/openssl/gtlsserverconnection-openssl.c:456
#, c-format
msgid "Could not create TLS connection: %s"
msgstr "TLS შეერთების შექმნა შეუძლებელია: %s"
#: tls/gnutls/gtlsconnection-gnutls.c:435
#: tls/gnutls/gtlsconnection-gnutls.c:446
#: tls/gnutls/gtlsconnection-gnutls.c:460
#: tls/openssl/gtlsconnection-openssl.c:176
#, c-format
msgid "Peer failed to perform TLS handshake: %s"
msgstr "პარტნიორს TLS შეერთების დაწყებa არ შეუძლია: %s"
#: tls/gnutls/gtlsconnection-gnutls.c:468
msgid "TLS connection closed unexpectedly"
msgstr "TLS შეერთება მოულოდნელად დაიხურა"
#: tls/gnutls/gtlsconnection-gnutls.c:483
#: tls/openssl/gtlsconnection-openssl.c:201
msgid "TLS connection peer did not send a certificate"
msgstr "TLS შეერთების პარტნიორმა სერტიფიკატი არ გამოაგზავნა"
#: tls/gnutls/gtlsconnection-gnutls.c:499
#, c-format
msgid "Peer sent fatal TLS alert: %s"
msgstr "პარტნიორმა ფატალური TLS გაფრთხილება გამოაგზავნა: %s"
#: tls/gnutls/gtlsconnection-gnutls.c:509
msgid "Protocol version downgrade attack detected"
msgstr "დაფიქსირდა პროტოკოლის ვერსიის ჩამოწევის შეტევა"
#: tls/gnutls/gtlsconnection-gnutls.c:518
#, c-format
msgid "Message is too large for DTLS connection; maximum is %u byte"
msgid_plural "Message is too large for DTLS connection; maximum is %u bytes"
msgstr[0] ""
"შეტყობინება ძალიან დიდია DTLS შეერთებისთვის. მაქსიმალური ზომაა %u ბაიტი"
#: tls/gnutls/gtlsconnection-gnutls.c:527
msgid "The operation timed out"
msgstr "ოპერაციის ვადა გავიდა"
#: tls/gnutls/gtlsconnection-gnutls.c:879
#, c-format
msgid "Error performing TLS handshake: %s"
msgstr "TLS შეერთების დაწყების შეცდომა: %s"
#: tls/gnutls/gtlsconnection-gnutls.c:982
#: tls/openssl/gtlsconnection-openssl.c:614
msgid "Error performing TLS handshake"
msgstr "TLS შეერთების დაწყების შეცდომა"
#: tls/gnutls/gtlsconnection-gnutls.c:1185
#, c-format
msgid ""
"Empty channel binding data indicates a bug in the TLS library implementation"
msgstr ""
"არხის მიბმის ცარიელი მონაცემები TLS ბიბლიოთეკის იმპლემენტაციის შეცდომაზე "
"მიუთითებს"
#: tls/gnutls/gtlsconnection-gnutls.c:1203
#, c-format
msgid "Channel binding type is not implemented in the TLS library"
msgstr "არხის მიბმის ტიპი TLS ბიბლიოთეკაში განხორციელებული არაა"
#: tls/gnutls/gtlsconnection-gnutls.c:1207
#, c-format
msgid "Channel binding data is not yet available"
msgstr "არხის მიბმის მონაცემები ჯერ კიდევ მიუწვდომელია"
#: tls/gnutls/gtlsconnection-gnutls.c:1245
#: tls/gnutls/gtlsconnection-gnutls.c:1257
#, c-format
msgid "X.509 certificate is not available on the connection"
msgstr "X.509 სერტიფიკატი ამ შეერთებისთვის მიუწვდომელია"
#: tls/gnutls/gtlsconnection-gnutls.c:1270
#, c-format
msgid "X.509 certificate is not available or is of unknown format: %s"
msgstr "X.509 სერტიფიკატი მიუწვდომელია ან არასწორი ფორმატით: %s"
#: tls/gnutls/gtlsconnection-gnutls.c:1281
#: tls/openssl/gtlsconnection-openssl.c:714
#, c-format
msgid "Unable to obtain certificate signature algorithm"
msgstr "სერტიფიკატის ხელმოწერის ალგორითმის მიღება შეუძლებელია"
#: tls/gnutls/gtlsconnection-gnutls.c:1297
#: tls/openssl/gtlsconnection-openssl.c:734
#, c-format
msgid ""
"Current X.509 certificate uses unknown or unsupported signature algorithm"
msgstr ""
"მიმდინარე X.509 სერტიფიკატი არასწორ ან მხარდაუჭერელ ხელმოწერის ალგორითმს "
"იყენებს"
#: tls/gnutls/gtlsconnection-gnutls.c:1391
#: tls/openssl/gtlsconnection-openssl.c:814
#, c-format
msgid "Requested channel binding type is not implemented"
msgstr "არხის მიბმის მოთხოვნილი ტიპი განხორციელებული არაა"
#: tls/gnutls/gtlsconnection-gnutls.c:1412
#: tls/gnutls/gtlsconnection-gnutls.c:1472
#: tls/openssl/gtlsconnection-openssl.c:832
#: tls/openssl/gtlsconnection-openssl.c:928
msgid "Error reading data from TLS socket"
msgstr "TLS სოკეტიდან მონაცემების კითხვის შეცდომა"
#. flags
#: tls/gnutls/gtlsconnection-gnutls.c:1494
#: tls/gnutls/gtlsconnection-gnutls.c:1557
#: tls/openssl/gtlsconnection-openssl.c:1007
msgid "Error writing data to TLS socket"
msgstr "TLS სოკეტში მონაცემების ჩაწერის შეცდომა"
#: tls/gnutls/gtlsconnection-gnutls.c:1527
#, c-format
msgid "Message of size %lu byte is too large for DTLS connection"
msgid_plural "Message of size %lu bytes is too large for DTLS connection"
msgstr[0] ""
"შეტყობინება ძალიან დიდია DTLS შეერთებისთვის. შეტყობინების ზომაა %lu ბაიტი"
#: tls/gnutls/gtlsconnection-gnutls.c:1529
#, c-format
msgid "(maximum is %u byte)"
msgid_plural "(maximum is %u bytes)"
msgstr[0] "(მაქსიმუმ %u ბაიტი)"
#: tls/gnutls/gtlsconnection-gnutls.c:1576
#, c-format
msgid "Error performing TLS close: %s"
msgstr "TLS-ის დახურვის შეცდომა: %s"
#: tls/gnutls/gtlsdatabase-gnutls.c:556
msgid ""
"Failed to load system trust store: GnuTLS was not configured with a system "
"trust"
msgstr ""
"სისტემური ნდობის საცავის ჩატვირთვის შეცდომა: GnuTLS-ი სისტემური ნდობით არაა "
"მორგებული"
#: tls/gnutls/gtlsdatabase-gnutls.c:561 tls/openssl/gtlsdatabase-openssl.c:255
#, c-format
msgid "Failed to load system trust store: %s"
msgstr "სისტემური ნდობის საცავის ჩატვირთვის შეცდომა: %s"
#: tls/gnutls/gtlsfiledatabase-gnutls.c:153
#: tls/openssl/gtlsfiledatabase-openssl.c:456
#, c-format
msgid "Failed to populate trust list from %s: %s"
msgstr "%s-დან ნდობის საცავის შევსების შეცდომა: %s"
#: tls/gnutls/gtlsserverconnection-gnutls.c:124
#: tls/openssl/gtlsserverconnection-openssl.c:172
msgid "Certificate has no private key"
msgstr "სერტიფიკატს პირადი გასაღები არ გააჩნია"
#: tls/openssl/gtlsclientconnection-openssl.c:368
#: tls/openssl/gtlsserverconnection-openssl.c:299
#, c-format
msgid "Could not set TLS cipher list: %s"
msgstr "TLS-ის შიფრაციის სიის დაყენების შეცდომა: %s"
#: tls/openssl/gtlsclientconnection-openssl.c:396
#: tls/openssl/gtlsserverconnection-openssl.c:327
#, c-format
msgid "Could not set MAX protocol to %d: %s"
msgstr "%d-ის MAX პროტოკოლის დაყენების შეცდომა: %s"
#: tls/openssl/gtlsclientconnection-openssl.c:459
#: tls/openssl/gtlsserverconnection-openssl.c:390
#, c-format
msgid "Could not create TLS context: %s"
msgstr "TLS კონტექსტის შექმნის შეცდომა: %s"
#: tls/openssl/gtlsconnection-openssl.c:217
#, c-format
msgid "Unacceptable TLS certificate authority"
msgstr "TLS სერთიფიკატის მიუღებელი გამომცემელი"
#: tls/openssl/gtlsconnection-openssl.c:225
msgid "Digest too big for RSA key"
msgstr "ჰეშ ფუნქცია ძალიან დიდია RSA გასაღებისთვის"
#: tls/openssl/gtlsconnection-openssl.c:234
msgid "Secure renegotiation is disabled"
msgstr "თავიდან დაცულად შეერთება გამორთულია"
#: tls/openssl/gtlsconnection-openssl.c:253
#, c-format
msgid "%s: The connection is broken"
msgstr "%s: შეერთება გაფუჭებულია"
#: tls/openssl/gtlsconnection-openssl.c:660
#, c-format
msgid "The request is invalid."
msgstr "არასწორი მოთხოვნა."
#: tls/openssl/gtlsconnection-openssl.c:683
#, c-format
msgid "Channel binding data tls-unique is not available"
msgstr "არხის მიბმის მონაცემების tls-unique მიუწვდომელია"
#: tls/openssl/gtlsconnection-openssl.c:706
#, c-format
msgid "X.509 Certificate is not available on the connection"
msgstr "X.509 სერტიფიკატი ამ შეერთებისთვის მიუწვდომელია"
#: tls/openssl/gtlsconnection-openssl.c:752
#, c-format
msgid "Failed to generate X.509 certificate digest"
msgstr "X.509 სერტიფიკატის ჰეშის გენერაციის შეცდომა"
#: tls/openssl/gtlsconnection-openssl.c:783
#, c-format
msgid "TLS Connection does not support TLS-Exporter feature"
msgstr "TLS შეერთებას TLS-Exporter თვისება არ გააჩნია"
#: tls/openssl/gtlsconnection-openssl.c:786
#, c-format
msgid "Unexpected error while exporting keying data"
msgstr "მოულოდნელი შეცდომა keyring-ის მონაცემების გატანისას"
#: tls/openssl/gtlsconnection-openssl.c:1068
msgid "Error performing TLS close"
msgstr "TLS-ის დახურვის შეცდომა"
#: tls/openssl/gtlsdatabase-openssl.c:167
msgid "Could not get trusted anchors from Keychain"
msgstr "Keychain-დან სანდო anchor-ების მიღების შეცდომა"
#: tls/openssl/gtlsdatabase-openssl.c:232
msgid "Could not get root certificate store"
msgstr "Root სერტიფიკატების საცავის მიღების შეცდომა"
#: tls/openssl/gtlsdatabase-openssl.c:239
msgid "Could not get CA certificate store"
msgstr "CA სერტიფიკატების საცავის მიღების შეცდომა"
#: tls/openssl/gtlsdatabase-openssl.c:304
msgid "Could not create CA store"
msgstr "CA საცავის შექმნის შეცდომა"
#: tls/openssl/gtlsserverconnection-openssl.c:184
#, c-format
msgid "There is a problem with the certificate: %s"
msgstr "პრობლება სერტიფიკატთან: %s"
#: tls/openssl/gtlsserverconnection-openssl.c:193
#, c-format
msgid "There is a problem with the certificate private key: %s"
msgstr "პრობლემა სერტიფიკატის პირად გასაღებთან: %s"
......@@ -27,12 +27,17 @@ module = shared_module(
)
if get_option('static_modules')
static_library('gioenvironmentproxy',
gioenvironmentproxy_lib = static_library('gioenvironmentproxy',
objects: module.extract_all_objects(),
install: true,
install_dir: gio_module_dir
)
pkg.generate(module)
gioenvironmentproxy_dep = declare_dependency(
link_with: gioenvironmentproxy_lib
)
meson.override_dependency('gioenvironmentproxy', gioenvironmentproxy_dep)
endif
proxy_test_programs += [['environment', 'environment', deps]]
......
......@@ -187,6 +187,7 @@ update_settings (GProxyResolverGnome *resolver)
gchar **ignore_hosts;
gchar *host, *http_proxy, *proxy;
guint port;
GError *error = NULL;
resolver->need_update = FALSE;
......@@ -204,7 +205,6 @@ update_settings (GProxyResolverGnome *resolver)
if (resolver->mode == G_DESKTOP_PROXY_MODE_AUTO && !resolver->pacrunner)
{
GError *error = NULL;
resolver->pacrunner =
g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES |
......@@ -220,6 +220,7 @@ update_settings (GProxyResolverGnome *resolver)
"\n %s\nProxy autoconfiguration will not work",
error->message);
}
g_clear_error (&error);
}
else if (resolver->mode != G_DESKTOP_PROXY_MODE_AUTO && resolver->pacrunner)
{
......@@ -269,9 +270,18 @@ update_settings (GProxyResolverGnome *resolver)
else
http_proxy = g_strdup_printf ("http://%s:%u", host, port);
g_simple_proxy_resolver_set_uri_proxy (simple, "http", http_proxy);
if (g_settings_get_boolean (resolver->proxy_settings, GNOME_PROXY_USE_SAME_PROXY_KEY))
g_simple_proxy_resolver_set_default_proxy (simple, http_proxy);
if (g_uri_is_valid (http_proxy, G_URI_FLAGS_NONE, &error))
{
g_simple_proxy_resolver_set_uri_proxy (simple, "http", http_proxy);
if (g_settings_get_boolean (resolver->proxy_settings, GNOME_PROXY_USE_SAME_PROXY_KEY))
g_simple_proxy_resolver_set_default_proxy (simple, http_proxy);
}
else
{
g_warning ("Invalid HTTP proxy URI %s from GNOME settings: %s", http_proxy, error->message);
g_clear_pointer (&http_proxy, g_free);
g_clear_error (&error);
}
}
else
http_proxy = NULL;
......@@ -282,7 +292,15 @@ update_settings (GProxyResolverGnome *resolver)
if (host && *host)
{
proxy = g_strdup_printf ("http://%s:%u", host, port);
g_simple_proxy_resolver_set_uri_proxy (simple, "https", proxy);
if (g_uri_is_valid (proxy, G_URI_FLAGS_NONE, &error))
{
g_simple_proxy_resolver_set_uri_proxy (simple, "https", proxy);
}
else
{
g_warning ("Invalid HTTPS proxy URI %s from GNOME settings: %s", proxy, error->message);
g_clear_error (&error);
}
g_free (proxy);
}
else if (http_proxy)
......@@ -294,7 +312,15 @@ update_settings (GProxyResolverGnome *resolver)
if (host && *host)
{
proxy = g_strdup_printf ("socks://%s:%u", host, port);
g_simple_proxy_resolver_set_default_proxy (simple, proxy);
if (g_uri_is_valid (proxy, G_URI_FLAGS_NONE, &error))
{
g_simple_proxy_resolver_set_default_proxy (simple, proxy);
}
else
{
g_warning ("Invalid SOCKS proxy URI %s from GNOME settings: %s", proxy, error->message);
g_clear_error (&error);
}
g_free (proxy);
}
g_free (host);
......@@ -306,7 +332,15 @@ update_settings (GProxyResolverGnome *resolver)
if (host && *host)
{
proxy = g_strdup_printf ("ftp://%s:%u", host, port);
g_simple_proxy_resolver_set_uri_proxy (simple, "ftp", proxy);
if (g_uri_is_valid (proxy, G_URI_FLAGS_NONE, &error))
{
g_simple_proxy_resolver_set_uri_proxy (simple, "ftp", proxy);
}
else
{
g_warning ("Invalid FTP proxy URI %s from GNOME settings: %s", proxy, error->message);
g_clear_error (&error);
}
g_free (proxy);
}
g_free (host);
......
......@@ -24,12 +24,15 @@ module = shared_module(
)
if get_option('static_modules')
static_library('giognomeproxy',
giognomeproxy_lib = static_library('giognomeproxy',
objects: module.extract_all_objects(),
install: true,
install_dir: gio_module_dir
)
pkg.generate(module)
giognomeproxy_dep = declare_dependency(link_with: giognomeproxy_lib)
meson.override_dependency('giognomeproxy', giognomeproxy_dep)
endif
proxy_test_programs += [['gnome', 'gnome', deps]]
......
......@@ -92,6 +92,7 @@ copy_proxies (gchar **proxies)
gchar **copy;
int len = 0;
int i, j;
GError *error = NULL;
for (i = 0; proxies[i]; i++)
{
......@@ -104,6 +105,14 @@ copy_proxies (gchar **proxies)
copy = g_new (gchar *, len + 1);
for (i = j = 0; proxies[i]; i++, j++)
{
if (!g_uri_is_valid (proxies[i], G_URI_FLAGS_NONE, &error))
{
g_warning ("Received invalid URI %s from libproxy: %s", proxies[i], error->message);
g_clear_error (&error);
j--;
continue;
}
if (!strncmp ("socks://", proxies[i], 8))
{
copy[j++] = g_strdup_printf ("socks5://%s", proxies[i] + 8);
......@@ -120,21 +129,6 @@ copy_proxies (gchar **proxies)
return copy;
}
/* FIXME: this function should be removed and replaced by a call to
* px_proxy_factory_free_proxies() once libproxy 0.4.16 is released.
* Sadly libproxy does not have any version check macros so it will
* have to be a hard dep.
*/
static void
free_libproxy_proxies (gchar **proxies)
{
int i;
for (i = 0; proxies[i]; i++)
free (proxies[i]);
free (proxies);
}
static void
get_libproxy_proxies (GTask *task,
gpointer source_object,
......@@ -156,7 +150,7 @@ get_libproxy_proxies (GTask *task,
* three entries ("socks5", "socks4a", "socks4").
*/
g_task_return_pointer (task, copy_proxies (proxies), (GDestroyNotify) g_strfreev);
free_libproxy_proxies (proxies);
px_proxy_factory_free_proxies (proxies);
}
else
{
......
......@@ -48,12 +48,15 @@ module = shared_module(
)
if get_option('static_modules')
static_library('giolibproxy',
giolibproxy_lib = static_library('giolibproxy',
objects: module.extract_all_objects(),
install: true,
install_dir: gio_module_dir
)
pkg.generate(module)
giolibproxy_dep = declare_dependency(link_with: giolibproxy_lib)
meson.override_dependency('giolibproxy', giolibproxy_dep)
endif
sources = files(
......
......@@ -6,9 +6,7 @@ if gsettings_desktop_schemas_dep.found()
subdir('gnome')
endif
# FIXME: This ought to work on Windows.
# https://gitlab.gnome.org/GNOME/glib-networking/-/issues/185
if not ['windows'].contains(host_system)
if environment_proxy_enabled
subdir('environment')
endif
......
......@@ -39,40 +39,43 @@ void g_tls_log (GLogLevelFlags level,
const gchar *format,
...)
{
gchar *header = NULL;
gchar *message = NULL;
gchar *thread = NULL;
va_list args;
int ret;
if (level < G_LOG_LEVEL_DEBUG || ENABLE_DEBUG_LOGS)
{
gchar *header = NULL;
gchar *message = NULL;
gchar *thread = NULL;
va_list args;
int ret;
va_start (args, format);
ret = g_vasprintf (&message, format, args);
va_end (args);
va_start (args, format);
ret = g_vasprintf (&message, format, args);
va_end (args);
if (ret <= 0)
goto out;
if (ret <= 0)
goto out;
if (conn && G_IS_TLS_CONNECTION (conn)) {
if (G_IS_TLS_CLIENT_CONNECTION (conn))
header = g_strdup_printf ("CLIENT[%p]: ", conn);
else if (G_IS_TLS_SERVER_CONNECTION (conn))
header = g_strdup_printf ("SERVER[%p]: ", conn);
else
g_assert_not_reached ();
} else {
header = g_strdup ("");
}
if (conn && G_IS_TLS_CONNECTION (conn)) {
if (G_IS_TLS_CLIENT_CONNECTION (conn))
header = g_strdup_printf ("CLIENT[%p]: ", conn);
else if (G_IS_TLS_SERVER_CONNECTION (conn))
header = g_strdup_printf ("SERVER[%p]: ", conn);
else
g_assert_not_reached ();
} else {
header = g_strdup ("");
}
thread = g_strdup_printf ("%p", g_thread_self ());
g_log_structured (G_LOG_DOMAIN, level,
"GLIB_NET_THREAD", thread,
"CODE_FILE", file,
"CODE_LINE", line,
"CODE_FUNC", func,
"MESSAGE", "%s%s", header, message);
thread = g_strdup_printf ("%p", g_thread_self ());
g_log_structured (G_LOG_DOMAIN, level,
"GLIB_NET_THREAD", thread,
"CODE_FILE", file,
"CODE_LINE", line,
"CODE_FUNC", func,
"MESSAGE", "%s%s", header, message);
out:
g_free (header);
g_free (message);
g_free (thread);
out:
g_free (header);
g_free (message);
g_free (thread);
}
}
......@@ -534,7 +534,7 @@ end_gnutls_io (GTlsConnectionGnutls *gnutls,
if (error && !*error)
{
*error = g_error_new (G_TLS_ERROR, G_TLS_ERROR_MISC, "%s: %s",
err_prefix, gnutls_strerror (ret));
gettext (err_prefix), gnutls_strerror (ret));
}
return G_TLS_CONNECTION_BASE_ERROR;
......@@ -876,7 +876,7 @@ g_tls_connection_gnutls_handshake_thread_request_rehandshake (GTlsConnectionBase
BEGIN_GNUTLS_IO (gnutls, G_IO_IN | G_IO_OUT, timeout, cancellable);
ret = gnutls_rehandshake (priv->session);
END_GNUTLS_IO (gnutls, G_IO_IN | G_IO_OUT, ret, status, _("Error performing TLS handshake: %s"), error);
END_GNUTLS_IO (gnutls, G_IO_IN | G_IO_OUT, ret, status, N_("Error performing TLS handshake: %s"), error);
return status;
}
......@@ -979,7 +979,7 @@ g_tls_connection_gnutls_handshake_thread_handshake (GTlsConnectionBase *tls,
}
}
END_GNUTLS_IO (gnutls, G_IO_IN | G_IO_OUT, ret, status,
_("Error performing TLS handshake"), error);
N_("Error performing TLS handshake"), error);
return status;
}
......@@ -1098,35 +1098,7 @@ glib_protocol_version_from_gnutls (gnutls_protocol_t protocol_version)
static gchar *
get_ciphersuite_name (gnutls_session_t session)
{
#if GTLS_GNUTLS_CHECK_VERSION(3, 7, 4)
return g_strdup (gnutls_ciphersuite_get (session));
#else
gnutls_protocol_t protocol_version = gnutls_protocol_get_version (session);
char *cipher_name;
char *result;
if (protocol_version <= GNUTLS_TLS1_2 ||
(protocol_version >= GNUTLS_DTLS0_9 && protocol_version <= GNUTLS_DTLS1_2))
{
return g_strdup (gnutls_cipher_suite_get_name (gnutls_kx_get (session),
gnutls_cipher_get (session),
gnutls_mac_get (session)));
}
cipher_name = g_strdup (gnutls_cipher_get_name (gnutls_cipher_get (session)));
for (char *c = cipher_name; *c != '\0'; c++)
{
if (*c == '-')
*c = '_';
}
result = g_strdup_printf ("TLS_%s_%s",
cipher_name,
gnutls_digest_get_name (gnutls_prf_hash_get (session)));
g_free (cipher_name);
return result;
#endif
}
static void
......@@ -1226,143 +1198,15 @@ gnutls_get_binding_tls_server_end_point (GTlsConnectionGnutls *gnutls,
GByteArray *data,
GError **error)
{
#if GTLS_GNUTLS_CHECK_VERSION(3, 7, 2)
return gnutls_get_binding (gnutls, data, GNUTLS_CB_TLS_SERVER_END_POINT, error);
#else
GTlsConnectionGnutlsPrivate *priv = g_tls_connection_gnutls_get_instance_private (gnutls);
const gnutls_datum_t *ders;
unsigned int num_certs = 1;
int ret;
size_t rlen;
gnutls_x509_crt_t cert;
gnutls_digest_algorithm_t algo;
gboolean is_client = G_IS_TLS_CLIENT_CONNECTION (gnutls);
ret = gnutls_certificate_type_get (priv->session);
if (ret != GNUTLS_CRT_X509)
{
g_set_error (error, G_TLS_CHANNEL_BINDING_ERROR, G_TLS_CHANNEL_BINDING_ERROR_NOT_SUPPORTED,
_("X.509 certificate is not available on the connection"));
return FALSE;
}
if (is_client)
ders = gnutls_certificate_get_peers (priv->session, &num_certs);
else
ders = gnutls_certificate_get_ours (priv->session);
if (!ders || num_certs == 0)
{
g_set_error (error, G_TLS_CHANNEL_BINDING_ERROR, G_TLS_CHANNEL_BINDING_ERROR_NOT_AVAILABLE,
_("X.509 certificate is not available on the connection"));
return FALSE;
}
/* This is a drill */
if (!data)
return TRUE;
/* for DER only first cert is imported, but cert will be pre-initialized */
ret = gnutls_x509_crt_list_import (&cert, &num_certs, ders, GNUTLS_X509_FMT_DER, 0);
if (ret < 0 || num_certs == 0)
{
g_set_error (error, G_TLS_CHANNEL_BINDING_ERROR, G_TLS_CHANNEL_BINDING_ERROR_NOT_AVAILABLE,
_("X.509 certificate is not available or is of unknown format: %s"),
gnutls_strerror (ret));
return FALSE;
}
/* obtain signature algorithm for the certificate - we need hashing algo from it */
ret = gnutls_x509_crt_get_signature_algorithm (cert);
if (ret < 0 || ret == GNUTLS_SIGN_UNKNOWN)
{
gnutls_x509_crt_deinit (cert);
g_set_error (error, G_TLS_CHANNEL_BINDING_ERROR, G_TLS_CHANNEL_BINDING_ERROR_NOT_SUPPORTED,
_("Unable to obtain certificate signature algorithm"));
return FALSE;
}
/* At this point we either use SHA256 as a fallback, or native algorithm */
algo = gnutls_sign_get_hash_algorithm (ret);
/* Cannot identify signing algorithm or weak security - let try fallback */
switch (algo)
{
case GNUTLS_DIG_MD5:
case GNUTLS_DIG_SHA1:
algo = GNUTLS_DIG_SHA256;
break;
case GNUTLS_DIG_UNKNOWN:
case GNUTLS_DIG_NULL:
case GNUTLS_DIG_MD5_SHA1:
g_set_error (error, G_TLS_CHANNEL_BINDING_ERROR, G_TLS_CHANNEL_BINDING_ERROR_NOT_SUPPORTED,
_("Current X.509 certificate uses unknown or unsupported signature algorithm"));
gnutls_x509_crt_deinit (cert);
return FALSE;
default:
/* no-op */
algo = algo;
}
/* preallocate 512 bits buffer as maximum supported digest size */
rlen = 64;
g_byte_array_set_size (data, rlen);
ret = gnutls_x509_crt_get_fingerprint (cert, algo, data->data, &rlen);
/* in case the future is coming on */
if (ret == GNUTLS_E_SHORT_MEMORY_BUFFER)
{
g_byte_array_set_size (data, rlen);
ret = gnutls_x509_crt_get_fingerprint (cert, algo, data->data, &rlen);
}
gnutls_x509_crt_deinit (cert);
g_byte_array_set_size (data, rlen);
if (ret == 0)
return TRUE;
/* Still getting error? We cannot do much here to recover */
g_set_error (error, G_TLS_CHANNEL_BINDING_ERROR, G_TLS_CHANNEL_BINDING_ERROR_GENERAL_ERROR,
"%s", gnutls_strerror(ret));
return FALSE;
#endif
}
#if !GTLS_GNUTLS_CHECK_VERSION(3, 7, 2)
#define RFC5705_LABEL_DATA "EXPORTER-Channel-Binding"
#define RFC5705_LABEL_LEN 24
#endif
/* Experimental binding for TLS1.3, see
* https://datatracker.ietf.org/doc/draft-ietf-kitten-tls-channel-bindings-for-tls13 */
static gboolean
gnutls_get_binding_tls_exporter (GTlsConnectionGnutls *gnutls,
GByteArray *data,
GError **error)
{
#if GTLS_GNUTLS_CHECK_VERSION(3, 7, 2)
return gnutls_get_binding (gnutls, data, GNUTLS_CB_TLS_EXPORTER, error);
#else
GTlsConnectionGnutlsPrivate *priv = g_tls_connection_gnutls_get_instance_private (gnutls);
int ret;
gsize ctx_len = 0;
char *context = "";
/* This is a drill */
if (!data)
return TRUE;
g_byte_array_set_size (data, 32);
ret = gnutls_prf_rfc5705 (priv->session,
RFC5705_LABEL_LEN, RFC5705_LABEL_DATA,
ctx_len, context,
data->len, (char *)data->data);
if (ret == GNUTLS_E_SUCCESS)
return TRUE;
g_set_error (error, G_TLS_CHANNEL_BINDING_ERROR, G_TLS_CHANNEL_BINDING_ERROR_GENERAL_ERROR,
"%s", gnutls_strerror (ret));
return FALSE;
#endif
}
static gboolean
......@@ -1373,18 +1217,14 @@ g_tls_connection_gnutls_get_channel_binding_data (GTlsConnectionBase *tls,
{
GTlsConnectionGnutls *gnutls = G_TLS_CONNECTION_GNUTLS (tls);
/* XXX: remove the cast once public enum supports exporter */
switch ((int)type)
switch (type)
{
case G_TLS_CHANNEL_BINDING_TLS_UNIQUE:
return gnutls_get_binding_tls_unique (gnutls, data, error);
/* fall through */
case G_TLS_CHANNEL_BINDING_TLS_SERVER_END_POINT:
return gnutls_get_binding_tls_server_end_point (gnutls, data, error);
/* fall through */
case 100500:
case G_TLS_CHANNEL_BINDING_TLS_EXPORTER:
return gnutls_get_binding_tls_exporter (gnutls, data, error);
/* fall through */
default:
/* Anyone to implement tls-unique-for-telnet? */
g_set_error (error, G_TLS_CHANNEL_BINDING_ERROR, G_TLS_CHANNEL_BINDING_ERROR_NOT_IMPLEMENTED,
......@@ -1409,7 +1249,7 @@ g_tls_connection_gnutls_read (GTlsConnectionBase *tls,
BEGIN_GNUTLS_IO (gnutls, G_IO_IN, timeout, cancellable);
ret = gnutls_record_recv (priv->session, buffer, count);
END_GNUTLS_IO (gnutls, G_IO_IN, ret, status, _("Error reading data from TLS socket"), error);
END_GNUTLS_IO (gnutls, G_IO_IN, ret, status, N_("Error reading data from TLS socket"), error);
*nread = MAX (ret, 0);
return status;
......@@ -1469,7 +1309,7 @@ g_tls_connection_gnutls_read_message (GTlsConnectionBase *tls,
gnutls_packet_deinit (packet);
}
END_GNUTLS_IO (gnutls, G_IO_IN, ret, status, _("Error reading data from TLS socket"), error);
END_GNUTLS_IO (gnutls, G_IO_IN, ret, status, N_("Error reading data from TLS socket"), error);
*nread = MAX (ret, 0);
return status;
......@@ -1491,7 +1331,7 @@ g_tls_connection_gnutls_write (GTlsConnectionBase *tls,
BEGIN_GNUTLS_IO (gnutls, G_IO_OUT, timeout, cancellable);
ret = gnutls_record_send (priv->session, buffer, count);
END_GNUTLS_IO (gnutls, G_IO_OUT, ret, status, _("Error writing data to TLS socket"), error);
END_GNUTLS_IO (gnutls, G_IO_OUT, ret, status, N_("Error writing data to TLS socket"), error);
*nwrote = MAX (ret, 0);
return status;
......@@ -1554,7 +1394,7 @@ g_tls_connection_gnutls_write_message (GTlsConnectionBase *tls,
BEGIN_GNUTLS_IO (gnutls, G_IO_OUT, timeout, cancellable);
ret = gnutls_record_uncork (priv->session, 0 /* flags */);
END_GNUTLS_IO (gnutls, G_IO_OUT, ret, status, _("Error writing data to TLS socket"), error);
END_GNUTLS_IO (gnutls, G_IO_OUT, ret, status, N_("Error writing data to TLS socket"), error);
*nwrote = MAX (ret, 0);
return status;
......@@ -1573,7 +1413,7 @@ g_tls_connection_gnutls_close (GTlsConnectionBase *tls,
BEGIN_GNUTLS_IO (gnutls, G_IO_IN | G_IO_OUT, timeout, cancellable);
ret = gnutls_bye (priv->session, GNUTLS_SHUT_WR);
END_GNUTLS_IO (gnutls, G_IO_IN | G_IO_OUT, ret, status, _("Error performing TLS close: %s"), error);
END_GNUTLS_IO (gnutls, G_IO_IN | G_IO_OUT, ret, status, N_("Error performing TLS close: %s"), error);
return status;
}
......
......@@ -35,13 +35,16 @@ module = shared_module(
if get_option('static_modules')
# link_whole is a workaround for a meson bug
# https://github.com/mesonbuild/meson/pull/3939
static_library('giognutls',
giognutls_lib = static_library('giognutls',
objects: module.extract_all_objects(),
install: true,
install_dir: gio_module_dir,
link_whole: [tlsbase]
)
pkg.generate(module)
giognutls_dep = declare_dependency(link_with: giognutls_lib)
meson.override_dependency('giognutls', giognutls_dep)
endif
if meson.version().version_compare('>=0.58')
......