Esempio n. 1
0
        private string WriteZippedCertsToString(int userid)
        {
            var dl        = new Majorsilence.Vpn.Logic.OpenVpn.CertsOpenVpnDownload();
            var fileBytes = dl.UploadToClient(userid);

            return(Convert.ToBase64String(fileBytes));
        }
Esempio n. 2
0
        public FileResult DownloadOpenVpnCert()
        {
            if (sessionInstance.LoggedIn == false)
            {
                return(null);
            }

            var dl        = new Majorsilence.Vpn.Logic.OpenVpn.CertsOpenVpnDownload();
            var fileBytes = dl.UploadToClient(sessionInstance.UserId);

            return(File(fileBytes, "application/zip", "Certs.zip"));
        }