fix(setupcheck): Clear OpenSSL errors before executing

Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
This commit is contained in:
Marcel Müller
2025-07-15 21:07:07 +02:00
parent a22d5cf948
commit 4a2fb6a723

View File

@ -583,6 +583,9 @@ class Config {
}
public function deriveSignalingTokenPublicKey(string $privateKey, string $alg): string {
// Clear any existing (unrelated) OpenSSL errors
while (openssl_error_string() !== false);
if (str_starts_with($alg, 'ES') || str_starts_with($alg, 'RS')) {
$opensslPrivateKey = openssl_pkey_get_private($privateKey);
$this->throwOnOpensslError();