diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index df9a7643b..9b5d8e738 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,7 +76,7 @@ jobs: container: ${{ matrix.container }} strategy: matrix: - container: ['fedora:36', 'fedora:37'] + container: ['fedora:36', 'fedora:37', 'fedora:38'] env: MAKEFLAGS: -j3 steps: @@ -105,14 +105,14 @@ jobs: container: ${{ matrix.container }} strategy: matrix: - container: ['ubuntu:20.04', 'ubuntu:22.04', 'ubuntu:22.10'] + container: ['ubuntu:20.04', 'ubuntu:22.04', 'ubuntu:22.10', 'ubuntu:23.04'] env: DEBIAN_FRONTEND: noninteractive DEBFULLNAME: github-actions DEBEMAIL: github-actions@github.com steps: - name: Install dependencies - run: apt update -qq && apt install --no-install-recommends -y git lsb-release fakeroot build-essential devscripts cdbs cmake xxd xsdcxx libxml-security-c-dev zlib1g-dev doxygen swig openjdk-8-jdk-headless libpython3-dev python3-distutils libboost-test-dev lintian + run: apt update -qq && apt install --no-install-recommends -y git lsb-release fakeroot build-essential devscripts cdbs debhelper cmake xxd xsdcxx libxml-security-c-dev zlib1g-dev doxygen swig openjdk-8-jdk-headless libpython3-dev python3-distutils libboost-test-dev lintian - name: Checkout uses: actions/checkout@v3 with: diff --git a/cmake b/cmake index 7b34cc036..01ec22ddc 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 7b34cc036c350e2ac13e4f3f529361003e36394a +Subproject commit 01ec22ddceaf93824737bed3158bd4a560c4af9d diff --git a/src/crypto/Connect.cpp b/src/crypto/Connect.cpp index a10fe5704..4ec498328 100644 --- a/src/crypto/Connect.cpp +++ b/src/crypto/Connect.cpp @@ -68,10 +68,8 @@ Connect::Connect(const string &_url, const string &method, int timeout, const st OPENSSL_free(_host); OPENSSL_free(_port); OPENSSL_free(_path); - size_t pos = url.find("://"); - if(pos != string::npos) { - pos = url.find('/', pos + 3); - if(pos != string::npos) + if(size_t pos = url.find("://"); pos != string::npos) { + if(pos = url.find('/', pos + 3); pos != string::npos) baseurl = url.substr(0, pos); } @@ -135,15 +133,14 @@ Connect::Connect(const string &_url, const string &method, int timeout, const st X509 *x509 = X509_STORE_CTX_get0_cert(store); auto *certs = (vector*)data; return any_of(certs->cbegin(), certs->cend(), [x509](const X509Cert &cert) { - return cert == x509; + return cert && cert == x509; }) ? 1 : 0; }, const_cast*>(&certs)); } BIO *sbio = BIO_new_ssl(ssl.get(), 1); if(!sbio) THROW_NETWORKEXCEPTION("Failed to create ssl connection with host: '%s'", hostname.c_str()) - SSL *ssl = nullptr; - if(BIO_get_ssl(sbio, &ssl) == 1 && ssl) + if(SSL *ssl {}; BIO_get_ssl(sbio, &ssl) == 1 && ssl) { SSL_set1_host(ssl, host.c_str()); SSL_set_tlsext_host_name(ssl, host.c_str()); @@ -343,7 +340,7 @@ void Connect::waitReadWrite(bool read) const fd_set confds; FD_ZERO(&confds); FD_SET(fd, &confds); - struct timeval tv = { _timeout, 0 }; + timeval tv { _timeout, 0 }; if(select(fd + 1, read ? &confds : nullptr, read ? nullptr : &confds, nullptr, &tv) == -1) DEBUG("select failed"); }