Fix cert separator (#8837)
Some checks failed
release Linux / build (Release) (push) Has been cancelled
release macOS / build (Release) (push) Has been cancelled
release Windows desktop (Avalonia UI) / build (Release) (push) Has been cancelled
release Windows / build (Release) (push) Has been cancelled
release Linux / rpm (push) Has been cancelled

This commit is contained in:
DHR60 2026-02-25 11:30:29 +00:00 committed by GitHub
parent ac43bb051d
commit 3a5293bf87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -66,7 +66,7 @@ public class Hysteria2Fmt : BaseFmt
if (!item.CertSha.IsNullOrEmpty())
{
var sha = item.CertSha;
var idx = sha.IndexOf('~');
var idx = sha.IndexOf(',');
if (idx > 0)
{
sha = sha[..idx];

View file

@ -218,7 +218,7 @@ public class AddServerViewModel : MyReactiveObject
return;
}
List<string> shaList = new();
List<string> shaList = [];
foreach (var cert in certList)
{
var sha = CertPemManager.GetCertSha256Thumbprint(cert);
@ -228,7 +228,7 @@ public class AddServerViewModel : MyReactiveObject
}
shaList.Add(sha);
}
CertSha = string.Join('~', shaList);
CertSha = string.Join(',', shaList);
}
private async Task FetchCert()