Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130213 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 3ED281A00BC for ; Sun, 1 Mar 2026 19:48:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1772394543; bh=pb98u+Wr0DOg+PJ6uu/8LXpLiuv0F91lki1Pb1AudoI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=oHpxEPluo43A2jWm6bwZ0imR71NkHRZi4Fyp30DK5FWSZ+BS3tnPA6xzU69LwEme5 uaLMZNFIBfEX9X1EAs6FQSYYqkREdkUU+U0nXuwaedO01yv2FdAb7LfPZsNYQeXvuL wpcy2Zn/qv5K2Gc+aEDpNep8MANwiA6US+9GOBxw5ZLZPsdolVXMz+qx6RfzwtivQH aBY3nIbLkrxoIvRRroie2VeC+bFkydOSne4QDPXt5yzA5WT8dpenNdlskeCZzV+7zK tP7pvzRz1CWOjGrx3k8ONsf3RNZOrh909WW1TVO6bbey4tNpLJItIvn7DMLKkDin3P RLtAjHY6kQoFw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C07D918005B for ; Sun, 1 Mar 2026 19:49:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: * X-Spam-Status: No, score=1.7 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_50, DMARC_NONE,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com [209.85.210.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 1 Mar 2026 19:49:02 +0000 (UTC) Received: by mail-ot1-f44.google.com with SMTP id 46e09a7af769-7d598f60eeaso2151312a34.2 for ; Sun, 01 Mar 2026 11:48:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772394537; cv=none; d=google.com; s=arc-20240605; b=jLxB6cdQDe8Xl+75WJyaLVnHk1vk777NdVLxqZmY1JcNcAoNXPxsvyY9F2+Qc4Cztp uVnZ9ZU31BglVycvsSsOoCs1IWqizK5BqFapD5IdKenBPdfs1up2J3JcjGN2my0gc6QR P+5/Fl3xFzdvLbbcu1rDxGLUvkI+5K8VsfxDUsCMv7f+f4Pdsk7WSWESiGKL+RAKx1SM XKpS7b3t4cdyrLbNur0cZWcyY1HEyjyGqgw7Se7vsPxuELXeCP9sTuN/IsM37VDLIcj3 kDcQLT/w2/vHfb8vE9fs2kROPHD19SmpTNi0LGlGhuK0MTomegdAEYeVcFz9QKoadJdD d/Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version; bh=KUZ+VUA9+0pSv4vkW5fsk0DNwac4+VY0FUsZTBIFr1s=; fh=xX59M9k2LJe5CkjPpBTRX27Ve3+5hYeaIKPXnbjUkb8=; b=N66Rf9p2DRJ0PUOanpFVvBol4JHupk78Y26nkCZzbBR6cNoKCArjrhosR6URHhndXJ T10ccuQFrBGvTZnExZ3LYrIk1xvHzxYAhiec+J1eaX4npLM3AnIaZYMSl2hdvcy/xs/E kuKqnTbjUaus/A4JL3XGDfuR28HB49+VmbOsoi1rdgFd1vh32Td6BP1nrKQQ6fcfc4a/ vWJv8s+d0wRQZqu6nMoyGv90u59Z7rCYfrje2GER0FYtQMxfNxzEvr25CuxooBkyEbRY 48zYW0bOUcftGC/9NGPec3cE/dB3XFFbicOMmOp6Bpr6VgSgc7th7MoGZtkS0lTu32BB 3o2Q==; darn=lists.php.net ARC-Authentication-Results: i=1; mx.google.com; arc=none X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772394537; x=1772999337; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=KUZ+VUA9+0pSv4vkW5fsk0DNwac4+VY0FUsZTBIFr1s=; b=qRQDzJRzaQP4Cf6uYyp4XhlmxnvBwySMEpZA+xyLLRPSFw1hKb/hd2IdaTOkcQhixT Kcs18qk/YgmjzE43iWO5gG2xGPtUK1EzLOZuv7DjidOTKNN6iyUjbWrEKD+DZM738YlM hvmf9SCh0AvI20ZQ5Vha5CYbuztE5h88Yoj87KB8WuF94WNY/A9GdAL3xh4pKyx5k9Lm uNq0rfvFTUtaq+0eQ/Iw/sqOxI/n4cCRqs8pQx1cbTFgzzBaqwStpDSgC/FIB/YblE80 2Mizxt05PhEgnYilCPu0BBcwoDrEypTPl0Fk7g/gRiiR8mXojR1R506Btn36Ituq8BNs axNw== X-Gm-Message-State: AOJu0YysS+olugpvWoGvIh1tnAT2pQIKS2keYoice3n3J8bEevcJq9Sc CZuQlw+9HAVX4FqvRjYiELmARJM+/6N+KETkLVu0xj43RTpyZyfiP1CIlzpVgbh9vVA9MY0f/I1 p/s0VLa/H/OW4qyPm3EJiv0GEDDuTZgast5xP X-Gm-Gg: ATEYQzwgTLAjphOo9mOM0GvqoafdLpUfkMSJnWa1mWeemiIg5Vlv6P12Zs/e3yOrAcw 5WU8Mn4AKsP9cve2L5ZqAqMePi/F8aTmB1oDUKMr9uo893PVjoyCl8AsaI+jXsbDyzO6n5hyAAA lLwmcMSTahAmMFNTyftAWpzKo0PmoutAsNpC6FFZ+OiPLNVyP2jXLHQlXsSnzZWnM7vvNMTpj+2 /STOEuQ8clD5n8Bi8GNWD7IXpw0XghH7dcrJu2GMzCZqGdA1sz5gcFz/76tla/AZE9zN+dWf8rH +bdqcZo= X-Received: by 2002:a05:6820:2299:b0:659:9a49:8eff with SMTP id 006d021491bc7-679fae087b3mr5566844eaf.16.1772394536753; Sun, 01 Mar 2026 11:48:56 -0800 (PST) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: <2d741c45-9c92-4404-a0d5-02bf26a557b1@bastelstu.be> In-Reply-To: Date: Sun, 1 Mar 2026 20:48:45 +0100 X-Gm-Features: AaiRm51Fx0QxavRlbdku6pjMhKDQ_APILRu2ZL5KC9MXESPCWVekJI25KXBRdtY Message-ID: Subject: Re: [PHP-DEV] [RFC] TLS Session Resumption Support for Streams To: =?UTF-8?Q?Tim_D=C3=BCsterhus?= Cc: PHP internals list Content-Type: multipart/alternative; boundary="000000000000c3dde7064bfbc2e5" From: bukka@php.net (Jakub Zelenka) --000000000000c3dde7064bfbc2e5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Thanks for the feedback. On Sun, Mar 1, 2026 at 2:05=E2=80=AFPM Tim D=C3=BCsterhus wrote: > > For OpenSSLSession::import() and ::export() however, the RFC mentions > \Exception being thrown on failure. According to the =E2=80=9CThrowable= =E2=80=9D policy > ( > https://github.com/php/policies/blob/main/coding-standards-and-naming.rst= #throwables), > > this should be an extension-specific Exception. Since the hierarchy to > use is clearly specified in the policy, adding: > > class \Openssl\OpensslException extends \Exception { } > class \Openssl\OpensslError extends \Error { } > > can be done without an RFC. > > Then the ::import() function can use `class > \Openssl\InvalidResumptionDataException extends > \Openssl\OpensslExceptoin { }` or similar and for ::export() just using > `OpensslException` directly is probably okay. > > For the OpenSSLSession class, I leave it up to you whether it makes > sense to also move it into the `Openssl` namespace or not (as > Openssl\Session). The policy leaves some freedom here, since it's not > directly related to any of the existing classes: > > > https://github.com/php/policies/blob/main/coding-standards-and-naming.rst= #existing-non-namespaced-symbols-and-consistency > > The policy recommends consistency with existing symbols and there are already OpenSSLCertificate, OpenSSLCertificateSigningRequest and OpenSSLAsymmetricKey. So I think we should stick with no namespace here and calls it OpenSSLSession and OpenSSLException. I will introduce that exception as I agree it makes more sense. Kind regards, Jakub --000000000000c3dde7064bfbc2e5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

Thanks for the feedback.=

On Sun, Mar 1, 2026 at 2:05=E2=80=AFPM Tim D=C3=BCste= rhus <tim@bastelstu.be> wrote= :

For OpenSSLSession::import() and ::export() however, the RFC mentions
\Exception being thrown on failure. According to the =E2=80=9CThrowable=E2= =80=9D policy
(https://github.= com/php/policies/blob/main/coding-standards-and-naming.rst#throwables),=
this should be an extension-specific Exception. Since the hierarchy to
use is clearly specified in the policy, adding:

=C2=A0 =C2=A0 =C2=A0class \Openssl\OpensslException extends \Exception { }<= br> =C2=A0 =C2=A0 =C2=A0class \Openssl\OpensslError extends \Error { }

can be done without an RFC.

Then the ::import() function can use `class
\Openssl\InvalidResumptionDataException extends
\Openssl\OpensslExceptoin { }` or similar and for ::export() just using `OpensslException` directly is probably okay.

For the OpenSSLSession class, I leave it up to you whether it makes
sense to also move it into the `Openssl` namespace or not (as
Openssl\Session). The policy leaves some freedom here, since it's not <= br> directly related to any of the existing classes:

https://github.com/php/policies/blob/main/coding-stand= ards-and-naming.rst#existing-non-namespaced-symbols-and-consistency
=

The policy recommends consistency with= existing symbols and there are already=C2=A0OpenSSLCertificate,=C2=A0OpenS= SLCertificateSigningRequest and OpenSSLAsymmetricKey. So I think we should = stick with no namespace here and calls it=C2=A0OpenSSLSession and=C2=A0Open= SSLException. I will introduce that exception as I agree it makes more sens= e.

Kind regards,

Jakub
--000000000000c3dde7064bfbc2e5--