diff --git a/csharp/app/OpenVpnCertificatesServer/Program.cs b/csharp/app/OpenVpnCertificatesServer/Program.cs index fa60ee6de..3d765b2cd 100644 --- a/csharp/app/OpenVpnCertificatesServer/Program.cs +++ b/csharp/app/OpenVpnCertificatesServer/Program.cs @@ -1,21 +1,15 @@ -using InnovEnergy.Lib.Protocols.DBus.Utils; -using InnovEnergy.Lib.Utils; +using InnovEnergy.Lib.Utils; using InnovEnergy.Lib.Victron.VictronVRM; - -namespace InnovEnergy.OpenVpnCertificatesServer; - -using System; -using System.Collections.Generic; +using InnovEnergy.OpenVpnCertificatesServer.PKI; using System.Diagnostics; -using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; using Flurl; using ICSharpCode.SharpZipLib.Tar; -using PKI; using Org.BouncyCastle.Crypto; -using static PKI.CertificateAuthority; + +using static InnovEnergy.OpenVpnCertificatesServer.PKI.CertificateAuthority; + +namespace InnovEnergy.OpenVpnCertificatesServer; // dotnet publish OpenVpnCertificatesServer.csproj -c Release -r linux-x64 -p:PublishSingleFile=true --self-contained true && scp bin/Release/net6.0/linux-x64/publish/OpenVpnCertificatesServer ig@salidomo.innovenergy.ch:~/get_cert/get_cert @@ -163,9 +157,9 @@ public static class Program foreach (var installation in installations) { - var details = await vrm.GetDetails(installation); + var details = await installation.GetDetails(); - var id = details.MachineSerial; + var id = details.MachineSerial(); if (id == ccdName) return (ccdName, installation.Name);