Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uC1pf-009bOC-Tx for pgsql-hackers@arkaria.postgresql.org; Mon, 05 May 2025 19:50:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uC1fL-005I5Z-GH for pgsql-hackers@arkaria.postgresql.org; Mon, 05 May 2025 19:39:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uC1fL-005I5Q-4z for pgsql-hackers@lists.postgresql.org; Mon, 05 May 2025 19:39:51 +0000 Received: from mail-oa1-x2b.google.com ([2001:4860:4864:20::2b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uC1fI-000KIL-04 for pgsql-hackers@postgresql.org; Mon, 05 May 2025 19:39:50 +0000 Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-2d034a6e29aso397149fac.3 for ; Mon, 05 May 2025 12:39:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746473986; x=1747078786; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=wSTG8SHGTp1glXKC6KqF/opEizUyIdACohXYk1/Zdco=; b=jLNhIauxzbXAvWyPhYU0cXBK9Z+ljeghZCluCry5oxo9wYwMQzaDylkdnf0pQzLCR0 eCDQCUasRHpsNxZnIDlabG1sJE0/uHTFlzy7hTatHaMd4qRQI6+g46+T83XLKwezEsRM Q4w3hPAoP8OQjeiYDqGlbyltuFIO6DAVKrgAvqilwopHzbE3MOXMat64JAXzpf8g94BV dkDI8bTZto0ZHIrpFzzVGWuWS/GtXi6u13ppYJw62sjn+epNlLpeyHbsSimtsg/y3jFJ iWPSRNsaHwN1pA3c4KzdJxEzR7aDw5E/D/PoQU5cyi5PZ0h5aQsssoDg+CMKUX2YrsEx 5QCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746473986; x=1747078786; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wSTG8SHGTp1glXKC6KqF/opEizUyIdACohXYk1/Zdco=; b=lc8Twt8BFlaLJrokz2XpmaU72FkdGrVWU8xOsvzJZtuiLhjvh4hl6MvZvbPvJDdTHx CD44VZ5rOgYHUXFPCs7coJaae9SB1Uml1/abAL2R9mKmekh5NQoekiLFZu7+Y3PM8TCs //ikb5kPPSSfpGylFhQljtTSFEYMZRm+k10namM7/xrIR14GfMFCbq+sRlCc18fF6xoJ t582Rna82lejJ/9CMRv/DOnMYPx2PIOb2BA1pOC+YG8KzrEpACJDAemsZTBNYoRuH4Ax Ndw0Mht/N0AO0xYX55MnYxQ4rlJr82ROpwGkTdT4ErE2Nnn/25EU1nb0+JcNp8UOu+OP 3Xyg== X-Forwarded-Encrypted: i=1; AJvYcCUmMbxJgW8fQORTO9lK+syuMHmUlnIlwwtyPKfNcJTEN15yEOzwAXqARBdevvK2RQR9POgidOeBhBowKLHv@postgresql.org X-Gm-Message-State: AOJu0YwO8TaluXzsHRyZ05/knSYU1CMNoUmMTrJuCtERCoIhGVJXJowZ uQmnjww1C4bJbGn8iKgB1UT3oBRVm0aYfUYQzvIp6FbW7QM1PqEz41a3R0KSf7DXVSZwUjDiCuu x7y9Qb5FhqCmGLZNHO7JhFlwrjND2z9Sluos= X-Gm-Gg: ASbGncuB6coLKZtkQvmI8llldXaSUBJ+q+VOxbFK6GV8EU9Fe391JDCYwciEVuriXV9 63Cr+5TsyuGJ8MdIJSgpdxS3shL7lEC/pr8ZoihAqireCdLCmyxnMurQiwWpcI28RCW3bedMirY Fe2io6Emts6yeqhxPzCRjxGhUTVQ6MGlALpd/q+zVBApGLM4D3lCEnCYb1 X-Google-Smtp-Source: AGHT+IGH5WRcrrdKvL4pxNKVMUC67dtzfAmWGUKSmSjUdaZUYMD98qYaMFrfyvZ03HkykrkoMtpwuwDrv7TUQz22WoU= X-Received: by 2002:a05:6871:a913:b0:2d6:1e7:f583 with SMTP id 586e51a60fabf-2dab2f6b2d2mr2825138fac.3.1746473986389; Mon, 05 May 2025 12:39:46 -0700 (PDT) MIME-Version: 1.0 References: <984fca80-85a8-4c6f-a5cc-bb860950b435@dunslane.net> <2199758.1744901785@sss.pgh.pa.us> <1ce11d3f-624c-4003-a032-1b10cc138305@dunslane.net> <2814408.1745005558@sss.pgh.pa.us> <2859105.1745015195@sss.pgh.pa.us> <1120735.1745350422@sss.pgh.pa.us> In-Reply-To: <1120735.1745350422@sss.pgh.pa.us> From: Thomas Munro Date: Tue, 6 May 2025 07:39:09 +1200 X-Gm-Features: ATxdqUFLiwEAy8RjLiPfk8DVa7PnFKIqnDAIftnL9oZFk8gl6ALHT7d642nTXdU Message-ID: Subject: Re: disabled SSL log_like tests To: Tom Lane Cc: Andrew Dunstan , PostgreSQL-development , Jacob Champion Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk If you run the not-yet-enabled-by-default OpenBSD CI task on master, ssl/001_ssltests fails in "intermediate client certificate is untrusted", recently uncommented by commit e0f373ee. I think it might be telling us that LibreSSL's x509_store_ctx_get_current_cert() is giving us the client certificate (ie chain depth 0) instead of the intermediate certificate, even though X509_STORE_CTX_get_error_depth() returned 1 as expected. I don't know why it would do that, given the documentation: X509_STORE_CTX_get_current_cert() returns the certificate in ctx which caused the error or NULL if no certificate is relevant. The explanation is probably in here somewhere, but I don't understand these things: https://github.com/openbsd/src/blob/master/lib/libcrypto/x509/x509_vfy.c https://github.com/openssl/openssl/blob/master/crypto/x509/x509_vfy.c [17:55:28.888] # Failed test 'intermediate client certificate is untrusted: log matches' [17:55:28.888] # at /home/postgres/postgres/src/test/perl/PostgreSQL/Test/Cluster.pm line 2667. [17:55:28.888] # '2025-05-05 17:55:28.353 UTC [10009][postmaster] DEBUG: assigned pm child slot 1 for backend [17:55:28.888] # 2025-05-05 17:55:28.354 UTC [10009][postmaster] DEBUG: forked new client backend, pid=27624 socket=8 [17:55:28.888] # 2025-05-05 17:55:28.355 UTC [27624][not initialized] [[unknown]][:0] LOG: connection received: host=localhost port=11357 [17:55:28.888] # 2025-05-05 17:55:28.374 UTC [27624][not initialized] [[unknown]][:0] LOG: could not accept SSL connection: certificate verify failed [17:55:28.888] # 2025-05-05 17:55:28.374 UTC [27624][not initialized] [[unknown]][:0] DETAIL: Client certificate verification failed at depth 1: unable to get local issuer certificate. [17:55:28.888] # Failed certificate data (unverified): subject "/CN=ssltestuser", serial number 2315702411956921344, issuer "/CN=Test CA for PostgreSQL SSL regression test client certs". [17:55:28.888] # 2025-05-05 17:55:28.374 UTC [27624][not initialized] [[unknown]][:0] DEBUG: SSL connection from DN:"(anonymous)" CN:"(anonymous)" [17:55:28.888] # 2025-05-05 17:55:28.377 UTC [10009][postmaster] DEBUG: releasing pm child slot 1 [17:55:28.888] # 2025-05-05 17:55:28.377 UTC [10009][postmaster] DEBUG: client backend (PID 27624) exited with exit code 0 [17:55:28.888] # ' [17:55:28.888] # doesn't match '(?^:Failed certificate data \(unverified\): subject "/CN=Test CA for PostgreSQL SSL regression test client certs", serial number \d+, issuer "/CN=Test root CA for PostgreSQL SSL regression test suite")' [17:55:28.888] # Looks like you failed 1 test of 240. https://cirrus-ci.com/task/4708964002168832?logs=test_world#L345 https://api.cirrus-ci.com/v1/artifact/task/4708964002168832/testrun/build/testrun/ssl/001_ssltests/log/regress_log_001_ssltests https://api.cirrus-ci.com/v1/artifact/task/4708964002168832/testrun/build/testrun/ssl/001_ssltests/log/001_ssltests_primary.log