From 7a2e161ed938ca5ec5bf4b3e5b0b57943fad1eeb Mon Sep 17 00:00:00 2001 From: Romulus-Emanuel Ruja Date: Mon, 7 Oct 2024 16:07:41 +0300 Subject: [PATCH 1/8] implement azure integration --- .gitignore | 3 +- .../Extensions/ConfigurationExtensions.cs | 28 +++++--- Enigma5.App/App.cs | 16 ++++- Enigma5.App/Enigma5.App.csproj | 6 ++ .../Handlers/CleanupMessagesHandler.cs | 13 ++-- .../Handlers/CleanupSharedDataHandler.cs | 6 +- Enigma5.App/StartupConfiguration.cs | 19 ++++-- Enigma5.App/appsettings.Development.json | 37 ++++++++++ Enigma5.App/appsettings.Production.json | 37 ++++++++++ Enigma5.App/appsettings.json | 67 +++++++++---------- Enigma5.App/generate_keys.sh | 4 +- Enigma5.App/private_key.pem | 30 --------- Enigma5.App/public_key.pem | 9 --- Enigma5.Security/AzureClient.cs | 47 +++++++++++++ Enigma5.Security/AzureKeyReader.cs | 55 +++++++++++++++ Enigma5.Security/AzurePassphraseReader.cs | 34 ++++++++++ Enigma5.Security/Contracts/IKeysProvider.cs | 8 --- Enigma5.Security/Enigma5.Security.csproj | 2 + .../{KeysProvider.cs => KeysReader.cs} | 0 19 files changed, 310 insertions(+), 111 deletions(-) create mode 100644 Enigma5.App/appsettings.Development.json create mode 100644 Enigma5.App/appsettings.Production.json delete mode 100644 Enigma5.App/private_key.pem delete mode 100644 Enigma5.App/public_key.pem create mode 100644 Enigma5.Security/AzureClient.cs create mode 100644 Enigma5.Security/AzureKeyReader.cs create mode 100644 Enigma5.Security/AzurePassphraseReader.cs rename Enigma5.Security/{KeysProvider.cs => KeysReader.cs} (100%) diff --git a/.gitignore b/.gitignore index 27e5721..ba9f76e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ */bin/* */obj/* *.sqlite* -Enigma5.App/logs/* \ No newline at end of file +Enigma5.App/logs/* +*.pem \ No newline at end of file diff --git a/Enigma5.App.Common/Extensions/ConfigurationExtensions.cs b/Enigma5.App.Common/Extensions/ConfigurationExtensions.cs index 3947a13..7bc7640 100644 --- a/Enigma5.App.Common/Extensions/ConfigurationExtensions.cs +++ b/Enigma5.App.Common/Extensions/ConfigurationExtensions.cs @@ -8,29 +8,32 @@ public static List GetPeers(this IConfiguration configuration) => configuration.GetSection("Peers").Get>() ?? []; public static string? GetLocalListenAddress(this IConfiguration configuration) - => configuration.GetValue("Kestrel:EndPoints:Http:Url"); + => configuration.GetValue("Kestrel:EndPoints:Http:Url", null); public static string? GetHostname(this IConfiguration configuration) - => configuration.GetValue("Hostname"); + => configuration.GetValue("Hostname", null); public static string? GetPrivateKeyPath(this IConfiguration configuration) - => configuration.GetValue("PrivateKeyPath"); + => configuration.GetValue("PrivateKeyPath", null); public static string? GetPublicKeyPath(this IConfiguration configuration) - => configuration.GetValue("PublicKeyPath"); + => configuration.GetValue("PublicKeyPath", null); + + public static string? GetPassphraseKeyPath(this IConfiguration configuration) + => configuration.GetValue("PublicKeyPath", null); public static bool GetRetryConnection(this IConfiguration configuration) - => configuration.GetValue("RetryConnection"); + => configuration.GetValue("RetryConnection", false); public static int GetConnectionRetriesCount(this IConfiguration configuration) - => configuration.GetValue("ConnectionRetriesCount"); + => configuration.GetValue("ConnectionRetriesCount", 0); public static int GetDelayBetweenConnectionRetries(this IConfiguration configuration) - => configuration.GetValue("DelayBetweenConnectionRetries"); + => configuration.GetValue("DelayBetweenConnectionRetries", 0); public static TimeSpan? GetNonActiveLeafsLifetime(this IConfiguration configuration) { - var value = configuration.GetValue("NonActiveLeafsLifetime"); + var value = configuration.GetValue("NonActiveLeafsLifetime", null); if (value is null) { @@ -44,4 +47,13 @@ public static int GetDelayBetweenConnectionRetries(this IConfiguration configura return null; } + + public static string? GetAzureVaultUrl(this IConfiguration configuration) + => configuration.GetValue("AzureVaultUrl", null); + + public static bool UseAzureVaultForKeys(this IConfiguration configuration) + => configuration.GetValue("UseAzureVaultForKeys", false); + + public static bool UseAzureVaultForPassphrase(this IConfiguration configuration) + => configuration.GetValue("UseAzureVaultForPassphrase", false); } diff --git a/Enigma5.App/App.cs b/Enigma5.App/App.cs index 6e61494..da4911f 100644 --- a/Enigma5.App/App.cs +++ b/Enigma5.App/App.cs @@ -1,5 +1,8 @@ -using Microsoft.AspNetCore.Builder; +using Enigma5.App.Data; +using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Serilog; @@ -9,12 +12,19 @@ public class App { public static void Main(string[] args) { - CreateHostBuilder(args).Build().Run(); + var app = CreateHostBuilder(args).Build(); + + using var scope = app.Services.CreateScope(); + var dbContext = scope.ServiceProvider.GetRequiredService(); + dbContext.Database.Migrate(); + + app.Run(); } public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) - .UseSerilog((context, config) => { + .UseSerilog((context, config) => + { config.ReadFrom.Configuration(context.Configuration); config.WriteTo.Console(); }) diff --git a/Enigma5.App/Enigma5.App.csproj b/Enigma5.App/Enigma5.App.csproj index 497352f..3c447e3 100644 --- a/Enigma5.App/Enigma5.App.csproj +++ b/Enigma5.App/Enigma5.App.csproj @@ -35,6 +35,12 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + PreserveNewest diff --git a/Enigma5.App/Resources/Handlers/CleanupMessagesHandler.cs b/Enigma5.App/Resources/Handlers/CleanupMessagesHandler.cs index eafcbfb..663b381 100644 --- a/Enigma5.App/Resources/Handlers/CleanupMessagesHandler.cs +++ b/Enigma5.App/Resources/Handlers/CleanupMessagesHandler.cs @@ -1,6 +1,7 @@ using Enigma5.App.Data; using Enigma5.App.Resources.Commands; using MediatR; +using Microsoft.EntityFrameworkCore; namespace Enigma5.App.Resources.Handlers; @@ -11,14 +12,12 @@ public class CleanupMessagesHandler(EnigmaDbContext context) public async Task Handle(CleanupMessagesCommand command, CancellationToken cancellationToken) { - var time = DateTime.Now - command.TimeSpan; - - var messages = _context.Messages - .Where(item => + // TODO: refactor this query + var time = DateTimeOffset.Now - command.TimeSpan; + var messages = await _context.Messages.ToListAsync(cancellationToken: cancellationToken); + _context.Messages.RemoveRange(messages.Where(item => time > item.DateReceived || - (command.RemoveDelivered && item.Sent)); - - _context.Messages.RemoveRange(messages); + (command.RemoveDelivered && item.Sent))); await _context.SaveChangesAsync(cancellationToken); } } diff --git a/Enigma5.App/Resources/Handlers/CleanupSharedDataHandler.cs b/Enigma5.App/Resources/Handlers/CleanupSharedDataHandler.cs index b486c1e..6c3e76c 100644 --- a/Enigma5.App/Resources/Handlers/CleanupSharedDataHandler.cs +++ b/Enigma5.App/Resources/Handlers/CleanupSharedDataHandler.cs @@ -1,6 +1,7 @@ using Enigma5.App.Data; using Enigma5.App.Resources.Commands; using MediatR; +using Microsoft.EntityFrameworkCore; namespace Enigma5.App.Resources.Handlers; @@ -11,9 +12,10 @@ public class CleanupSharedDataHandler(EnigmaDbContext context) public async Task Handle(CleanupSharedDataCommand request, CancellationToken cancellationToken) { + // TODO: refactor this query var time = DateTimeOffset.Now - request.TimeSpan; - var sharedData = _context.SharedData.Where(item => time > item.DateCreated); - _context.RemoveRange(sharedData); + var sharedData = await _context.SharedData.ToListAsync(cancellationToken: cancellationToken); + _context.RemoveRange(sharedData.Where(item => time > item.DateCreated)); await _context.SaveChangesAsync(cancellationToken); } } diff --git a/Enigma5.App/StartupConfiguration.cs b/Enigma5.App/StartupConfiguration.cs index 726a21a..5a61a6c 100644 --- a/Enigma5.App/StartupConfiguration.cs +++ b/Enigma5.App/StartupConfiguration.cs @@ -5,7 +5,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.SignalR; using Microsoft.Extensions.DependencyInjection; -using Hangfire; using Microsoft.Extensions.Configuration; using Enigma5.App.Resources.Commands; using Enigma5.App.Extensions; @@ -22,6 +21,7 @@ using Enigma5.App.Common.Extensions; using Enigma5.Security; using Enigma5.Security.Contracts; +using Hangfire; namespace Enigma5.App; @@ -41,18 +41,22 @@ public void ConfigureServices(IServiceCollection services) options.AddFilter(); options.AddFilter(); }); - + services.AddSingleton(); services.AddSingleton(); - services.AddTransient(); - services.AddTransient(); services.AddSingleton(); services.AddSingleton(); - services.AddTransient(); - + services.AddSingleton(); + + services.AddTransient(typeof(IKeysReader), _configuration.UseAzureVaultForKeys() ? typeof(AzureKeysReader) : typeof(KeysReader)); + services.AddTransient(typeof(IPassphraseProvider), _configuration.UseAzureVaultForPassphrase() ? typeof(AzurePassphraseReader) : typeof(CommandLinePassphraseReader)); + services.AddTransient(); + services.SetupHangfire(); services.SetupDbContext(_configuration); services.SetupMediatR(); + + services.BuildServiceProvider(); } public static void Configure(IApplicationBuilder app, IServiceProvider serviceProvider) @@ -82,7 +86,8 @@ public static void Configure(IApplicationBuilder app, IServiceProvider servicePr }); #if DEBUG - endpoints.MapGet(Endpoints.VerticesEndpoint, (NetworkGraph networkGraph) => { + endpoints.MapGet(Endpoints.VerticesEndpoint, (NetworkGraph networkGraph) => + { return Results.Ok(networkGraph.Vertices); }); #endif diff --git a/Enigma5.App/appsettings.Development.json b/Enigma5.App/appsettings.Development.json new file mode 100644 index 0000000..ae322b1 --- /dev/null +++ b/Enigma5.App/appsettings.Development.json @@ -0,0 +1,37 @@ +{ + "ConnectionStrings": { + "DbConnectionString": "data source=enigmaDb.sqlite" + }, + "Kestrel": { + "EndPoints": { + "Http": { + "Url": "http://localhost:8080" + } + } + }, + "UseAzureVaultForKeys": false, + "UseAzureVaultForPassphrase": false, + "Hostname": "http://localhost:8080", + "PrivateKeyPath": "private-key.pem", + "PublicKeyPath": "public-key.pem", + "Serilog": { + "MinimumLevel": { + "Default": "Debug", + "Override": { + "Microsoft": "Warning", + "Microsoft.AspNetCore.Hosting.Diagnostics": "Error", + "Microsoft.Hosting.Lifetime": "Warning" + } + }, + "WriteTo": [ + { + "Name": "File", + "Args": { + "path": "logs/logs-.txt", + "rollingInterval": "Day", + "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact" + } + } + ] + } +} diff --git a/Enigma5.App/appsettings.Production.json b/Enigma5.App/appsettings.Production.json new file mode 100644 index 0000000..ce83eb9 --- /dev/null +++ b/Enigma5.App/appsettings.Production.json @@ -0,0 +1,37 @@ +{ + "ConnectionStrings": { + "DbConnectionString": "data source=enigmaDb.sqlite" + }, + "Kestrel": { + "EndPoints": { + "Http": { + "Url": "http://localhost:8080" + } + } + }, + "UseAzureVaultForKeys": false, + "UseAzureVaultForPassphrase": false, + "Hostname": "http://localhost:8080", + "PrivateKeyPath": "private-key.pem", + "PublicKeyPath": "public-key.pem", + "Serilog": { + "MinimumLevel": { + "Default": "Error", + "Override": { + "Microsoft": "Warning", + "Microsoft.AspNetCore.Hosting.Diagnostics": "Error", + "Microsoft.Hosting.Lifetime": "Warning" + } + }, + "WriteTo": [ + { + "Name": "File", + "Args": { + "path": "logs/logs-.txt", + "rollingInterval": "Day", + "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact" + } + } + ] +} +} diff --git a/Enigma5.App/appsettings.json b/Enigma5.App/appsettings.json index ebfdb23..ce83eb9 100644 --- a/Enigma5.App/appsettings.json +++ b/Enigma5.App/appsettings.json @@ -1,38 +1,37 @@ { - "ConnectionStrings": { - "DbConnectionString": "data source=enigmaDb.sqlite" - }, - "Peers": [ - "http://localhost:5555" - ], - "Kestrel": { - "EndPoints": { - "Http": { - "Url": "http://localhost:5001" - } - } - }, - "Hostname": "http://localhost:5001", - "PrivateKeyPath": "private_key.pem", - "PublicKeyPath": "public_key.pem", - "Serilog": { - "MinimumLevel": { - "Default": "Debug", - "Override": { - "Microsoft": "Warning", - "Microsoft.AspNetCore.Hosting.Diagnostics": "Error", - "Microsoft.Hosting.Lifetime": "Warning" + "ConnectionStrings": { + "DbConnectionString": "data source=enigmaDb.sqlite" + }, + "Kestrel": { + "EndPoints": { + "Http": { + "Url": "http://localhost:8080" + } } - }, - "WriteTo": [ - { - "Name": "File", - "Args": { - "path": "logs/logs-.txt", - "rollingInterval": "Day", - "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact" - } + }, + "UseAzureVaultForKeys": false, + "UseAzureVaultForPassphrase": false, + "Hostname": "http://localhost:8080", + "PrivateKeyPath": "private-key.pem", + "PublicKeyPath": "public-key.pem", + "Serilog": { + "MinimumLevel": { + "Default": "Error", + "Override": { + "Microsoft": "Warning", + "Microsoft.AspNetCore.Hosting.Diagnostics": "Error", + "Microsoft.Hosting.Lifetime": "Warning" + } + }, + "WriteTo": [ + { + "Name": "File", + "Args": { + "path": "logs/logs-.txt", + "rollingInterval": "Day", + "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact" } - ] - } + } + ] +} } diff --git a/Enigma5.App/generate_keys.sh b/Enigma5.App/generate_keys.sh index da932a5..fd7cdbf 100755 --- a/Enigma5.App/generate_keys.sh +++ b/Enigma5.App/generate_keys.sh @@ -1,2 +1,2 @@ -openssl genrsa -aes256 -out private_key.pem $1 -openssl rsa -in private_key.pem -outform PEM -pubout -out public_key.pem \ No newline at end of file +openssl genrsa -aes256 -out private-key.pem $1 +openssl rsa -in private-key.pem -outform PEM -pubout -out public-key.pem \ No newline at end of file diff --git a/Enigma5.App/private_key.pem b/Enigma5.App/private_key.pem deleted file mode 100644 index 5a8158d..0000000 --- a/Enigma5.App/private_key.pem +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIIFLTBXBgkqhkiG9w0BBQ0wSjApBgkqhkiG9w0BBQwwHAQIPmxfZbRLwAwCAggA -MAwGCCqGSIb3DQIJBQAwHQYJYIZIAWUDBAEqBBAWiD3pAV7HIV/iFlVNexzxBIIE -0LXzUXRP9kfcV4O6bqIFX8aHB1p9sRkYJPgIQDcAxZR2UEBWLO7dEOT/Gx3ynnLp -NP3J0Z5P+dHkxirN/orpa4PbJdLowmRouoO3aUdp9DSTHH7rbg7xM6ltRj9TtHBw -WhD3fapnWalHJNH39SHdFfXaYOfiiYXNoIVK/lJBw1UOfGlqOXcA935et3MIrlVY -9bHoPQ0HTYhIkpw3DDHG2rcn5byJ996L0yasnp85K3+SpCx0KROwGoNPd9mkvYrM -xs7zB3s8ij1/9tUkaYBpD5OYvaS08tZRA/4hL0Qe7gaTNddcrorhoNU2bAd1Kcwk -RtAhy8+qkCaqWezsIZiw1rf6t6KSfSqfa9elrCpUQ0VZR8W1yR85Z4ca7gAWiLrW -WFzqWwV7Xq3/FPCRolwxvy6KV5vD8mLOZDLmIeT5YLwxi26R+94r7dhIsvkrz0zc -x369T97guAyFsXUo7i/TqGgzGruLGtTYDlS+zlj6c23R56XaHvR3jJsufb4aPt7L -Z12pwLcyC8xq9/KmdRn93i1mr8VKxZS9BDD/ceij6H7zkAF3HTZrAJEAVOpaw3GM -jOnn6zMnlrGVXca7Tn/KNLRJuOGmb+ad1exmA8zgSnO+nWeJFTAHBSMn2GDi5yxF -k0wlUmtuVeo5RLdWUSQ15Oz20SbAbhpXqv3MRL1FL3w5zenMsXFrsemTMYsbsG8j -agy2zoBJHZDbuq4FrHUXejQTtKTgM40ggEC8P/UPo6O5IqdUt6+wKentrDi4wQd7 -sTMYF6nnu2MNKXJNtHkp19dVOTu4Avet/kdYDE6cTThi9q2zZjW7R3KBPIjzTxT3 -rRn4FcPfiw88m9DJFELGlFMaQXxSXcU0LpOqH8CYnRQrq3rDE3LMaCWu1wt7mitk -SxzREVHzFbskpwKadi/udDlcCwUk4AEStar6ihNNF7wH+zurSs8ibfKlS+XY4jqd -Px7lzIHdNfRfNbD5TL32AqSgSyVtD9AxcAAn676TtBcJs4m+759Om4/VjSNIB9ap -XMHGwqJ40AOdsTQIBFUpccT+Z6JarZejcrk5/L5+sYKoUCoBHg3/VouUPASxcNBA -9OO1BcuPcwsSPG/+cFsFBNAGjJT1HZ2+f9xuEfKv/FqNGfYN9ZDHFedEDsElbzRH -foVoH1UX7SBgmmmxuBzZ4tiUDqQnyUI8mBj8vgqVE0tHicSY41RiOcFMhGyhHlQ4 -X/WkgPeFmeC8rP2b5LasF1wEv4wJ5aaWtTOPE+QMg0+oc6xKw63ZOYOwF27naCjY -iLJFdriCxkaIYpHJbpIHZp56dTnozrQ2xaAVjJqHeb7KqS5CQOHuVwYIQ7FE3pnv -DZMm4VE5RHi1XozVQi7y59h4t3JJvAj1eXC73mrKzr1HDH009/8+NfuihpnYA3Yf -8bQGHcdHo+wCbRn6ngbQIqsXSxccXl/iFn2UUR1sJI3J0HMIqabNGS08T0MVc45s -6gjYuNOT6NSdgeZGnKxeFlucWWqwoYQFU+SNFbGeGVoO1+mkOmwlZkrPJZ5IDysN -SCjCMdbNTl+aayGMvPYz9yAQ7t+3s5HZRsXnQ3J7GGn/Hgq3UylmNCqhvvm0Sfa8 -E9Qah5oyyKbfo92zlisfGkIX+G48WFBT7XsUdtTdutOn ------END ENCRYPTED PRIVATE KEY----- diff --git a/Enigma5.App/public_key.pem b/Enigma5.App/public_key.pem deleted file mode 100644 index c007789..0000000 --- a/Enigma5.App/public_key.pem +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnbonLMTFsr8AdAZiT5QN -+4UrCB9pi8NhVGLiysUI9QFmFoGKTVKElZkqkuHIPGRV5iTA3IFpbklVddyKWe0W -V/Mb3B1OjkISe6nOj3ZqAvGWnAH52GtfelBV7Z+HI3a3fZpDLI2//ZsJRpyxyjg6 -Zonktfj06yC4YseWtvnRtZW1FFt23tXpRXasN0K6DsegoIe/jLde4iab2GYxb8On -mSh2/32snemPmeK5DAWwq1Obj068mykYD/2K4dAG2KyfQpDZRZOI++EyYPsEkCmx -EboZvc+1dhpzUVoR3fEiFLZPV3IpMjuG1bE5LD6vaUbN9Yuv4ycwaYC75t6pIowR -fwIDAQAB ------END PUBLIC KEY----- diff --git a/Enigma5.Security/AzureClient.cs b/Enigma5.Security/AzureClient.cs new file mode 100644 index 0000000..5e8104e --- /dev/null +++ b/Enigma5.Security/AzureClient.cs @@ -0,0 +1,47 @@ +using Azure.Identity; +using Azure.Security.KeyVault.Secrets; +using Enigma5.App.Common.Extensions; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; + +namespace Enigma5.Security; + +public class AzureClient(IConfiguration configuration, ILogger logger) +{ + private static readonly string KEYS_LOCATION_NOT_PROVIDED = "Keys location url not provided."; + + private readonly IConfiguration _configuration = configuration; + + private readonly ILogger _logger = logger; + + private string Url + { + get + { + try + { + return _configuration.GetAzureVaultUrl() ?? throw new Exception(KEYS_LOCATION_NOT_PROVIDED); + } + catch (Exception ex) + { + _logger.LogCritical(ex, "Fatal error encountered while trying to retrieve keys location from config."); + throw; + } + } + } + + private SecretClient SecretClient => new(new Uri(Url), new DefaultAzureCredential()); + + public string GetSecret(string name, string? version = null, CancellationToken cancellationToken = default) + { + try + { + return SecretClient.GetSecret(name, version, cancellationToken).Value.Value; ; + } + catch (Exception ex) + { + _logger.LogCritical(ex, "Critical error encountered while trying to read secret from vault."); + throw; + } + } +} diff --git a/Enigma5.Security/AzureKeyReader.cs b/Enigma5.Security/AzureKeyReader.cs new file mode 100644 index 0000000..2a7e858 --- /dev/null +++ b/Enigma5.Security/AzureKeyReader.cs @@ -0,0 +1,55 @@ +using Enigma5.Security.Contracts; +using Microsoft.Extensions.Configuration; +using Enigma5.App.Common.Extensions; +using System.Text; +using Microsoft.Extensions.Logging; + +namespace Enigma5.Security; + +public class AzureKeysReader( + IConfiguration configuration, + AzureClient azureClient, + ILogger logger) : IKeysReader +{ + private static readonly string PUBLIC_KEY_SECRET_NAME_NOT_PROVIDED = "Public key secret name not provided."; + + private static readonly string PRIVATE_KEY_SECRET_NAME_NOT_PROVIDED = "Private key secret name not provided."; + + private readonly IConfiguration _configuration = configuration; + + private readonly ILogger _logger = logger; + + private readonly AzureClient _azureClient = azureClient; + + public byte[] PrivateKey => ReadPrivateKey(); + + public string PublicKey => ReadPublicKey(); + + private string ReadPublicKey() + { + try + { + var publicKeyPath = _configuration.GetPublicKeyPath() ?? throw new Exception(PUBLIC_KEY_SECRET_NAME_NOT_PROVIDED); + return _azureClient.GetSecret(publicKeyPath); + } + catch (Exception ex) + { + _logger.LogCritical(ex, "Critical error occurred while reading public key."); + throw; + } + } + + private byte[] ReadPrivateKey() + { + try + { + var publicKeyPath = _configuration.GetPrivateKeyPath() ?? throw new Exception(PRIVATE_KEY_SECRET_NAME_NOT_PROVIDED); + return Encoding.UTF8.GetBytes(_azureClient.GetSecret(publicKeyPath)); + } + catch (Exception ex) + { + _logger.LogCritical(ex, "Critical error occurred while reading private key."); + throw; + } + } +} diff --git a/Enigma5.Security/AzurePassphraseReader.cs b/Enigma5.Security/AzurePassphraseReader.cs new file mode 100644 index 0000000..58b62ce --- /dev/null +++ b/Enigma5.Security/AzurePassphraseReader.cs @@ -0,0 +1,34 @@ +using Enigma5.App.Common.Extensions; +using Enigma5.App.Security.Contracts; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; + +namespace Enigma5.Security; + +public class AzurePassphraseReader( + IConfiguration configuration, + AzureClient azureClient, + ILogger logger) : IPassphraseProvider +{ + private static readonly string PASSPHRASE_NAME_NOT_PROVIDED = "Passphrase name not provided"; + + private readonly IConfiguration _configuration = configuration; + + private readonly ILogger _logger = logger; + + private readonly AzureClient _azureClient = azureClient; + + public char[] ProvidePassphrase() + { + try + { + var passphrasePath = _configuration.GetPassphraseKeyPath() ?? throw new Exception(PASSPHRASE_NAME_NOT_PROVIDED); + return _azureClient.GetSecret(passphrasePath).ToCharArray(); + } + catch (Exception ex) + { + _logger.LogCritical(ex, "Critical error encountered while trying to read passphrase from vault."); + throw; + } + } +} diff --git a/Enigma5.Security/Contracts/IKeysProvider.cs b/Enigma5.Security/Contracts/IKeysProvider.cs index 7328dc1..ae42924 100644 --- a/Enigma5.Security/Contracts/IKeysProvider.cs +++ b/Enigma5.Security/Contracts/IKeysProvider.cs @@ -2,14 +2,6 @@ public interface IKeysReader { - public string PublicKeyPath { get; } - - public string PrivateKeyPath { get; } - - public bool PublicKeyFileExists { get; } - - public bool PrivateKeyFileExists { get; } - public byte[] PrivateKey { get; } public string PublicKey { get; } diff --git a/Enigma5.Security/Enigma5.Security.csproj b/Enigma5.Security/Enigma5.Security.csproj index 1c47bd6..c720d7f 100644 --- a/Enigma5.Security/Enigma5.Security.csproj +++ b/Enigma5.Security/Enigma5.Security.csproj @@ -7,6 +7,8 @@ + + diff --git a/Enigma5.Security/KeysProvider.cs b/Enigma5.Security/KeysReader.cs similarity index 100% rename from Enigma5.Security/KeysProvider.cs rename to Enigma5.Security/KeysReader.cs From 4a764fc01e53219b44dd056c2aeea5ae8b95971a Mon Sep 17 00:00:00 2001 From: Romulus-Emanuel Ruja Date: Mon, 7 Oct 2024 16:59:25 +0300 Subject: [PATCH 2/8] fix config extension function --- Enigma5.App.Common/Extensions/ConfigurationExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Enigma5.App.Common/Extensions/ConfigurationExtensions.cs b/Enigma5.App.Common/Extensions/ConfigurationExtensions.cs index 7bc7640..b0698f3 100644 --- a/Enigma5.App.Common/Extensions/ConfigurationExtensions.cs +++ b/Enigma5.App.Common/Extensions/ConfigurationExtensions.cs @@ -20,7 +20,7 @@ public static List GetPeers(this IConfiguration configuration) => configuration.GetValue("PublicKeyPath", null); public static string? GetPassphraseKeyPath(this IConfiguration configuration) - => configuration.GetValue("PublicKeyPath", null); + => configuration.GetValue("Passphrase", null); public static bool GetRetryConnection(this IConfiguration configuration) => configuration.GetValue("RetryConnection", false); From f395ceef9157313746aa7f540261bc7778c12e5f Mon Sep 17 00:00:00 2001 From: Romulus-Emanuel Ruja Date: Wed, 9 Oct 2024 18:49:34 +0300 Subject: [PATCH 3/8] update .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ba9f76e..e03e3b0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ */obj/* *.sqlite* Enigma5.App/logs/* -*.pem \ No newline at end of file +*.pem +build \ No newline at end of file From 23fb9a1b27d0efa5330579f9d431c7d02e9317be Mon Sep 17 00:00:00 2001 From: Romulus-Emanuel Ruja Date: Wed, 9 Oct 2024 18:50:10 +0300 Subject: [PATCH 4/8] setting MediatorHangfireBridge as transient service --- Enigma5.App/StartupConfiguration.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Enigma5.App/StartupConfiguration.cs b/Enigma5.App/StartupConfiguration.cs index 5a61a6c..f96a071 100644 --- a/Enigma5.App/StartupConfiguration.cs +++ b/Enigma5.App/StartupConfiguration.cs @@ -46,12 +46,12 @@ public void ConfigureServices(IServiceCollection services) services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); - services.AddSingleton(); services.AddTransient(typeof(IKeysReader), _configuration.UseAzureVaultForKeys() ? typeof(AzureKeysReader) : typeof(KeysReader)); services.AddTransient(typeof(IPassphraseProvider), _configuration.UseAzureVaultForPassphrase() ? typeof(AzurePassphraseReader) : typeof(CommandLinePassphraseReader)); services.AddTransient(); - + services.AddTransient(); + services.SetupHangfire(); services.SetupDbContext(_configuration); services.SetupMediatR(); From 38458c2599a43a84e859806fab74cf6661becf22 Mon Sep 17 00:00:00 2001 From: Romulus-Emanuel Ruja Date: Sat, 12 Oct 2024 12:58:26 +0300 Subject: [PATCH 5/8] added migrations sql script; updated appsettings files --- .../Extensions/ConfigurationExtensions.cs | 2 +- Enigma5.App/App.cs | 10 +-- Enigma5.App/Enigma5.App.csproj | 3 - Enigma5.App/Migrations/migrate-db.sql | 63 +++++++++++++++++++ Enigma5.App/appsettings.Development.json | 32 +++++----- Enigma5.App/appsettings.Production.json | 53 ++++++++-------- Enigma5.App/appsettings.json | 46 +++++++------- Enigma5.App/generate_keys.sh | 2 - 8 files changed, 131 insertions(+), 80 deletions(-) create mode 100644 Enigma5.App/Migrations/migrate-db.sql delete mode 100755 Enigma5.App/generate_keys.sh diff --git a/Enigma5.App.Common/Extensions/ConfigurationExtensions.cs b/Enigma5.App.Common/Extensions/ConfigurationExtensions.cs index b0698f3..9676292 100644 --- a/Enigma5.App.Common/Extensions/ConfigurationExtensions.cs +++ b/Enigma5.App.Common/Extensions/ConfigurationExtensions.cs @@ -20,7 +20,7 @@ public static List GetPeers(this IConfiguration configuration) => configuration.GetValue("PublicKeyPath", null); public static string? GetPassphraseKeyPath(this IConfiguration configuration) - => configuration.GetValue("Passphrase", null); + => configuration.GetValue("PassphrasePath", null); public static bool GetRetryConnection(this IConfiguration configuration) => configuration.GetValue("RetryConnection", false); diff --git a/Enigma5.App/App.cs b/Enigma5.App/App.cs index da4911f..5ac844d 100644 --- a/Enigma5.App/App.cs +++ b/Enigma5.App/App.cs @@ -1,8 +1,6 @@ using Enigma5.App.Data; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Serilog; @@ -12,13 +10,7 @@ public class App { public static void Main(string[] args) { - var app = CreateHostBuilder(args).Build(); - - using var scope = app.Services.CreateScope(); - var dbContext = scope.ServiceProvider.GetRequiredService(); - dbContext.Database.Migrate(); - - app.Run(); + CreateHostBuilder(args).Build().Run(); } public static IHostBuilder CreateHostBuilder(string[] args) => diff --git a/Enigma5.App/Enigma5.App.csproj b/Enigma5.App/Enigma5.App.csproj index 3c447e3..4533e0c 100644 --- a/Enigma5.App/Enigma5.App.csproj +++ b/Enigma5.App/Enigma5.App.csproj @@ -41,9 +41,6 @@ PreserveNewest - - PreserveNewest - diff --git a/Enigma5.App/Migrations/migrate-db.sql b/Enigma5.App/Migrations/migrate-db.sql new file mode 100644 index 0000000..e7bd51c --- /dev/null +++ b/Enigma5.App/Migrations/migrate-db.sql @@ -0,0 +1,63 @@ +CREATE TABLE IF NOT EXISTS "__EFMigrationsHistory" ( + "MigrationId" TEXT NOT NULL CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY, + "ProductVersion" TEXT NOT NULL +); + +BEGIN TRANSACTION; + +CREATE TABLE "Messages" ( + "Id" INTEGER NOT NULL CONSTRAINT "PK_Messages" PRIMARY KEY AUTOINCREMENT, + "Destination" TEXT NOT NULL, + "Content" TEXT NOT NULL, + "DateReceived" TEXT NOT NULL, + "Sent" INTEGER NOT NULL +); + +INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion") +VALUES ('20231012183937_InitialMigration', '8.0.0'); + +COMMIT; + +BEGIN TRANSACTION; + +CREATE TABLE "SharedData" ( + "Tag" TEXT NOT NULL CONSTRAINT "PK_SharedData" PRIMARY KEY, + "Data" TEXT NOT NULL, + "DateCreated" TEXT NOT NULL +); + +INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion") +VALUES ('20240620054308_AddSharedDataTable', '8.0.0'); + +COMMIT; + +BEGIN TRANSACTION; + +INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion") +VALUES ('20240620112903_ChangeDateTimeColumnsToDateTimeOffsets', '8.0.0'); + +COMMIT; + +BEGIN TRANSACTION; + +ALTER TABLE "SharedData" ADD "AccessCount" INTEGER NOT NULL DEFAULT 0; + +ALTER TABLE "SharedData" ADD "MaxAccessCount" INTEGER NOT NULL DEFAULT 0; + +INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion") +VALUES ('20240620132047_AddAccessCountForSharedData', '8.0.0'); + +COMMIT; + +BEGIN TRANSACTION; + +CREATE TABLE "AuthorizedServices" ( + "Id" INTEGER NOT NULL CONSTRAINT "PK_AuthorizedServices" PRIMARY KEY AUTOINCREMENT, + "Address" TEXT NOT NULL +); + +INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion") +VALUES ('20240715123110_AddAuthorizedServicesTable', '8.0.0'); + +COMMIT; + diff --git a/Enigma5.App/appsettings.Development.json b/Enigma5.App/appsettings.Development.json index ae322b1..2e527f3 100644 --- a/Enigma5.App/appsettings.Development.json +++ b/Enigma5.App/appsettings.Development.json @@ -1,20 +1,20 @@ { - "ConnectionStrings": { - "DbConnectionString": "data source=enigmaDb.sqlite" - }, - "Kestrel": { - "EndPoints": { - "Http": { - "Url": "http://localhost:8080" - } - } - }, - "UseAzureVaultForKeys": false, - "UseAzureVaultForPassphrase": false, - "Hostname": "http://localhost:8080", - "PrivateKeyPath": "private-key.pem", - "PublicKeyPath": "public-key.pem", - "Serilog": { + "ConnectionStrings": { + "DbConnectionString": "data source=enigmaDb.sqlite" + }, + "Kestrel": { + "EndPoints": { + "Http": { + "Url": "http://localhost:8080" + } + } + }, + "UseAzureVaultForKeys": false, + "UseAzureVaultForPassphrase": false, + "Hostname": "http://localhost:8080", + "PrivateKeyPath": "private-key.pem", + "PublicKeyPath": "public-key.pem", + "Serilog": { "MinimumLevel": { "Default": "Debug", "Override": { diff --git a/Enigma5.App/appsettings.Production.json b/Enigma5.App/appsettings.Production.json index ce83eb9..0d09928 100644 --- a/Enigma5.App/appsettings.Production.json +++ b/Enigma5.App/appsettings.Production.json @@ -1,37 +1,38 @@ { "ConnectionStrings": { - "DbConnectionString": "data source=enigmaDb.sqlite" + "DbConnectionString": "data source=aenigmaDb.sqlite" }, "Kestrel": { - "EndPoints": { - "Http": { - "Url": "http://localhost:8080" - } + "EndPoints": { + "Http": { + "Url": "http://localhost:8080" } + } }, "UseAzureVaultForKeys": false, - "UseAzureVaultForPassphrase": false, + "UseAzureVaultForPassphrase": true, "Hostname": "http://localhost:8080", - "PrivateKeyPath": "private-key.pem", - "PublicKeyPath": "public-key.pem", + "PrivateKeyPath": "/usr/local/etc/aenigma/private-key.pem", + "PublicKeyPath": "/usr/local/etc/aenigma/public-key.pem", + "PassphrasePath": "aenigma-passphrase", "Serilog": { - "MinimumLevel": { - "Default": "Error", - "Override": { - "Microsoft": "Warning", - "Microsoft.AspNetCore.Hosting.Diagnostics": "Error", - "Microsoft.Hosting.Lifetime": "Warning" - } - }, - "WriteTo": [ - { - "Name": "File", - "Args": { - "path": "logs/logs-.txt", - "rollingInterval": "Day", - "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact" + "MinimumLevel": { + "Default": "Error", + "Override": { + "Microsoft": "Warning", + "Microsoft.AspNetCore.Hosting.Diagnostics": "Error", + "Microsoft.Hosting.Lifetime": "Warning" } - } - ] -} + }, + "WriteTo": [ + { + "Name": "File", + "Args": { + "path": "/var/log/aenigma/aenigma-logs-.txt", + "rollingInterval": "Day", + "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact" + } + } + ] + } } diff --git a/Enigma5.App/appsettings.json b/Enigma5.App/appsettings.json index ce83eb9..2e527f3 100644 --- a/Enigma5.App/appsettings.json +++ b/Enigma5.App/appsettings.json @@ -1,13 +1,13 @@ { "ConnectionStrings": { - "DbConnectionString": "data source=enigmaDb.sqlite" + "DbConnectionString": "data source=enigmaDb.sqlite" }, "Kestrel": { - "EndPoints": { - "Http": { - "Url": "http://localhost:8080" - } + "EndPoints": { + "Http": { + "Url": "http://localhost:8080" } + } }, "UseAzureVaultForKeys": false, "UseAzureVaultForPassphrase": false, @@ -15,23 +15,23 @@ "PrivateKeyPath": "private-key.pem", "PublicKeyPath": "public-key.pem", "Serilog": { - "MinimumLevel": { - "Default": "Error", - "Override": { - "Microsoft": "Warning", - "Microsoft.AspNetCore.Hosting.Diagnostics": "Error", - "Microsoft.Hosting.Lifetime": "Warning" - } - }, - "WriteTo": [ - { - "Name": "File", - "Args": { - "path": "logs/logs-.txt", - "rollingInterval": "Day", - "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact" + "MinimumLevel": { + "Default": "Debug", + "Override": { + "Microsoft": "Warning", + "Microsoft.AspNetCore.Hosting.Diagnostics": "Error", + "Microsoft.Hosting.Lifetime": "Warning" } - } - ] -} + }, + "WriteTo": [ + { + "Name": "File", + "Args": { + "path": "logs/logs-.txt", + "rollingInterval": "Day", + "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact" + } + } + ] + } } diff --git a/Enigma5.App/generate_keys.sh b/Enigma5.App/generate_keys.sh deleted file mode 100755 index fd7cdbf..0000000 --- a/Enigma5.App/generate_keys.sh +++ /dev/null @@ -1,2 +0,0 @@ -openssl genrsa -aes256 -out private-key.pem $1 -openssl rsa -in private-key.pem -outform PEM -pubout -out public-key.pem \ No newline at end of file From d5754c2355368a5a1b137bdbe3a6beea9b55c1a7 Mon Sep 17 00:00:00 2001 From: Romulus-Emanuel Ruja Date: Sat, 12 Oct 2024 13:05:27 +0300 Subject: [PATCH 6/8] added debian package scripts --- .gitignore | 3 +- Enigma5.App/package-aenigma.sh | 94 +++++++++++++++++++++++++++++++++ Scripts/aenigma-genkeys.sh | 30 +++++++++++ Scripts/configure-apache.sh | 95 ++++++++++++++++++++++++++++++++++ Scripts/postinst | 62 ++++++++++++++++++++++ Scripts/postrm | 20 +++++++ 6 files changed, 303 insertions(+), 1 deletion(-) create mode 100755 Enigma5.App/package-aenigma.sh create mode 100755 Scripts/aenigma-genkeys.sh create mode 100755 Scripts/configure-apache.sh create mode 100755 Scripts/postinst create mode 100755 Scripts/postrm diff --git a/.gitignore b/.gitignore index e03e3b0..6259d99 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ *.sqlite* Enigma5.App/logs/* *.pem -build \ No newline at end of file +build +Enigma5.App/aenigma_* \ No newline at end of file diff --git a/Enigma5.App/package-aenigma.sh b/Enigma5.App/package-aenigma.sh new file mode 100755 index 0000000..bbacd7b --- /dev/null +++ b/Enigma5.App/package-aenigma.sh @@ -0,0 +1,94 @@ +#!/bin/bash + +set -e + +APP_NAME="aenigma" +DB_NAME="aenigmaDb.sqlite" +ARCH="amd64" +EXECUTABLE_NAME="Enigma5.App" +PUBLISH_DIR="bin/Release/net8.0/linux-x64/publish" +POSTINST_SCRIPT="../Scripts/postinst" +POSTRM_SCRIPT="../Scripts/postrm" +GENKEYS_NAME="aenigma-genkeys" +AENIGMA_GENKEYS_SCRIPT="../Scripts/$GENKEYS_NAME.sh" + +# Function to display usage/help message +show_help() { + echo "Usage: $0 -v VERSION" + echo "" + echo "Options:" + echo " -v VERSION The version of the application (e.g., 1.0.0)" + echo "" + echo "Example:" + echo " $0 -v 1.0.0" + exit 1 +} + +# Parse command line arguments +while getopts "v:h" opt; do + case $opt in + v) VERSION=$OPTARG ;; + h) show_help ;; + *) show_help ;; + esac +done + +# Check if version argument is provided +if [ -z "$VERSION" ]; then + echo "Error: Version is required." + show_help +fi + +PKG_DIR="${APP_NAME}_${VERSION}-1_$ARCH" + +# Step 1: Publish the .NET app +rm -fv Migrations/migrate-db.sql +rm -fv "$DB_NAME" +dotnet publish -c Release -r linux-x64 --self-contained true +dotnet ef migrations script -o Migrations/migrate-db.sql +sqlite3 "$DB_NAME" < Migrations/migrate-db.sql + +# Step 2: Cleanup old package directory structure, then create a new one +if [ -d "$PKG_DIR" ]; then + echo "Cleaning up existing package directory: $PKG_DIR" + rm -rf "$PKG_DIR" +fi + +# Create a fresh package directory structure +mkdir -pv $PKG_DIR/DEBIAN +mkdir -pv $PKG_DIR/usr/local/$APP_NAME +mkdir -pv $PKG_DIR/usr/local/bin +mkdir -pv $PKG_DIR/usr/local/etc/$APP_NAME +mkdir -pv $PKG_DIR/var/log/$APP_NAME + +# Step 3: Copy application files to /usr/local/APP_NAME +cp -rv $PUBLISH_DIR/* $PKG_DIR/usr/local/$APP_NAME/ +cp -v *.sqlite $PKG_DIR/usr/local/$APP_NAME/ +cp -v "$POSTINST_SCRIPT" $PKG_DIR/DEBIAN/postinst +cp -v "$POSTRM_SCRIPT" $PKG_DIR/DEBIAN/postrm +cp -v "$AENIGMA_GENKEYS_SCRIPT" $PKG_DIR/usr/local/$APP_NAME/ +chmod -v +x $PKG_DIR/DEBIAN/postinst +chmod -v +x $PKG_DIR/DEBIAN/postrm +chmod -v +x $PKG_DIR/usr/local/$APP_NAME/$GENKEYS_NAME.sh + +# Step 4: Create a symbolic link in /usr/local/bin pointing to the executable +ln -sv /usr/local/$APP_NAME/$EXECUTABLE_NAME $PKG_DIR/usr/local/bin/$APP_NAME +ln -sv /usr/local/$APP_NAME/$GENKEYS_NAME.sh $PKG_DIR/usr/local/bin/$GENKEYS_NAME + +# Step 5: Create control file +echo "Creating DEBIAN/control file" +cat < $PKG_DIR/DEBIAN/control +Package: $APP_NAME +Version: $VERSION +Section: base +Priority: optional +Architecture: $ARCH +Depends: openssl (>= 3.0.2) +Maintainer: Romulus-Emanuel Ruja +Description: Simple onion routing application. +EOF + +# Step 6: Build the Debian package +dpkg-deb --build $PKG_DIR + +echo "Package built: ${PKG_DIR}.deb" diff --git a/Scripts/aenigma-genkeys.sh b/Scripts/aenigma-genkeys.sh new file mode 100755 index 0000000..3cf523c --- /dev/null +++ b/Scripts/aenigma-genkeys.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +set -e + +APP_NAME="aenigma" +SERVICE_USER=$APP_NAME +KEYS_DIR="/usr/local/etc/$APP_NAME" +PRIVATE_KEY_FILE="$KEYS_DIR/private-key.pem" +PUBLIC_KEY_FILE="$KEYS_DIR/public-key.pem" +KEY_SIZE="2048" + +# Generate the private key with the given size and file name +echo "Generating private key ... " +openssl genrsa -aes256 -out "$PRIVATE_KEY_FILE" "$KEY_SIZE" +echo "Done." + +# Extract the public key from the private key and save it to the specified file +echo "Exporting public key ... " +openssl rsa -in "$PRIVATE_KEY_FILE" -outform PEM -pubout -out "$PUBLIC_KEY_FILE" +echo "Done." + +echo "Keys generated successfully:" +echo "Private key: $PRIVATE_KEY_FILE" +echo "Public key: $PUBLIC_KEY_FILE" + +# Changing ownership for generated files +echo "Changing keys ownership to $SERVICE_USER ..." +sudo chown "$SERVICE_USER":"$SERVICE_USER" "$PRIVATE_KEY_FILE" +sudo chown "$SERVICE_USER":"$SERVICE_USER" "$PUBLIC_KEY_FILE" +echo "Done." diff --git a/Scripts/configure-apache.sh b/Scripts/configure-apache.sh new file mode 100755 index 0000000..4a48f73 --- /dev/null +++ b/Scripts/configure-apache.sh @@ -0,0 +1,95 @@ +#!/bin/bash + +set -e + +# Function to display usage/help message +show_help() { + echo "Usage: $0 -d DOMAIN -p APP_PORT" + echo "" + echo "Options:" + echo " -d DOMAIN The domain name for the reverse proxy (e.g., example.com)" + echo " -p APP_PORT The port on which the ASP.NET application is running (e.g., 5000)" + echo "" + echo "Example:" + echo " sudo $0 -d example.com -p 5000" + exit 1 +} + +# Check if the script is run with sufficient arguments +if [ "$#" -lt 4 ]; then + show_help +fi + +# Parse command line arguments +while getopts "d:p:h" opt; do + case $opt in + d) DOMAIN=$OPTARG ;; + p) APP_PORT=$OPTARG ;; + h) show_help ;; + *) show_help ;; + esac +done + +# Check if DOMAIN and APP_PORT are provided +if [ -z "$DOMAIN" ] || [ -z "$APP_PORT" ]; then + echo "Error: Both domain and application port are required." + show_help +fi + +# Set Apache configuration path and log directory +APACHE_CONF="/etc/apache2/sites-available/aenigma.conf" +LOG_DIR="/var/log/apache2" + +# Define the virtual host configuration +VIRTUAL_HOST_CONF=$(cat < + ServerName $DOMAIN + ProxyPreserveHost On + + # Proxy for HTTP requests + ProxyPass / http://localhost:$APP_PORT/ + ProxyPassReverse / http://localhost:$APP_PORT/ + + # Proxy for WebSocket (SignalR) requests + ProxyPass "/OnionRouting" "ws://localhost:$APP_PORT/OnionRouting" + ProxyPassReverse "/OnionRouting" "ws://localhost:$APP_PORT/OnionRouting" + + ErrorLog ${LOG_DIR}/aenigma-error.log + CustomLog ${LOG_DIR}/aenigma-access.log combined + +EOF +) + +# Update and install Apache if not already installed +sudo apt update +sudo apt install -y apache2 + +# Enable Apache modules required for reverse proxying and WebSockets +sudo a2enmod proxy +sudo a2enmod proxy_http +sudo a2enmod proxy_wstunnel + +# Create Apache virtual host configuration +echo "Creating virtual host configuration for $DOMAIN..." +echo "$VIRTUAL_HOST_CONF" | sudo tee $APACHE_CONF + +# Enable the new site configuration +sudo a2ensite aenigma.conf + +# Disable the default Apache site, if necessary +sudo a2dissite 000-default.conf + +# Restart Apache to apply changes +echo "Restarting Apache..." +sudo systemctl restart apache2 + +# Ensure Apache starts on boot +sudo systemctl enable apache2 + +# Allow Apache through the firewall (if UFW is installed) +if command -v ufw >/dev/null 2>&1; then + echo "Configuring UFW to allow Apache traffic..." + sudo ufw allow 'Apache Full' +fi + +echo "Apache reverse proxy setup completed for $DOMAIN with app port $APP_PORT" diff --git a/Scripts/postinst b/Scripts/postinst new file mode 100755 index 0000000..1d3dd38 --- /dev/null +++ b/Scripts/postinst @@ -0,0 +1,62 @@ +#!/bin/bash + +set -e + +APP_NAME="aenigma" +SERVICE_NAME=$APP_NAME +SERVICE_USER=$APP_NAME +APP_INSTALL_DIR="/usr/local/$APP_NAME" +APP_EXEC="$APP_INSTALL_DIR/Enigma5.App" +SERVICE_FILE="/etc/systemd/system/$SERVICE_NAME.service" +LOG_DIR="/var/log/$APP_NAME" +KEYS_DIR="/usr/local/etc/$APP_NAME" + +# Step 1: Create a dedicated user for the service if it doesn't exist +if ! id "$SERVICE_USER" &>/dev/null; then + echo -n "Creating user '$SERVICE_USER' for the service... " + sudo useradd -r -s /bin/false "$SERVICE_USER" + echo "Done." +fi + +# Step 2: Setting ownership for app files dir and logs +echo -n "Setting ownership of $LOG_DIR to user '$SERVICE_USER'... " +sudo chown "$SERVICE_USER":"$SERVICE_USER" "$LOG_DIR" +echo "Done." +echo -n "Setting ownership of $APP_INSTALL_DIR directory to user '$SERVICE_USER'... " +sudo chown -R "$SERVICE_USER":"$SERVICE_USER" "$APP_INSTALL_DIR" +echo "Done." + +# Step 3: Create the systemd service file +echo -n "Creating service file: $SERVICE_FILE... " +cat < /dev/null +[Unit] +Description=$SERVICE_NAME service +After=network.target + +[Service] +WorkingDirectory=$APP_INSTALL_DIR +ExecStart=$APP_EXEC +Restart=always +RestartSec=10 +User=$SERVICE_USER +Group=$SERVICE_USER + +[Install] +WantedBy=multi-user.target +EOF +echo "Done." + +# Step 4: Reload systemd to recognize the new service & enable newly created service +echo -n "Reloading systemd... " +sudo systemctl daemon-reload +echo "Done." + +echo -n "Enabling $SERVICE_NAME service ... " +sudo systemctl enable "$SERVICE_NAME" +echo "Done." +echo -n "Starting $SERVICE_NAME service ..." +sudo systemctl start "$SERVICE_NAME" +sudo systemctl status "$SERVICE_NAME" + +echo -e "$APP_NAME service has been configured. Please make sure to run \e[31maenigma-genkeys\e[0m command to complete the setup." +echo "Done." diff --git a/Scripts/postrm b/Scripts/postrm new file mode 100755 index 0000000..788cceb --- /dev/null +++ b/Scripts/postrm @@ -0,0 +1,20 @@ +#!/bin/bash + +set -e + +APP_NAME="aenigma" +SERVICE_USER=$APP_NAME +SERVICE_NAME=$APP_NAME +SERVICE_FILE="/etc/systemd/system/$SERVICE_NAME.service" + +case "$1" in + remove) + sudo systemctl stop "$SERVICE_NAME" + sudo systemctl disable "$SERVICE_NAME" + ;; + + purge) + sudo rm "$SERVICE_FILE" + sudo deluser --force --remove-home "$SERVICE_USER" + ;; +esac From 19a1c2c2bb3392bbbdf620504fdf00ad30a8f678 Mon Sep 17 00:00:00 2001 From: Romulus-Emanuel Ruja Date: Sat, 12 Oct 2024 13:32:51 +0300 Subject: [PATCH 7/8] added missing configuration to appsettings.Production --- Enigma5.App/appsettings.Production.json | 1 + 1 file changed, 1 insertion(+) diff --git a/Enigma5.App/appsettings.Production.json b/Enigma5.App/appsettings.Production.json index 0d09928..552ed25 100644 --- a/Enigma5.App/appsettings.Production.json +++ b/Enigma5.App/appsettings.Production.json @@ -9,6 +9,7 @@ } } }, + "AzureVaultUrl": "https://vault-name.vault.azure.net/", "UseAzureVaultForKeys": false, "UseAzureVaultForPassphrase": true, "Hostname": "http://localhost:8080", From f220116c5a3634f783c6181847b642928c039148 Mon Sep 17 00:00:00 2001 From: Romulus-Emanuel Ruja Date: Sat, 12 Oct 2024 15:45:13 +0300 Subject: [PATCH 8/8] added license --- Client/Program.cs | 22 +- .../Constants/DataPersistencePeriod.cs | 22 +- Enigma5.App.Common/Constants/Endpoints.cs | 22 +- Enigma5.App.Common/Contracts/Hubs/IHub.cs | 22 +- .../Contracts/Hubs/IOnionParsingHub.cs | 20 + .../Contracts/Hubs/IOnionRoutingHub.cs | 20 + .../Extensions/ConfigurationExtensions.cs | 22 +- .../Extensions/CopyExtensions.cs | 22 +- .../Utils/SingleThreadExecutor.cs | 20 + .../Utils/SingleThreadExecutorAction.cs | 20 + .../Utils/SingleThreadExecutorResult.cs | 20 + .../Utils/ThreadSafeExecution.cs | 20 + Enigma5.App.Models/AdjacencyList.cs | 20 + Enigma5.App.Models/AuthenticationRequest.cs | 22 +- Enigma5.App.Models/Contracts/IValidatable.cs | 22 +- Enigma5.App.Models/Error.cs | 22 +- .../Extensions/AddressExtensions.cs | 22 +- .../Extensions/PublicKeyExtensions.cs | 22 +- .../Extensions/SignatureExtensions.cs | 22 +- Enigma5.App.Models/Graph.cs | 22 +- .../HubInvocation/EmptyErrorResult.cs | 20 + .../HubInvocation/EmptySuccessResult.cs | 20 + .../HubInvocation/ErrorResult.cs | 20 + .../HubInvocation/InvocationResult.cs | 22 +- .../HubInvocation/SuccessResult.cs | 20 + Enigma5.App.Models/PendingMessage.cs | 22 +- Enigma5.App.Models/RoutingRequest.cs | 22 +- Enigma5.App.Models/ServerInfo.cs | 20 + Enigma5.App.Models/ShareDataCreate.cs | 22 +- Enigma5.App.Models/Signature.cs | 22 +- Enigma5.App.Models/SignatureRequest.cs | 22 +- Enigma5.App.Models/TriggerBroadcastRequest.cs | 22 +- Enigma5.App.Models/ValidationErrors.cs | 22 +- Enigma5.App.Models/VertexBroadcast.cs | 20 + Enigma5.App.Tests/AppTestBase.cs | 24 +- .../ContainerBuilderExtensions.cs | 22 +- Enigma5.App.Tests/Data/NetworkGraphTests.cs | 24 +- .../Data/NetworkGraphValidationPolicyTests.cs | 21 +- Enigma5.App.Tests/Data/VertexFactoryTests.cs | 24 +- Enigma5.App.Tests/LifetimeScopeExtensions.cs | 24 +- .../Handlers/BroadcastHandlerTests.cs | 23 +- .../UpdateLocalAdjyacencyHandlerTests.cs | 24 +- Enigma5.App.Tests/Usings.cs | 20 + Enigma5.App/App.cs | 22 +- .../AuthorizedServiceOnlyAttribute.cs | 22 +- .../Attributes/OnionParserAttribute.cs | 20 + .../Attributes/OnionRouterAttribute.cs | 20 + .../Attributes/ValidateModelAttribute.cs | 22 +- Enigma5.App/Data/AuthorizedService.cs | 22 +- Enigma5.App/Data/EnigmaDbContext.cs | 20 + .../Extensions/AdjacencyListExtensions.cs | 22 +- .../VertexBroadcastRequestExtensions.cs | 22 +- .../Data/Extensions/VertexExtensions.cs | 22 +- Enigma5.App/Data/Neighborhood.cs | 23 +- Enigma5.App/Data/NetworkGraph.cs | 22 +- .../Data/NetworkGraphValidationPolicy.cs | 22 +- Enigma5.App/Data/PendingMessage.cs | 20 + Enigma5.App/Data/SharedData.cs | 22 +- Enigma5.App/Data/Vertex.cs | 22 +- Enigma5.App/Extensions/DbContextExtensions.cs | 20 + Enigma5.App/Extensions/HangfireExtensions.cs | 20 + Enigma5.App/Extensions/MediatRExtensions.cs | 20 + Enigma5.App/Hangfire/HangfireActivator.cs | 20 + .../Hangfire/MediatorHangfireBridge.cs | 20 + .../Hubs/Adapters/OnionParsingHubAdapter.cs | 20 + .../Hubs/Adapters/OnionRoutingHubAdapter.cs | 20 + Enigma5.App/Hubs/Extensions/HubExtensions.cs | 20 + .../HubInvocationContextExtensions.cs | 20 + .../Filters/AuthorizedServiceOnlyFilter.cs | 22 +- Enigma5.App/Hubs/Filters/BaseFilter.cs | 20 + Enigma5.App/Hubs/Filters/LogFilter.cs | 20 + .../Hubs/Filters/OnionParsingFilter.cs | 20 + .../Hubs/Filters/OnionRoutingFilter.cs | 20 + .../Hubs/Filters/ValidateModelFilter.cs | 22 +- Enigma5.App/Hubs/InvocationErrors.cs | 22 +- Enigma5.App/Hubs/RoutingHub.cs | 22 +- Enigma5.App/Hubs/RoutingHubHelpers.cs | 22 +- .../Hubs/Sessions/ConnectionsMapper.cs | 20 + Enigma5.App/Hubs/Sessions/SessionManager.cs | 22 +- .../Commands/CleanupMessagesCommand.cs | 20 + .../Commands/CleanupSharedDataCommand.cs | 22 +- .../Commands/CreatePendingMessageCommand.cs | 20 + .../Commands/CreateShareDataCommand.cs | 22 +- .../Commands/HandleBroadcastCommand.cs | 22 +- .../MarkMessagesAsDeliveredCommand.cs | 20 + .../Commands/RemoveMessagesCommand.cs | 20 + .../Commands/RemoveSharedDataCommand.cs | 22 +- .../Commands/UpdateLocalAdjacencyCommand.cs | 22 +- .../Resources/Handlers/BroadcastHandler.cs | 22 +- .../Handlers/CheckAuthorizedServiceHandler.cs | 22 +- .../Handlers/CleanupMessagesHandler.cs | 20 + .../Handlers/CleanupSharedDataHandler.cs | 22 +- .../Handlers/CreatePendingMessageHandler.cs | 20 + .../Handlers/CreateShareDataHandler.cs | 22 +- .../GetPendingMessagesByDestinationHandler.cs | 20 + .../Handlers/GetSharedDataHandler.cs | 22 +- .../MarkMessagesAsDeliveredHandler.cs | 20 + .../Handlers/RemoveMessagesHandler.cs | 20 + .../Handlers/RemoveSharedDataHandler.cs | 22 +- .../RequestResponseLoggingBehavior.cs | 20 + .../Handlers/UpdateLocalAdjacencyHandler.cs | 24 +- .../Queries/CheckAuthorizedServiceQuery.cs | 22 +- .../GetPendingMessagesByDestinationQuery.cs | 20 + .../Resources/Queries/GetSharedDataQuery.cs | 22 +- Enigma5.App/StartupConfiguration.cs | 23 +- Enigma5.Crypto.Tests/CertificateHelper.cs | 20 + Enigma5.Crypto.Tests/EnvelopeTests.cs | 20 + Enigma5.Crypto.Tests/HashProvider.cs | 20 + Enigma5.Crypto/AssemblyInfo.cs | 20 + Enigma5.Crypto/CertificatesHelper.cs | 20 + Enigma5.Crypto/Constants.cs | 20 + Enigma5.Crypto/Contracts/IEnvelopeSeal.cs | 20 + Enigma5.Crypto/Contracts/IEnvelopeSign.cs | 20 + Enigma5.Crypto/Contracts/IEnvelopeUnseal.cs | 20 + Enigma5.Crypto/Contracts/IEnvelopeVerify.cs | 20 + Enigma5.Crypto/CryptoContext.cs | 20 + Enigma5.Crypto/DataProviders/PKey.cs | 20 + Enigma5.Crypto/DataProviders/TestEnvelope.cs | 20 + Enigma5.Crypto/DataProviders/TestSignature.cs | 20 + Enigma5.Crypto/Envelope.cs | 20 + Enigma5.Crypto/HashProvider.cs | 20 + Enigma5.Crypto/KernelKey.cs | 20 + Enigma5.Crypto/KernelKeyring.cs | 20 + Enigma5.Crypto/KeyUtil.cs | 20 + Enigma5.Crypto/Native.cs | 20 + Enigma5.Crypto/SealProvider.cs | 20 + Enigma5.Security/AzureClient.cs | 20 + Enigma5.Security/AzureKeyReader.cs | 20 + Enigma5.Security/AzurePassphraseReader.cs | 22 +- Enigma5.Security/CertificateManager.cs | 21 +- .../CommandLinePassphraseReader.cs | 22 +- .../Contracts/ICertificateManager.cs | 22 +- Enigma5.Security/Contracts/IKeysProvider.cs | 22 +- .../Contracts/IPassphraseProvider.cs | 22 +- .../DataProviders/TestCertificateManager.cs | 22 +- .../Extensions/HubConnectionExtensions.cs | 22 +- Enigma5.Security/KeysGenerator.cs | 20 + Enigma5.Security/KeysReader.cs | 21 +- Enigma5.Structures.Tests/OnionBuilderTests.cs | 20 + Enigma5.Structures.Tests/OnionParserTests.cs | 20 + Enigma5.Structures.Tests/SealUnsealOnion.cs | 20 + .../TestData/OnionBuilderTestData.cs | 20 + .../Contracts/IEncryptMessage.cs | 20 + Enigma5.Structures/Contracts/IOnion.cs | 20 + Enigma5.Structures/Contracts/IOnionBuilder.cs | 20 + .../Contracts/ISetMessageContent.cs | 20 + .../Contracts/ISetMessageNextAddress.cs | 20 + .../DataProviders/Contracts/ITestOnion.cs | 20 + Enigma5.Structures/DataProviders/TestOnion.cs | 20 + .../DataProviders/TestOnionPeel.cs | 20 + Enigma5.Structures/Onion.cs | 22 +- Enigma5.Structures/OnionBuilder.cs | 20 + Enigma5.Structures/OnionParser.cs | 20 + LICENSE | 693 ++++++++++++++++++ NetworkBridge/ConfigurationLoader.cs | 22 +- NetworkBridge/ConnectionVector.cs | 22 +- NetworkBridge/HubConnectionExtensions.cs | 22 +- NetworkBridge/HubConnectionsProxy.cs | 22 +- NetworkBridge/Program.cs | 22 +- 159 files changed, 3933 insertions(+), 86 deletions(-) create mode 100644 LICENSE diff --git a/Client/Program.cs b/Client/Program.cs index 75d25d5..5c945e9 100644 --- a/Client/Program.cs +++ b/Client/Program.cs @@ -1,4 +1,24 @@ -using System.Text; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using System.Text; using Enigma5.App.Common.Contracts.Hubs; using Enigma5.Crypto.DataProviders; using Enigma5.Structures; diff --git a/Enigma5.App.Common/Constants/DataPersistencePeriod.cs b/Enigma5.App.Common/Constants/DataPersistencePeriod.cs index 1769cbc..5239256 100644 --- a/Enigma5.App.Common/Constants/DataPersistencePeriod.cs +++ b/Enigma5.App.Common/Constants/DataPersistencePeriod.cs @@ -1,4 +1,24 @@ -namespace Enigma5.App.Common.Constants; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +namespace Enigma5.App.Common.Constants; public static class DataPersistencePeriod { diff --git a/Enigma5.App.Common/Constants/Endpoints.cs b/Enigma5.App.Common/Constants/Endpoints.cs index f3659f8..59b1833 100644 --- a/Enigma5.App.Common/Constants/Endpoints.cs +++ b/Enigma5.App.Common/Constants/Endpoints.cs @@ -1,4 +1,24 @@ -namespace Enigma5.App.Common.Constants; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +namespace Enigma5.App.Common.Constants; public static class Endpoints { diff --git a/Enigma5.App.Common/Contracts/Hubs/IHub.cs b/Enigma5.App.Common/Contracts/Hubs/IHub.cs index 3602453..db47f15 100644 --- a/Enigma5.App.Common/Contracts/Hubs/IHub.cs +++ b/Enigma5.App.Common/Contracts/Hubs/IHub.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Models; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Models; using Enigma5.App.Models.HubInvocation; namespace Enigma5.App.Common.Contracts.Hubs; diff --git a/Enigma5.App.Common/Contracts/Hubs/IOnionParsingHub.cs b/Enigma5.App.Common/Contracts/Hubs/IOnionParsingHub.cs index 9a9f823..79b8852 100644 --- a/Enigma5.App.Common/Contracts/Hubs/IOnionParsingHub.cs +++ b/Enigma5.App.Common/Contracts/Hubs/IOnionParsingHub.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.App.Common.Contracts.Hubs; public interface IOnionParsingHub diff --git a/Enigma5.App.Common/Contracts/Hubs/IOnionRoutingHub.cs b/Enigma5.App.Common/Contracts/Hubs/IOnionRoutingHub.cs index 70c83b1..34c4c6b 100644 --- a/Enigma5.App.Common/Contracts/Hubs/IOnionRoutingHub.cs +++ b/Enigma5.App.Common/Contracts/Hubs/IOnionRoutingHub.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.App.Common.Contracts.Hubs; public interface IOnionRoutingHub diff --git a/Enigma5.App.Common/Extensions/ConfigurationExtensions.cs b/Enigma5.App.Common/Extensions/ConfigurationExtensions.cs index 9676292..a287544 100644 --- a/Enigma5.App.Common/Extensions/ConfigurationExtensions.cs +++ b/Enigma5.App.Common/Extensions/ConfigurationExtensions.cs @@ -1,4 +1,24 @@ -using Microsoft.Extensions.Configuration; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Microsoft.Extensions.Configuration; namespace Enigma5.App.Common.Extensions; diff --git a/Enigma5.App.Common/Extensions/CopyExtensions.cs b/Enigma5.App.Common/Extensions/CopyExtensions.cs index 3dae025..148fe9d 100644 --- a/Enigma5.App.Common/Extensions/CopyExtensions.cs +++ b/Enigma5.App.Common/Extensions/CopyExtensions.cs @@ -1,4 +1,24 @@ -using System.Text.Json; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using System.Text.Json; namespace Enigma5.App.Common.Extensions; diff --git a/Enigma5.App.Common/Utils/SingleThreadExecutor.cs b/Enigma5.App.Common/Utils/SingleThreadExecutor.cs index 789a369..917fb5c 100644 --- a/Enigma5.App.Common/Utils/SingleThreadExecutor.cs +++ b/Enigma5.App.Common/Utils/SingleThreadExecutor.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using System.Collections.Concurrent; namespace Enigma5.App.Common.Utils; diff --git a/Enigma5.App.Common/Utils/SingleThreadExecutorAction.cs b/Enigma5.App.Common/Utils/SingleThreadExecutorAction.cs index b23ea32..ed07dd5 100644 --- a/Enigma5.App.Common/Utils/SingleThreadExecutorAction.cs +++ b/Enigma5.App.Common/Utils/SingleThreadExecutorAction.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.App.Common.Utils; public class SingleThreadExecutorAction(Action action) diff --git a/Enigma5.App.Common/Utils/SingleThreadExecutorResult.cs b/Enigma5.App.Common/Utils/SingleThreadExecutorResult.cs index 1b11498..6338705 100644 --- a/Enigma5.App.Common/Utils/SingleThreadExecutorResult.cs +++ b/Enigma5.App.Common/Utils/SingleThreadExecutorResult.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.App.Common.Utils; public record class SingleThreadExecutorResult(T? Value, Exception? Exception); diff --git a/Enigma5.App.Common/Utils/ThreadSafeExecution.cs b/Enigma5.App.Common/Utils/ThreadSafeExecution.cs index 8d38037..43b7539 100644 --- a/Enigma5.App.Common/Utils/ThreadSafeExecution.cs +++ b/Enigma5.App.Common/Utils/ThreadSafeExecution.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.App.Common.Utils; public static class ThreadSafeExecution diff --git a/Enigma5.App.Models/AdjacencyList.cs b/Enigma5.App.Models/AdjacencyList.cs index 325a92f..b0a9206 100644 --- a/Enigma5.App.Models/AdjacencyList.cs +++ b/Enigma5.App.Models/AdjacencyList.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.App.Models.Contracts; using Enigma5.App.Models.Extensions; diff --git a/Enigma5.App.Models/AuthenticationRequest.cs b/Enigma5.App.Models/AuthenticationRequest.cs index 5407529..76b8879 100644 --- a/Enigma5.App.Models/AuthenticationRequest.cs +++ b/Enigma5.App.Models/AuthenticationRequest.cs @@ -1,4 +1,24 @@ -using System.Buffers.Text; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using System.Buffers.Text; using Enigma5.App.Models.Contracts; using Enigma5.App.Models.Extensions; diff --git a/Enigma5.App.Models/Contracts/IValidatable.cs b/Enigma5.App.Models/Contracts/IValidatable.cs index 9681816..7e33a78 100644 --- a/Enigma5.App.Models/Contracts/IValidatable.cs +++ b/Enigma5.App.Models/Contracts/IValidatable.cs @@ -1,4 +1,24 @@ -namespace Enigma5.App.Models.Contracts; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +namespace Enigma5.App.Models.Contracts; public interface IValidatable { diff --git a/Enigma5.App.Models/Error.cs b/Enigma5.App.Models/Error.cs index c114062..ae98eff 100644 --- a/Enigma5.App.Models/Error.cs +++ b/Enigma5.App.Models/Error.cs @@ -1,4 +1,24 @@ -namespace Enigma5.App.Models; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +namespace Enigma5.App.Models; public class Error { diff --git a/Enigma5.App.Models/Extensions/AddressExtensions.cs b/Enigma5.App.Models/Extensions/AddressExtensions.cs index a0143ea..73ee0cf 100644 --- a/Enigma5.App.Models/Extensions/AddressExtensions.cs +++ b/Enigma5.App.Models/Extensions/AddressExtensions.cs @@ -1,4 +1,24 @@ -using System.Text.RegularExpressions; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using System.Text.RegularExpressions; namespace Enigma5.App.Models.Extensions; diff --git a/Enigma5.App.Models/Extensions/PublicKeyExtensions.cs b/Enigma5.App.Models/Extensions/PublicKeyExtensions.cs index 9acd409..09acfb3 100644 --- a/Enigma5.App.Models/Extensions/PublicKeyExtensions.cs +++ b/Enigma5.App.Models/Extensions/PublicKeyExtensions.cs @@ -1,4 +1,24 @@ -using System.Text.RegularExpressions; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using System.Text.RegularExpressions; namespace Enigma5.App.Models.Extensions; diff --git a/Enigma5.App.Models/Extensions/SignatureExtensions.cs b/Enigma5.App.Models/Extensions/SignatureExtensions.cs index 1b95234..ec4388a 100644 --- a/Enigma5.App.Models/Extensions/SignatureExtensions.cs +++ b/Enigma5.App.Models/Extensions/SignatureExtensions.cs @@ -1,4 +1,24 @@ -using System.Text; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using System.Text; namespace Enigma5.App.Models.Extensions; diff --git a/Enigma5.App.Models/Graph.cs b/Enigma5.App.Models/Graph.cs index 995f0da..b3b5779 100644 --- a/Enigma5.App.Models/Graph.cs +++ b/Enigma5.App.Models/Graph.cs @@ -1,3 +1,23 @@ -namespace Enigma5.App.Models; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +namespace Enigma5.App.Models; public record class Graph(string PublicKey, string SignedData); diff --git a/Enigma5.App.Models/HubInvocation/EmptyErrorResult.cs b/Enigma5.App.Models/HubInvocation/EmptyErrorResult.cs index a74bfb6..3316a83 100644 --- a/Enigma5.App.Models/HubInvocation/EmptyErrorResult.cs +++ b/Enigma5.App.Models/HubInvocation/EmptyErrorResult.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.App.Models.HubInvocation; public class EmptyErrorResult : ErrorResult diff --git a/Enigma5.App.Models/HubInvocation/EmptySuccessResult.cs b/Enigma5.App.Models/HubInvocation/EmptySuccessResult.cs index a768c33..fe9af2e 100644 --- a/Enigma5.App.Models/HubInvocation/EmptySuccessResult.cs +++ b/Enigma5.App.Models/HubInvocation/EmptySuccessResult.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.App.Models.HubInvocation; public class EmptySuccessResult() : SuccessResult(null) { } diff --git a/Enigma5.App.Models/HubInvocation/ErrorResult.cs b/Enigma5.App.Models/HubInvocation/ErrorResult.cs index 3eeaec7..748f20c 100644 --- a/Enigma5.App.Models/HubInvocation/ErrorResult.cs +++ b/Enigma5.App.Models/HubInvocation/ErrorResult.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.App.Models.HubInvocation; public class ErrorResult : InvocationResult diff --git a/Enigma5.App.Models/HubInvocation/InvocationResult.cs b/Enigma5.App.Models/HubInvocation/InvocationResult.cs index 7a422a7..dc56b16 100644 --- a/Enigma5.App.Models/HubInvocation/InvocationResult.cs +++ b/Enigma5.App.Models/HubInvocation/InvocationResult.cs @@ -1,4 +1,24 @@ -using System.Text.Json.Serialization; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using System.Text.Json.Serialization; namespace Enigma5.App.Models.HubInvocation; diff --git a/Enigma5.App.Models/HubInvocation/SuccessResult.cs b/Enigma5.App.Models/HubInvocation/SuccessResult.cs index 1f37c1a..fdd6a8a 100644 --- a/Enigma5.App.Models/HubInvocation/SuccessResult.cs +++ b/Enigma5.App.Models/HubInvocation/SuccessResult.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.App.Models.HubInvocation; public class SuccessResult : InvocationResult diff --git a/Enigma5.App.Models/PendingMessage.cs b/Enigma5.App.Models/PendingMessage.cs index cba8eac..4e87a5e 100644 --- a/Enigma5.App.Models/PendingMessage.cs +++ b/Enigma5.App.Models/PendingMessage.cs @@ -1,4 +1,24 @@ -namespace Enigma5.App.Models; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +namespace Enigma5.App.Models; public class PendingMessage { diff --git a/Enigma5.App.Models/RoutingRequest.cs b/Enigma5.App.Models/RoutingRequest.cs index b5dab8e..a511f45 100644 --- a/Enigma5.App.Models/RoutingRequest.cs +++ b/Enigma5.App.Models/RoutingRequest.cs @@ -1,4 +1,24 @@ -using System.Buffers.Text; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using System.Buffers.Text; using Enigma5.App.Models.Contracts; namespace Enigma5.App.Models; diff --git a/Enigma5.App.Models/ServerInfo.cs b/Enigma5.App.Models/ServerInfo.cs index 2f5a8c4..46e1e84 100644 --- a/Enigma5.App.Models/ServerInfo.cs +++ b/Enigma5.App.Models/ServerInfo.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.App.Models; public class ServerInfo diff --git a/Enigma5.App.Models/ShareDataCreate.cs b/Enigma5.App.Models/ShareDataCreate.cs index 734ccb3..16c6e7a 100644 --- a/Enigma5.App.Models/ShareDataCreate.cs +++ b/Enigma5.App.Models/ShareDataCreate.cs @@ -1,4 +1,24 @@ -namespace Enigma5.App.Models; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +namespace Enigma5.App.Models; public class SharedDataCreate { diff --git a/Enigma5.App.Models/Signature.cs b/Enigma5.App.Models/Signature.cs index a16600f..45cb0b0 100644 --- a/Enigma5.App.Models/Signature.cs +++ b/Enigma5.App.Models/Signature.cs @@ -1,4 +1,24 @@ -namespace Enigma5.App.Models; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +namespace Enigma5.App.Models; public class Signature { diff --git a/Enigma5.App.Models/SignatureRequest.cs b/Enigma5.App.Models/SignatureRequest.cs index b316dd2..8fc270a 100644 --- a/Enigma5.App.Models/SignatureRequest.cs +++ b/Enigma5.App.Models/SignatureRequest.cs @@ -1,4 +1,24 @@ -using System.Buffers.Text; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using System.Buffers.Text; using Enigma5.App.Models.Contracts; namespace Enigma5.App.Models; diff --git a/Enigma5.App.Models/TriggerBroadcastRequest.cs b/Enigma5.App.Models/TriggerBroadcastRequest.cs index 775e33d..d738a22 100644 --- a/Enigma5.App.Models/TriggerBroadcastRequest.cs +++ b/Enigma5.App.Models/TriggerBroadcastRequest.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Models.Contracts; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Models.Contracts; using Enigma5.App.Models.Extensions; namespace Enigma5.App.Models; diff --git a/Enigma5.App.Models/ValidationErrors.cs b/Enigma5.App.Models/ValidationErrors.cs index 5a5bfe7..25d3ef3 100644 --- a/Enigma5.App.Models/ValidationErrors.cs +++ b/Enigma5.App.Models/ValidationErrors.cs @@ -1,4 +1,24 @@ -namespace Enigma5.App.Models; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +namespace Enigma5.App.Models; public static class ValidationErrors { diff --git a/Enigma5.App.Models/VertexBroadcast.cs b/Enigma5.App.Models/VertexBroadcast.cs index 5681122..45348e1 100644 --- a/Enigma5.App.Models/VertexBroadcast.cs +++ b/Enigma5.App.Models/VertexBroadcast.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using System.Text.Json; using System.Text.Json.Serialization; using Enigma5.App.Models.Contracts; diff --git a/Enigma5.App.Tests/AppTestBase.cs b/Enigma5.App.Tests/AppTestBase.cs index 3f0d409..0c4e556 100644 --- a/Enigma5.App.Tests/AppTestBase.cs +++ b/Enigma5.App.Tests/AppTestBase.cs @@ -1,8 +1,28 @@ -using Autofac; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Autofac; using AutoMapper.Contrib.Autofac.DependencyInjection; using Enigma5.App.Data; using Enigma5.App.Resources.Handlers; -using Enigma5.App.Security.Contracts; +using Enigma5.Security.Contracts; using Enigma5.Security.DataProviders; using Microsoft.Extensions.Configuration; using NSubstitute; diff --git a/Enigma5.App.Tests/ContainerBuilderExtensions.cs b/Enigma5.App.Tests/ContainerBuilderExtensions.cs index 7fc9524..c950650 100644 --- a/Enigma5.App.Tests/ContainerBuilderExtensions.cs +++ b/Enigma5.App.Tests/ContainerBuilderExtensions.cs @@ -1,4 +1,24 @@ -using Autofac; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Autofac; using Autofac.Builder; using Enigma5.App.Data; diff --git a/Enigma5.App.Tests/Data/NetworkGraphTests.cs b/Enigma5.App.Tests/Data/NetworkGraphTests.cs index b3b3f9b..4fbd627 100644 --- a/Enigma5.App.Tests/Data/NetworkGraphTests.cs +++ b/Enigma5.App.Tests/Data/NetworkGraphTests.cs @@ -1,6 +1,26 @@ -using Autofac; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Autofac; using Enigma5.App.Data; -using Enigma5.App.Security.Contracts; +using Enigma5.Security.Contracts; using Enigma5.Crypto.DataProviders; namespace Enigma5.App.Tests.Data; diff --git a/Enigma5.App.Tests/Data/NetworkGraphValidationPolicyTests.cs b/Enigma5.App.Tests/Data/NetworkGraphValidationPolicyTests.cs index 85dd84d..6dd3fd0 100644 --- a/Enigma5.App.Tests/Data/NetworkGraphValidationPolicyTests.cs +++ b/Enigma5.App.Tests/Data/NetworkGraphValidationPolicyTests.cs @@ -1,4 +1,23 @@ - +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.App.Data; using Enigma5.Crypto.DataProviders; diff --git a/Enigma5.App.Tests/Data/VertexFactoryTests.cs b/Enigma5.App.Tests/Data/VertexFactoryTests.cs index ffce486..d51b29c 100644 --- a/Enigma5.App.Tests/Data/VertexFactoryTests.cs +++ b/Enigma5.App.Tests/Data/VertexFactoryTests.cs @@ -1,6 +1,26 @@ -using Autofac; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Autofac; using Enigma5.App.Data; -using Enigma5.App.Security.Contracts; +using Enigma5.Security.Contracts; using Enigma5.Crypto.DataProviders; namespace Enigma5.App.Tests.Data; diff --git a/Enigma5.App.Tests/LifetimeScopeExtensions.cs b/Enigma5.App.Tests/LifetimeScopeExtensions.cs index c41a4e4..65f56f8 100644 --- a/Enigma5.App.Tests/LifetimeScopeExtensions.cs +++ b/Enigma5.App.Tests/LifetimeScopeExtensions.cs @@ -1,7 +1,27 @@ -using System.Text; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using System.Text; using Autofac; using Enigma5.App.Data; -using Enigma5.App.Security.Contracts; +using Enigma5.Security.Contracts; using Enigma5.Crypto.DataProviders; namespace Enigma5.App.Tests; diff --git a/Enigma5.App.Tests/Resources/Handlers/BroadcastHandlerTests.cs b/Enigma5.App.Tests/Resources/Handlers/BroadcastHandlerTests.cs index 592f79b..ff8c128 100644 --- a/Enigma5.App.Tests/Resources/Handlers/BroadcastHandlerTests.cs +++ b/Enigma5.App.Tests/Resources/Handlers/BroadcastHandlerTests.cs @@ -1,5 +1,24 @@ -using Autofac; -using AutoMapper; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Autofac; using Enigma5.App.Data; using Enigma5.App.Data.Extensions; using Enigma5.App.Models; diff --git a/Enigma5.App.Tests/Resources/Handlers/UpdateLocalAdjyacencyHandlerTests.cs b/Enigma5.App.Tests/Resources/Handlers/UpdateLocalAdjyacencyHandlerTests.cs index e4059e0..e6eebd3 100644 --- a/Enigma5.App.Tests/Resources/Handlers/UpdateLocalAdjyacencyHandlerTests.cs +++ b/Enigma5.App.Tests/Resources/Handlers/UpdateLocalAdjyacencyHandlerTests.cs @@ -1,9 +1,29 @@ -using Autofac; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Autofac; using Enigma5.App.Data; using Enigma5.App.Models; using Enigma5.App.Resources.Commands; using Enigma5.App.Resources.Handlers; -using Enigma5.App.Security.Contracts; +using Enigma5.Security.Contracts; using Enigma5.Crypto.DataProviders; namespace Enigma5.App.Tests.Resources.Handlers; diff --git a/Enigma5.App.Tests/Usings.cs b/Enigma5.App.Tests/Usings.cs index 7fef4b0..409e6b5 100644 --- a/Enigma5.App.Tests/Usings.cs +++ b/Enigma5.App.Tests/Usings.cs @@ -1,2 +1,22 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + global using Xunit; global using FluentAssertions; \ No newline at end of file diff --git a/Enigma5.App/App.cs b/Enigma5.App/App.cs index 5ac844d..f88bb55 100644 --- a/Enigma5.App/App.cs +++ b/Enigma5.App/App.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Data; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Data; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Hosting; diff --git a/Enigma5.App/Attributes/AuthorizedServiceOnlyAttribute.cs b/Enigma5.App/Attributes/AuthorizedServiceOnlyAttribute.cs index a7e1cbf..e53cb8b 100644 --- a/Enigma5.App/Attributes/AuthorizedServiceOnlyAttribute.cs +++ b/Enigma5.App/Attributes/AuthorizedServiceOnlyAttribute.cs @@ -1,4 +1,24 @@ -namespace Enigma5.App.Attributes; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +namespace Enigma5.App.Attributes; [AttributeUsage(AttributeTargets.Method)] public class AuthorizedServiceOnlyAttribute: Attribute { } diff --git a/Enigma5.App/Attributes/OnionParserAttribute.cs b/Enigma5.App/Attributes/OnionParserAttribute.cs index b4254aa..2d0b268 100644 --- a/Enigma5.App/Attributes/OnionParserAttribute.cs +++ b/Enigma5.App/Attributes/OnionParserAttribute.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.App.Attributes; [AttributeUsage(AttributeTargets.Method)] diff --git a/Enigma5.App/Attributes/OnionRouterAttribute.cs b/Enigma5.App/Attributes/OnionRouterAttribute.cs index ff58960..fa02392 100644 --- a/Enigma5.App/Attributes/OnionRouterAttribute.cs +++ b/Enigma5.App/Attributes/OnionRouterAttribute.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.App.Attributes; [AttributeUsage(AttributeTargets.Method)] diff --git a/Enigma5.App/Attributes/ValidateModelAttribute.cs b/Enigma5.App/Attributes/ValidateModelAttribute.cs index 937c308..2253f46 100644 --- a/Enigma5.App/Attributes/ValidateModelAttribute.cs +++ b/Enigma5.App/Attributes/ValidateModelAttribute.cs @@ -1,4 +1,24 @@ -namespace Enigma5.App.Attributes; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +namespace Enigma5.App.Attributes; [AttributeUsage(AttributeTargets.Method)] public class ValidateModelAttribute : Attribute { } diff --git a/Enigma5.App/Data/AuthorizedService.cs b/Enigma5.App/Data/AuthorizedService.cs index faf6f27..2c9c7d9 100644 --- a/Enigma5.App/Data/AuthorizedService.cs +++ b/Enigma5.App/Data/AuthorizedService.cs @@ -1,3 +1,23 @@ -namespace Enigma5.App.Data; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +namespace Enigma5.App.Data; public record class AuthorizedService(int Id, string Address); diff --git a/Enigma5.App/Data/EnigmaDbContext.cs b/Enigma5.App/Data/EnigmaDbContext.cs index a6c12a4..13b69ce 100644 --- a/Enigma5.App/Data/EnigmaDbContext.cs +++ b/Enigma5.App/Data/EnigmaDbContext.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Microsoft.EntityFrameworkCore; namespace Enigma5.App.Data; diff --git a/Enigma5.App/Data/Extensions/AdjacencyListExtensions.cs b/Enigma5.App/Data/Extensions/AdjacencyListExtensions.cs index 5ec9bdc..b42c31f 100644 --- a/Enigma5.App/Data/Extensions/AdjacencyListExtensions.cs +++ b/Enigma5.App/Data/Extensions/AdjacencyListExtensions.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Models; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Models; namespace Enigma5.App.Data.Extensions; diff --git a/Enigma5.App/Data/Extensions/VertexBroadcastRequestExtensions.cs b/Enigma5.App/Data/Extensions/VertexBroadcastRequestExtensions.cs index 0878e9b..1c53d1c 100644 --- a/Enigma5.App/Data/Extensions/VertexBroadcastRequestExtensions.cs +++ b/Enigma5.App/Data/Extensions/VertexBroadcastRequestExtensions.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Models; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Models; namespace Enigma5.App.Data.Extensions; diff --git a/Enigma5.App/Data/Extensions/VertexExtensions.cs b/Enigma5.App/Data/Extensions/VertexExtensions.cs index 6f63640..3db1156 100644 --- a/Enigma5.App/Data/Extensions/VertexExtensions.cs +++ b/Enigma5.App/Data/Extensions/VertexExtensions.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Models; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Models; namespace Enigma5.App.Data.Extensions; diff --git a/Enigma5.App/Data/Neighborhood.cs b/Enigma5.App/Data/Neighborhood.cs index 60fb20a..cf686cf 100644 --- a/Enigma5.App/Data/Neighborhood.cs +++ b/Enigma5.App/Data/Neighborhood.cs @@ -1,5 +1,24 @@ -using System.Text.Json.Serialization; -using Enigma5.App.Models; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using System.Text.Json.Serialization; namespace Enigma5.App.Data; diff --git a/Enigma5.App/Data/NetworkGraph.cs b/Enigma5.App/Data/NetworkGraph.cs index 4aea764..136cc0d 100644 --- a/Enigma5.App/Data/NetworkGraph.cs +++ b/Enigma5.App/Data/NetworkGraph.cs @@ -1,10 +1,30 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using System.Text; using System.Text.Json; using Enigma5.App.Common.Extensions; using Enigma5.App.Common.Utils; using Enigma5.App.Data.Extensions; using Enigma5.App.Models; -using Enigma5.App.Security.Contracts; +using Enigma5.Security.Contracts; using Enigma5.Crypto; using Microsoft.Extensions.Configuration; diff --git a/Enigma5.App/Data/NetworkGraphValidationPolicy.cs b/Enigma5.App/Data/NetworkGraphValidationPolicy.cs index 8169ffa..25430ee 100644 --- a/Enigma5.App/Data/NetworkGraphValidationPolicy.cs +++ b/Enigma5.App/Data/NetworkGraphValidationPolicy.cs @@ -1,4 +1,24 @@ -using Enigma5.Crypto; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.Crypto; using System.Text.Json; using Enigma5.App.Models.Extensions; diff --git a/Enigma5.App/Data/PendingMessage.cs b/Enigma5.App/Data/PendingMessage.cs index f7838f9..f255cc1 100644 --- a/Enigma5.App/Data/PendingMessage.cs +++ b/Enigma5.App/Data/PendingMessage.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.App.Data; public class PendingMessage diff --git a/Enigma5.App/Data/SharedData.cs b/Enigma5.App/Data/SharedData.cs index 85006dc..7513152 100644 --- a/Enigma5.App/Data/SharedData.cs +++ b/Enigma5.App/Data/SharedData.cs @@ -1,4 +1,24 @@ -using System.ComponentModel.DataAnnotations; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using System.ComponentModel.DataAnnotations; namespace Enigma5.App.Data; diff --git a/Enigma5.App/Data/Vertex.cs b/Enigma5.App/Data/Vertex.cs index 7d44a6a..ac095a7 100644 --- a/Enigma5.App/Data/Vertex.cs +++ b/Enigma5.App/Data/Vertex.cs @@ -1,8 +1,28 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using System.Text; using System.Text.Json; using System.Text.Json.Serialization; using Enigma5.App.Common.Extensions; -using Enigma5.App.Security.Contracts; +using Enigma5.Security.Contracts; using Enigma5.Crypto; namespace Enigma5.App.Data; diff --git a/Enigma5.App/Extensions/DbContextExtensions.cs b/Enigma5.App/Extensions/DbContextExtensions.cs index 28e9a59..56567a7 100644 --- a/Enigma5.App/Extensions/DbContextExtensions.cs +++ b/Enigma5.App/Extensions/DbContextExtensions.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.App.Data; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; diff --git a/Enigma5.App/Extensions/HangfireExtensions.cs b/Enigma5.App/Extensions/HangfireExtensions.cs index c18c63d..830f000 100644 --- a/Enigma5.App/Extensions/HangfireExtensions.cs +++ b/Enigma5.App/Extensions/HangfireExtensions.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.App.Hangfire; using Hangfire; using Microsoft.Extensions.DependencyInjection; diff --git a/Enigma5.App/Extensions/MediatRExtensions.cs b/Enigma5.App/Extensions/MediatRExtensions.cs index 7bc1004..dfd043c 100644 --- a/Enigma5.App/Extensions/MediatRExtensions.cs +++ b/Enigma5.App/Extensions/MediatRExtensions.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.App.Resources.Handlers; using Microsoft.Extensions.DependencyInjection; diff --git a/Enigma5.App/Hangfire/HangfireActivator.cs b/Enigma5.App/Hangfire/HangfireActivator.cs index 59fb870..d17ca8e 100644 --- a/Enigma5.App/Hangfire/HangfireActivator.cs +++ b/Enigma5.App/Hangfire/HangfireActivator.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Hangfire; namespace Enigma5.App.Hangfire; diff --git a/Enigma5.App/Hangfire/MediatorHangfireBridge.cs b/Enigma5.App/Hangfire/MediatorHangfireBridge.cs index 2864df6..a11b9f6 100644 --- a/Enigma5.App/Hangfire/MediatorHangfireBridge.cs +++ b/Enigma5.App/Hangfire/MediatorHangfireBridge.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using MediatR; using Microsoft.Extensions.Logging; diff --git a/Enigma5.App/Hubs/Adapters/OnionParsingHubAdapter.cs b/Enigma5.App/Hubs/Adapters/OnionParsingHubAdapter.cs index fff4794..3736d55 100644 --- a/Enigma5.App/Hubs/Adapters/OnionParsingHubAdapter.cs +++ b/Enigma5.App/Hubs/Adapters/OnionParsingHubAdapter.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.App.Common.Contracts.Hubs; using Enigma5.App.Hubs.Extensions; using Microsoft.AspNetCore.SignalR; diff --git a/Enigma5.App/Hubs/Adapters/OnionRoutingHubAdapter.cs b/Enigma5.App/Hubs/Adapters/OnionRoutingHubAdapter.cs index 5ba6d5b..93557a1 100644 --- a/Enigma5.App/Hubs/Adapters/OnionRoutingHubAdapter.cs +++ b/Enigma5.App/Hubs/Adapters/OnionRoutingHubAdapter.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.App.Common.Contracts.Hubs; using Enigma5.App.Hubs.Extensions; using Microsoft.AspNetCore.SignalR; diff --git a/Enigma5.App/Hubs/Extensions/HubExtensions.cs b/Enigma5.App/Hubs/Extensions/HubExtensions.cs index b592677..71da10e 100644 --- a/Enigma5.App/Hubs/Extensions/HubExtensions.cs +++ b/Enigma5.App/Hubs/Extensions/HubExtensions.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Microsoft.AspNetCore.SignalR; namespace Enigma5.App.Hubs.Extensions; diff --git a/Enigma5.App/Hubs/Extensions/HubInvocationContextExtensions.cs b/Enigma5.App/Hubs/Extensions/HubInvocationContextExtensions.cs index af238d4..0742bc1 100644 --- a/Enigma5.App/Hubs/Extensions/HubInvocationContextExtensions.cs +++ b/Enigma5.App/Hubs/Extensions/HubInvocationContextExtensions.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Microsoft.AspNetCore.SignalR; namespace Enigma5.App.Hubs.Extensions; diff --git a/Enigma5.App/Hubs/Filters/AuthorizedServiceOnlyFilter.cs b/Enigma5.App/Hubs/Filters/AuthorizedServiceOnlyFilter.cs index c892a23..129b0b3 100644 --- a/Enigma5.App/Hubs/Filters/AuthorizedServiceOnlyFilter.cs +++ b/Enigma5.App/Hubs/Filters/AuthorizedServiceOnlyFilter.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Attributes; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Attributes; using Enigma5.App.Common.Contracts.Hubs; using Microsoft.AspNetCore.SignalR; using Enigma5.App.Hubs.Sessions; diff --git a/Enigma5.App/Hubs/Filters/BaseFilter.cs b/Enigma5.App/Hubs/Filters/BaseFilter.cs index f60ffe3..bb01615 100644 --- a/Enigma5.App/Hubs/Filters/BaseFilter.cs +++ b/Enigma5.App/Hubs/Filters/BaseFilter.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Microsoft.AspNetCore.SignalR; namespace Enigma5.App.Hubs.Filters; diff --git a/Enigma5.App/Hubs/Filters/LogFilter.cs b/Enigma5.App/Hubs/Filters/LogFilter.cs index a9e1373..490b306 100644 --- a/Enigma5.App/Hubs/Filters/LogFilter.cs +++ b/Enigma5.App/Hubs/Filters/LogFilter.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.App.Models.HubInvocation; using Microsoft.AspNetCore.SignalR; using Microsoft.Extensions.Logging; diff --git a/Enigma5.App/Hubs/Filters/OnionParsingFilter.cs b/Enigma5.App/Hubs/Filters/OnionParsingFilter.cs index 7cf84d7..0eb6a2f 100644 --- a/Enigma5.App/Hubs/Filters/OnionParsingFilter.cs +++ b/Enigma5.App/Hubs/Filters/OnionParsingFilter.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Microsoft.AspNetCore.SignalR; using Enigma5.App.Attributes; using Enigma5.App.Hubs.Extensions; diff --git a/Enigma5.App/Hubs/Filters/OnionRoutingFilter.cs b/Enigma5.App/Hubs/Filters/OnionRoutingFilter.cs index 5c0da93..0ab5ee6 100644 --- a/Enigma5.App/Hubs/Filters/OnionRoutingFilter.cs +++ b/Enigma5.App/Hubs/Filters/OnionRoutingFilter.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Microsoft.AspNetCore.SignalR; using Enigma5.App.Attributes; using Enigma5.App.Hubs.Sessions; diff --git a/Enigma5.App/Hubs/Filters/ValidateModelFilter.cs b/Enigma5.App/Hubs/Filters/ValidateModelFilter.cs index 9e762ab..9097426 100644 --- a/Enigma5.App/Hubs/Filters/ValidateModelFilter.cs +++ b/Enigma5.App/Hubs/Filters/ValidateModelFilter.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Attributes; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Attributes; using Enigma5.App.Common.Contracts.Hubs; using Enigma5.App.Hubs.Extensions; using Enigma5.App.Models.Contracts; diff --git a/Enigma5.App/Hubs/InvocationErrors.cs b/Enigma5.App/Hubs/InvocationErrors.cs index 3302dbb..8a2a295 100644 --- a/Enigma5.App/Hubs/InvocationErrors.cs +++ b/Enigma5.App/Hubs/InvocationErrors.cs @@ -1,4 +1,24 @@ -namespace Enigma5.App.Hubs; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +namespace Enigma5.App.Hubs; public class InvocationErrors { diff --git a/Enigma5.App/Hubs/RoutingHub.cs b/Enigma5.App/Hubs/RoutingHub.cs index cb7fb14..fa035f8 100644 --- a/Enigma5.App/Hubs/RoutingHub.cs +++ b/Enigma5.App/Hubs/RoutingHub.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.App.Attributes; using Enigma5.App.Hubs.Sessions; using Enigma5.App.Resources.Commands; @@ -5,7 +25,7 @@ using Enigma5.App.Resources.Queries; using Enigma5.App.Models; using Enigma5.Crypto; -using Enigma5.App.Security.Contracts; +using Enigma5.Security.Contracts; using Enigma5.App.Common.Contracts.Hubs; using Enigma5.App.Data; using Microsoft.AspNetCore.SignalR; diff --git a/Enigma5.App/Hubs/RoutingHubHelpers.cs b/Enigma5.App/Hubs/RoutingHubHelpers.cs index 1598eca..947771a 100644 --- a/Enigma5.App/Hubs/RoutingHubHelpers.cs +++ b/Enigma5.App/Hubs/RoutingHubHelpers.cs @@ -1,4 +1,24 @@ -using System.Reflection; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using System.Reflection; using Enigma5.App.Attributes; using Enigma5.App.Data; using Enigma5.App.Models; diff --git a/Enigma5.App/Hubs/Sessions/ConnectionsMapper.cs b/Enigma5.App/Hubs/Sessions/ConnectionsMapper.cs index 9ad2093..46f2067 100644 --- a/Enigma5.App/Hubs/Sessions/ConnectionsMapper.cs +++ b/Enigma5.App/Hubs/Sessions/ConnectionsMapper.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.App.Common.Utils; namespace Enigma5.App.Hubs.Sessions; diff --git a/Enigma5.App/Hubs/Sessions/SessionManager.cs b/Enigma5.App/Hubs/Sessions/SessionManager.cs index 60f0e94..4e4bf55 100644 --- a/Enigma5.App/Hubs/Sessions/SessionManager.cs +++ b/Enigma5.App/Hubs/Sessions/SessionManager.cs @@ -1,6 +1,26 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.App.Common.Utils; using Enigma5.App.Models.Extensions; -using Enigma5.App.Security.Contracts; +using Enigma5.Security.Contracts; using Enigma5.Crypto; using Enigma5.Structures; diff --git a/Enigma5.App/Resources/Commands/CleanupMessagesCommand.cs b/Enigma5.App/Resources/Commands/CleanupMessagesCommand.cs index 7899678..48a3d5e 100644 --- a/Enigma5.App/Resources/Commands/CleanupMessagesCommand.cs +++ b/Enigma5.App/Resources/Commands/CleanupMessagesCommand.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using MediatR; namespace Enigma5.App.Resources.Commands; diff --git a/Enigma5.App/Resources/Commands/CleanupSharedDataCommand.cs b/Enigma5.App/Resources/Commands/CleanupSharedDataCommand.cs index 9c2d7e7..6a96293 100644 --- a/Enigma5.App/Resources/Commands/CleanupSharedDataCommand.cs +++ b/Enigma5.App/Resources/Commands/CleanupSharedDataCommand.cs @@ -1,4 +1,24 @@ -using MediatR; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using MediatR; namespace Enigma5.App.Resources.Commands; diff --git a/Enigma5.App/Resources/Commands/CreatePendingMessageCommand.cs b/Enigma5.App/Resources/Commands/CreatePendingMessageCommand.cs index 4d575c1..686405f 100644 --- a/Enigma5.App/Resources/Commands/CreatePendingMessageCommand.cs +++ b/Enigma5.App/Resources/Commands/CreatePendingMessageCommand.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.App.Data; using MediatR; diff --git a/Enigma5.App/Resources/Commands/CreateShareDataCommand.cs b/Enigma5.App/Resources/Commands/CreateShareDataCommand.cs index 683b785..cbc7408 100644 --- a/Enigma5.App/Resources/Commands/CreateShareDataCommand.cs +++ b/Enigma5.App/Resources/Commands/CreateShareDataCommand.cs @@ -1,4 +1,24 @@ -using MediatR; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using MediatR; namespace Enigma5.App.Resources.Commands; diff --git a/Enigma5.App/Resources/Commands/HandleBroadcastCommand.cs b/Enigma5.App/Resources/Commands/HandleBroadcastCommand.cs index c26373b..f8e5d33 100644 --- a/Enigma5.App/Resources/Commands/HandleBroadcastCommand.cs +++ b/Enigma5.App/Resources/Commands/HandleBroadcastCommand.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Data; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Data; using Enigma5.App.Models; using MediatR; diff --git a/Enigma5.App/Resources/Commands/MarkMessagesAsDeliveredCommand.cs b/Enigma5.App/Resources/Commands/MarkMessagesAsDeliveredCommand.cs index d744304..8fc718b 100644 --- a/Enigma5.App/Resources/Commands/MarkMessagesAsDeliveredCommand.cs +++ b/Enigma5.App/Resources/Commands/MarkMessagesAsDeliveredCommand.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using MediatR; namespace Enigma5.App.Resources.Commands; diff --git a/Enigma5.App/Resources/Commands/RemoveMessagesCommand.cs b/Enigma5.App/Resources/Commands/RemoveMessagesCommand.cs index 75ed3fb..ede81d5 100644 --- a/Enigma5.App/Resources/Commands/RemoveMessagesCommand.cs +++ b/Enigma5.App/Resources/Commands/RemoveMessagesCommand.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using MediatR; namespace Enigma5.App.Resources.Commands; diff --git a/Enigma5.App/Resources/Commands/RemoveSharedDataCommand.cs b/Enigma5.App/Resources/Commands/RemoveSharedDataCommand.cs index a199d1f..0c493f7 100644 --- a/Enigma5.App/Resources/Commands/RemoveSharedDataCommand.cs +++ b/Enigma5.App/Resources/Commands/RemoveSharedDataCommand.cs @@ -1,4 +1,24 @@ -using MediatR; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using MediatR; namespace Enigma5.App.Resources.Commands; diff --git a/Enigma5.App/Resources/Commands/UpdateLocalAdjacencyCommand.cs b/Enigma5.App/Resources/Commands/UpdateLocalAdjacencyCommand.cs index 35e9ca1..169b485 100644 --- a/Enigma5.App/Resources/Commands/UpdateLocalAdjacencyCommand.cs +++ b/Enigma5.App/Resources/Commands/UpdateLocalAdjacencyCommand.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Data; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Data; using Enigma5.App.Models; using MediatR; diff --git a/Enigma5.App/Resources/Handlers/BroadcastHandler.cs b/Enigma5.App/Resources/Handlers/BroadcastHandler.cs index 1b2efe5..fdb9993 100644 --- a/Enigma5.App/Resources/Handlers/BroadcastHandler.cs +++ b/Enigma5.App/Resources/Handlers/BroadcastHandler.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Data; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Data; using Enigma5.App.Data.Extensions; using Enigma5.App.Models; using Enigma5.App.Resources.Commands; diff --git a/Enigma5.App/Resources/Handlers/CheckAuthorizedServiceHandler.cs b/Enigma5.App/Resources/Handlers/CheckAuthorizedServiceHandler.cs index 07c3586..20c5a5c 100644 --- a/Enigma5.App/Resources/Handlers/CheckAuthorizedServiceHandler.cs +++ b/Enigma5.App/Resources/Handlers/CheckAuthorizedServiceHandler.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Data; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Data; using Enigma5.App.Resources.Queries; using MediatR; using Microsoft.EntityFrameworkCore; diff --git a/Enigma5.App/Resources/Handlers/CleanupMessagesHandler.cs b/Enigma5.App/Resources/Handlers/CleanupMessagesHandler.cs index 663b381..bb303a2 100644 --- a/Enigma5.App/Resources/Handlers/CleanupMessagesHandler.cs +++ b/Enigma5.App/Resources/Handlers/CleanupMessagesHandler.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.App.Data; using Enigma5.App.Resources.Commands; using MediatR; diff --git a/Enigma5.App/Resources/Handlers/CleanupSharedDataHandler.cs b/Enigma5.App/Resources/Handlers/CleanupSharedDataHandler.cs index 6c3e76c..a5bd451 100644 --- a/Enigma5.App/Resources/Handlers/CleanupSharedDataHandler.cs +++ b/Enigma5.App/Resources/Handlers/CleanupSharedDataHandler.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Data; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Data; using Enigma5.App.Resources.Commands; using MediatR; using Microsoft.EntityFrameworkCore; diff --git a/Enigma5.App/Resources/Handlers/CreatePendingMessageHandler.cs b/Enigma5.App/Resources/Handlers/CreatePendingMessageHandler.cs index 136c464..299b467 100644 --- a/Enigma5.App/Resources/Handlers/CreatePendingMessageHandler.cs +++ b/Enigma5.App/Resources/Handlers/CreatePendingMessageHandler.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.App.Data; using Enigma5.App.Resources.Commands; using MediatR; diff --git a/Enigma5.App/Resources/Handlers/CreateShareDataHandler.cs b/Enigma5.App/Resources/Handlers/CreateShareDataHandler.cs index 9349e2d..0aa8602 100644 --- a/Enigma5.App/Resources/Handlers/CreateShareDataHandler.cs +++ b/Enigma5.App/Resources/Handlers/CreateShareDataHandler.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Data; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Data; using Enigma5.App.Resources.Commands; using MediatR; diff --git a/Enigma5.App/Resources/Handlers/GetPendingMessagesByDestinationHandler.cs b/Enigma5.App/Resources/Handlers/GetPendingMessagesByDestinationHandler.cs index 2e9f24c..e3e3220 100644 --- a/Enigma5.App/Resources/Handlers/GetPendingMessagesByDestinationHandler.cs +++ b/Enigma5.App/Resources/Handlers/GetPendingMessagesByDestinationHandler.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.App.Data; using Enigma5.App.Resources.Queries; using MediatR; diff --git a/Enigma5.App/Resources/Handlers/GetSharedDataHandler.cs b/Enigma5.App/Resources/Handlers/GetSharedDataHandler.cs index 584f0b0..efc12e6 100644 --- a/Enigma5.App/Resources/Handlers/GetSharedDataHandler.cs +++ b/Enigma5.App/Resources/Handlers/GetSharedDataHandler.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Data; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Data; using Enigma5.App.Resources.Queries; using MediatR; using Microsoft.EntityFrameworkCore; diff --git a/Enigma5.App/Resources/Handlers/MarkMessagesAsDeliveredHandler.cs b/Enigma5.App/Resources/Handlers/MarkMessagesAsDeliveredHandler.cs index c5bdbce..dcff82e 100644 --- a/Enigma5.App/Resources/Handlers/MarkMessagesAsDeliveredHandler.cs +++ b/Enigma5.App/Resources/Handlers/MarkMessagesAsDeliveredHandler.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.App.Data; using Enigma5.App.Resources.Commands; using MediatR; diff --git a/Enigma5.App/Resources/Handlers/RemoveMessagesHandler.cs b/Enigma5.App/Resources/Handlers/RemoveMessagesHandler.cs index 03b2c3b..e5ed8dd 100644 --- a/Enigma5.App/Resources/Handlers/RemoveMessagesHandler.cs +++ b/Enigma5.App/Resources/Handlers/RemoveMessagesHandler.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.App.Data; using Enigma5.App.Resources.Commands; using MediatR; diff --git a/Enigma5.App/Resources/Handlers/RemoveSharedDataHandler.cs b/Enigma5.App/Resources/Handlers/RemoveSharedDataHandler.cs index 053eb12..1da9815 100644 --- a/Enigma5.App/Resources/Handlers/RemoveSharedDataHandler.cs +++ b/Enigma5.App/Resources/Handlers/RemoveSharedDataHandler.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Data; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Data; using Enigma5.App.Resources.Commands; using MediatR; using Microsoft.EntityFrameworkCore; diff --git a/Enigma5.App/Resources/Handlers/RequestResponseLoggingBehavior.cs b/Enigma5.App/Resources/Handlers/RequestResponseLoggingBehavior.cs index c3ca779..f2961c2 100644 --- a/Enigma5.App/Resources/Handlers/RequestResponseLoggingBehavior.cs +++ b/Enigma5.App/Resources/Handlers/RequestResponseLoggingBehavior.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using MediatR; using Microsoft.Extensions.Logging; diff --git a/Enigma5.App/Resources/Handlers/UpdateLocalAdjacencyHandler.cs b/Enigma5.App/Resources/Handlers/UpdateLocalAdjacencyHandler.cs index 8d20f31..c377c51 100644 --- a/Enigma5.App/Resources/Handlers/UpdateLocalAdjacencyHandler.cs +++ b/Enigma5.App/Resources/Handlers/UpdateLocalAdjacencyHandler.cs @@ -1,7 +1,27 @@ -using Enigma5.App.Data; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Data; using Enigma5.App.Models; using Enigma5.App.Resources.Commands; -using Enigma5.App.Security.Contracts; +using Enigma5.Security.Contracts; using MediatR; using Microsoft.Extensions.Logging; diff --git a/Enigma5.App/Resources/Queries/CheckAuthorizedServiceQuery.cs b/Enigma5.App/Resources/Queries/CheckAuthorizedServiceQuery.cs index 47bf7d9..7bde93a 100644 --- a/Enigma5.App/Resources/Queries/CheckAuthorizedServiceQuery.cs +++ b/Enigma5.App/Resources/Queries/CheckAuthorizedServiceQuery.cs @@ -1,4 +1,24 @@ -using MediatR; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using MediatR; namespace Enigma5.App.Resources.Queries; diff --git a/Enigma5.App/Resources/Queries/GetPendingMessagesByDestinationQuery.cs b/Enigma5.App/Resources/Queries/GetPendingMessagesByDestinationQuery.cs index 7f50f8d..53152da 100644 --- a/Enigma5.App/Resources/Queries/GetPendingMessagesByDestinationQuery.cs +++ b/Enigma5.App/Resources/Queries/GetPendingMessagesByDestinationQuery.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.App.Data; using MediatR; diff --git a/Enigma5.App/Resources/Queries/GetSharedDataQuery.cs b/Enigma5.App/Resources/Queries/GetSharedDataQuery.cs index 51dfe13..8a4ae17 100644 --- a/Enigma5.App/Resources/Queries/GetSharedDataQuery.cs +++ b/Enigma5.App/Resources/Queries/GetSharedDataQuery.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Data; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Data; using MediatR; namespace Enigma5.App.Resources.Queries; diff --git a/Enigma5.App/StartupConfiguration.cs b/Enigma5.App/StartupConfiguration.cs index f96a071..d168f6e 100644 --- a/Enigma5.App/StartupConfiguration.cs +++ b/Enigma5.App/StartupConfiguration.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.App.Hubs; using Enigma5.App.Hubs.Filters; using Enigma5.App.Hubs.Sessions; @@ -15,12 +35,11 @@ using Enigma5.Crypto; using System.Text; using System.Text.Json; -using Enigma5.App.Security.Contracts; +using Enigma5.Security.Contracts; using MediatR; using Enigma5.App.Resources.Queries; using Enigma5.App.Common.Extensions; using Enigma5.Security; -using Enigma5.Security.Contracts; using Hangfire; namespace Enigma5.App; diff --git a/Enigma5.Crypto.Tests/CertificateHelper.cs b/Enigma5.Crypto.Tests/CertificateHelper.cs index 830e19e..4b8aed4 100644 --- a/Enigma5.Crypto.Tests/CertificateHelper.cs +++ b/Enigma5.Crypto.Tests/CertificateHelper.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.Crypto.DataProviders; using Xunit; diff --git a/Enigma5.Crypto.Tests/EnvelopeTests.cs b/Enigma5.Crypto.Tests/EnvelopeTests.cs index e0a3d0b..fd8c4f8 100644 --- a/Enigma5.Crypto.Tests/EnvelopeTests.cs +++ b/Enigma5.Crypto.Tests/EnvelopeTests.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using System.Text; using Enigma5.Crypto.DataProviders; using Xunit; diff --git a/Enigma5.Crypto.Tests/HashProvider.cs b/Enigma5.Crypto.Tests/HashProvider.cs index f7dd1c4..c75e289 100644 --- a/Enigma5.Crypto.Tests/HashProvider.cs +++ b/Enigma5.Crypto.Tests/HashProvider.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using System.Text; using Xunit; diff --git a/Enigma5.Crypto/AssemblyInfo.cs b/Enigma5.Crypto/AssemblyInfo.cs index 7af3955..af77396 100644 --- a/Enigma5.Crypto/AssemblyInfo.cs +++ b/Enigma5.Crypto/AssemblyInfo.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using System.Runtime.CompilerServices; [assembly: DisableRuntimeMarshalling] diff --git a/Enigma5.Crypto/CertificatesHelper.cs b/Enigma5.Crypto/CertificatesHelper.cs index 35a08a5..70d520e 100644 --- a/Enigma5.Crypto/CertificatesHelper.cs +++ b/Enigma5.Crypto/CertificatesHelper.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using System.Text; namespace Enigma5.Crypto; diff --git a/Enigma5.Crypto/Constants.cs b/Enigma5.Crypto/Constants.cs index 5abc48b..4c4df64 100644 --- a/Enigma5.Crypto/Constants.cs +++ b/Enigma5.Crypto/Constants.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.Crypto; public sealed class Constants diff --git a/Enigma5.Crypto/Contracts/IEnvelopeSeal.cs b/Enigma5.Crypto/Contracts/IEnvelopeSeal.cs index e5d7662..1e74cae 100644 --- a/Enigma5.Crypto/Contracts/IEnvelopeSeal.cs +++ b/Enigma5.Crypto/Contracts/IEnvelopeSeal.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.Crypto.Contracts; public interface IEnvelopeSeal : IDisposable diff --git a/Enigma5.Crypto/Contracts/IEnvelopeSign.cs b/Enigma5.Crypto/Contracts/IEnvelopeSign.cs index e7ed171..372ed33 100644 --- a/Enigma5.Crypto/Contracts/IEnvelopeSign.cs +++ b/Enigma5.Crypto/Contracts/IEnvelopeSign.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.Crypto.Contracts; public interface IEnvelopeSign : IDisposable diff --git a/Enigma5.Crypto/Contracts/IEnvelopeUnseal.cs b/Enigma5.Crypto/Contracts/IEnvelopeUnseal.cs index 496d4fd..b284f1e 100644 --- a/Enigma5.Crypto/Contracts/IEnvelopeUnseal.cs +++ b/Enigma5.Crypto/Contracts/IEnvelopeUnseal.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.Crypto.Contracts; public interface IEnvelopeUnseal : IDisposable diff --git a/Enigma5.Crypto/Contracts/IEnvelopeVerify.cs b/Enigma5.Crypto/Contracts/IEnvelopeVerify.cs index bd59759..9d1f7b2 100644 --- a/Enigma5.Crypto/Contracts/IEnvelopeVerify.cs +++ b/Enigma5.Crypto/Contracts/IEnvelopeVerify.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.Crypto.Contracts; public interface IEnvelopeVerify : IDisposable diff --git a/Enigma5.Crypto/CryptoContext.cs b/Enigma5.Crypto/CryptoContext.cs index b7a1049..26e7c09 100644 --- a/Enigma5.Crypto/CryptoContext.cs +++ b/Enigma5.Crypto/CryptoContext.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.Crypto; internal sealed class CryptoContext : IDisposable diff --git a/Enigma5.Crypto/DataProviders/PKey.cs b/Enigma5.Crypto/DataProviders/PKey.cs index b06cb61..760b3f9 100644 --- a/Enigma5.Crypto/DataProviders/PKey.cs +++ b/Enigma5.Crypto/DataProviders/PKey.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.Crypto.DataProviders; public static class PKey diff --git a/Enigma5.Crypto/DataProviders/TestEnvelope.cs b/Enigma5.Crypto/DataProviders/TestEnvelope.cs index ef736d8..bfbb25e 100644 --- a/Enigma5.Crypto/DataProviders/TestEnvelope.cs +++ b/Enigma5.Crypto/DataProviders/TestEnvelope.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.Crypto.DataProviders; public class TestEnvelope diff --git a/Enigma5.Crypto/DataProviders/TestSignature.cs b/Enigma5.Crypto/DataProviders/TestSignature.cs index 8c5cf3d..d186945 100644 --- a/Enigma5.Crypto/DataProviders/TestSignature.cs +++ b/Enigma5.Crypto/DataProviders/TestSignature.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using System.Text; namespace Enigma5.Crypto.DataProviders; diff --git a/Enigma5.Crypto/Envelope.cs b/Enigma5.Crypto/Envelope.cs index baa7c32..2b947ff 100644 --- a/Enigma5.Crypto/Envelope.cs +++ b/Enigma5.Crypto/Envelope.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.Crypto.Contracts; namespace Enigma5.Crypto; diff --git a/Enigma5.Crypto/HashProvider.cs b/Enigma5.Crypto/HashProvider.cs index de1e4e4..62bca26 100644 --- a/Enigma5.Crypto/HashProvider.cs +++ b/Enigma5.Crypto/HashProvider.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using System.Security.Cryptography; using System.Text; diff --git a/Enigma5.Crypto/KernelKey.cs b/Enigma5.Crypto/KernelKey.cs index 3a73dae..8263a14 100644 --- a/Enigma5.Crypto/KernelKey.cs +++ b/Enigma5.Crypto/KernelKey.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using System.Runtime.InteropServices; namespace Enigma5.Crypto; diff --git a/Enigma5.Crypto/KernelKeyring.cs b/Enigma5.Crypto/KernelKeyring.cs index ebc50db..f14ef90 100644 --- a/Enigma5.Crypto/KernelKeyring.cs +++ b/Enigma5.Crypto/KernelKeyring.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.Crypto; public enum KernelKeyring diff --git a/Enigma5.Crypto/KeyUtil.cs b/Enigma5.Crypto/KeyUtil.cs index 9213a19..2ff0c00 100644 --- a/Enigma5.Crypto/KeyUtil.cs +++ b/Enigma5.Crypto/KeyUtil.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using System.Runtime.InteropServices; namespace Enigma5.Crypto; diff --git a/Enigma5.Crypto/Native.cs b/Enigma5.Crypto/Native.cs index 9f9878d..4f0fc34 100644 --- a/Enigma5.Crypto/Native.cs +++ b/Enigma5.Crypto/Native.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using System.Reflection; using System.Runtime.InteropServices; using System.Runtime.InteropServices.Marshalling; diff --git a/Enigma5.Crypto/SealProvider.cs b/Enigma5.Crypto/SealProvider.cs index 592df74..3d312b8 100644 --- a/Enigma5.Crypto/SealProvider.cs +++ b/Enigma5.Crypto/SealProvider.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.Crypto.Contracts; using System.Runtime.InteropServices; diff --git a/Enigma5.Security/AzureClient.cs b/Enigma5.Security/AzureClient.cs index 5e8104e..c7630f6 100644 --- a/Enigma5.Security/AzureClient.cs +++ b/Enigma5.Security/AzureClient.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Azure.Identity; using Azure.Security.KeyVault.Secrets; using Enigma5.App.Common.Extensions; diff --git a/Enigma5.Security/AzureKeyReader.cs b/Enigma5.Security/AzureKeyReader.cs index 2a7e858..c88dbd0 100644 --- a/Enigma5.Security/AzureKeyReader.cs +++ b/Enigma5.Security/AzureKeyReader.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.Security.Contracts; using Microsoft.Extensions.Configuration; using Enigma5.App.Common.Extensions; diff --git a/Enigma5.Security/AzurePassphraseReader.cs b/Enigma5.Security/AzurePassphraseReader.cs index 58b62ce..a25e3e4 100644 --- a/Enigma5.Security/AzurePassphraseReader.cs +++ b/Enigma5.Security/AzurePassphraseReader.cs @@ -1,5 +1,25 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.App.Common.Extensions; -using Enigma5.App.Security.Contracts; +using Enigma5.Security.Contracts; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; diff --git a/Enigma5.Security/CertificateManager.cs b/Enigma5.Security/CertificateManager.cs index ab02cbd..126e5fe 100644 --- a/Enigma5.Security/CertificateManager.cs +++ b/Enigma5.Security/CertificateManager.cs @@ -1,5 +1,24 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.App.Common.Utils; -using Enigma5.App.Security.Contracts; using Enigma5.Crypto; using Enigma5.Security.Contracts; diff --git a/Enigma5.Security/CommandLinePassphraseReader.cs b/Enigma5.Security/CommandLinePassphraseReader.cs index cf076c9..066e8e6 100644 --- a/Enigma5.Security/CommandLinePassphraseReader.cs +++ b/Enigma5.Security/CommandLinePassphraseReader.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Security.Contracts; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.Security.Contracts; namespace Enigma5.Security; diff --git a/Enigma5.Security/Contracts/ICertificateManager.cs b/Enigma5.Security/Contracts/ICertificateManager.cs index ba6058b..cab3527 100644 --- a/Enigma5.Security/Contracts/ICertificateManager.cs +++ b/Enigma5.Security/Contracts/ICertificateManager.cs @@ -1,4 +1,24 @@ -namespace Enigma5.App.Security.Contracts; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +namespace Enigma5.Security.Contracts; public interface ICertificateManager { diff --git a/Enigma5.Security/Contracts/IKeysProvider.cs b/Enigma5.Security/Contracts/IKeysProvider.cs index ae42924..b210ffe 100644 --- a/Enigma5.Security/Contracts/IKeysProvider.cs +++ b/Enigma5.Security/Contracts/IKeysProvider.cs @@ -1,4 +1,24 @@ -namespace Enigma5.Security.Contracts; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +namespace Enigma5.Security.Contracts; public interface IKeysReader { diff --git a/Enigma5.Security/Contracts/IPassphraseProvider.cs b/Enigma5.Security/Contracts/IPassphraseProvider.cs index 0d34c98..425549c 100644 --- a/Enigma5.Security/Contracts/IPassphraseProvider.cs +++ b/Enigma5.Security/Contracts/IPassphraseProvider.cs @@ -1,4 +1,24 @@ -namespace Enigma5.App.Security.Contracts; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +namespace Enigma5.Security.Contracts; public interface IPassphraseProvider { diff --git a/Enigma5.Security/DataProviders/TestCertificateManager.cs b/Enigma5.Security/DataProviders/TestCertificateManager.cs index 5a37192..1c1bba0 100644 --- a/Enigma5.Security/DataProviders/TestCertificateManager.cs +++ b/Enigma5.Security/DataProviders/TestCertificateManager.cs @@ -1,5 +1,25 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using System.Text; -using Enigma5.App.Security.Contracts; +using Enigma5.Security.Contracts; using Enigma5.Crypto; namespace Enigma5.Security.DataProviders; diff --git a/Enigma5.Security/Extensions/HubConnectionExtensions.cs b/Enigma5.Security/Extensions/HubConnectionExtensions.cs index 190e830..ad16055 100644 --- a/Enigma5.Security/Extensions/HubConnectionExtensions.cs +++ b/Enigma5.Security/Extensions/HubConnectionExtensions.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Common.Contracts.Hubs; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Common.Contracts.Hubs; using Enigma5.App.Models; using Enigma5.App.Models.HubInvocation; using Enigma5.Crypto; diff --git a/Enigma5.Security/KeysGenerator.cs b/Enigma5.Security/KeysGenerator.cs index 5390837..c705232 100644 --- a/Enigma5.Security/KeysGenerator.cs +++ b/Enigma5.Security/KeysGenerator.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Org.BouncyCastle.Crypto; using Org.BouncyCastle.Crypto.Generators; using Org.BouncyCastle.Security; diff --git a/Enigma5.Security/KeysReader.cs b/Enigma5.Security/KeysReader.cs index b196de2..ce391ba 100644 --- a/Enigma5.Security/KeysReader.cs +++ b/Enigma5.Security/KeysReader.cs @@ -1,6 +1,25 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using System.Text; using Enigma5.App.Common.Extensions; -using Enigma5.App.Security.Contracts; using Enigma5.Security.Contracts; using Microsoft.Extensions.Configuration; using Org.BouncyCastle.Crypto; diff --git a/Enigma5.Structures.Tests/OnionBuilderTests.cs b/Enigma5.Structures.Tests/OnionBuilderTests.cs index efa8817..3876a39 100644 --- a/Enigma5.Structures.Tests/OnionBuilderTests.cs +++ b/Enigma5.Structures.Tests/OnionBuilderTests.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.Structures.Tests.TestData; using Enigma5.Crypto.DataProviders; using Xunit; diff --git a/Enigma5.Structures.Tests/OnionParserTests.cs b/Enigma5.Structures.Tests/OnionParserTests.cs index f7cd584..9f09bc1 100644 --- a/Enigma5.Structures.Tests/OnionParserTests.cs +++ b/Enigma5.Structures.Tests/OnionParserTests.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Autofac; using Enigma5.Structures.Contracts; using Enigma5.Structures.DataProviders.Contracts; diff --git a/Enigma5.Structures.Tests/SealUnsealOnion.cs b/Enigma5.Structures.Tests/SealUnsealOnion.cs index 1fb59f8..8c504bc 100644 --- a/Enigma5.Structures.Tests/SealUnsealOnion.cs +++ b/Enigma5.Structures.Tests/SealUnsealOnion.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using System.Text; using Enigma5.Crypto.DataProviders; using FluentAssertions; diff --git a/Enigma5.Structures.Tests/TestData/OnionBuilderTestData.cs b/Enigma5.Structures.Tests/TestData/OnionBuilderTestData.cs index 463c862..b28780a 100644 --- a/Enigma5.Structures.Tests/TestData/OnionBuilderTestData.cs +++ b/Enigma5.Structures.Tests/TestData/OnionBuilderTestData.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using System.Collections; namespace Enigma5.Structures.Tests.TestData; diff --git a/Enigma5.Structures/Contracts/IEncryptMessage.cs b/Enigma5.Structures/Contracts/IEncryptMessage.cs index 0aa881b..ba3624e 100644 --- a/Enigma5.Structures/Contracts/IEncryptMessage.cs +++ b/Enigma5.Structures/Contracts/IEncryptMessage.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.Structures.Contracts; public interface IEncryptMessage diff --git a/Enigma5.Structures/Contracts/IOnion.cs b/Enigma5.Structures/Contracts/IOnion.cs index 6352960..7e8bc62 100644 --- a/Enigma5.Structures/Contracts/IOnion.cs +++ b/Enigma5.Structures/Contracts/IOnion.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.Structures.Contracts; public interface IOnion diff --git a/Enigma5.Structures/Contracts/IOnionBuilder.cs b/Enigma5.Structures/Contracts/IOnionBuilder.cs index dcdac53..9744588 100644 --- a/Enigma5.Structures/Contracts/IOnionBuilder.cs +++ b/Enigma5.Structures/Contracts/IOnionBuilder.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.Structures.Contracts; public interface IOnionBuilder diff --git a/Enigma5.Structures/Contracts/ISetMessageContent.cs b/Enigma5.Structures/Contracts/ISetMessageContent.cs index a8d7bf3..83e01b9 100644 --- a/Enigma5.Structures/Contracts/ISetMessageContent.cs +++ b/Enigma5.Structures/Contracts/ISetMessageContent.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.Structures.Contracts; public interface ISetMessageContent diff --git a/Enigma5.Structures/Contracts/ISetMessageNextAddress.cs b/Enigma5.Structures/Contracts/ISetMessageNextAddress.cs index 8eb6c31..93fbede 100644 --- a/Enigma5.Structures/Contracts/ISetMessageNextAddress.cs +++ b/Enigma5.Structures/Contracts/ISetMessageNextAddress.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + namespace Enigma5.Structures.Contracts; public interface ISetMessageNextAddress diff --git a/Enigma5.Structures/DataProviders/Contracts/ITestOnion.cs b/Enigma5.Structures/DataProviders/Contracts/ITestOnion.cs index ad4ff58..3afcbd7 100644 --- a/Enigma5.Structures/DataProviders/Contracts/ITestOnion.cs +++ b/Enigma5.Structures/DataProviders/Contracts/ITestOnion.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.Structures.Contracts; namespace Enigma5.Structures.DataProviders.Contracts; diff --git a/Enigma5.Structures/DataProviders/TestOnion.cs b/Enigma5.Structures/DataProviders/TestOnion.cs index db913e8..57850a3 100644 --- a/Enigma5.Structures/DataProviders/TestOnion.cs +++ b/Enigma5.Structures/DataProviders/TestOnion.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.Structures.Contracts; using Enigma5.Structures.DataProviders.Contracts; using Enigma5.Crypto.DataProviders; diff --git a/Enigma5.Structures/DataProviders/TestOnionPeel.cs b/Enigma5.Structures/DataProviders/TestOnionPeel.cs index 51e1150..7352142 100644 --- a/Enigma5.Structures/DataProviders/TestOnionPeel.cs +++ b/Enigma5.Structures/DataProviders/TestOnionPeel.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.Structures.Contracts; using Enigma5.Crypto.DataProviders; using Enigma5.Structures.DataProviders.Contracts; diff --git a/Enigma5.Structures/Onion.cs b/Enigma5.Structures/Onion.cs index 7540e1c..deaeece 100644 --- a/Enigma5.Structures/Onion.cs +++ b/Enigma5.Structures/Onion.cs @@ -1,4 +1,24 @@ -using Enigma5.Structures.Contracts; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.Structures.Contracts; namespace Enigma5.Structures; diff --git a/Enigma5.Structures/OnionBuilder.cs b/Enigma5.Structures/OnionBuilder.cs index 7538d42..3a62901 100644 --- a/Enigma5.Structures/OnionBuilder.cs +++ b/Enigma5.Structures/OnionBuilder.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using Enigma5.Structures.Contracts; using Enigma5.Crypto; using System.Runtime.InteropServices; diff --git a/Enigma5.Structures/OnionParser.cs b/Enigma5.Structures/OnionParser.cs index 052d9e9..577c98a 100644 --- a/Enigma5.Structures/OnionParser.cs +++ b/Enigma5.Structures/OnionParser.cs @@ -1,3 +1,23 @@ +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + using System.Runtime.InteropServices; using Enigma5.Crypto; using Enigma5.Crypto.Contracts; diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8fabe7e --- /dev/null +++ b/LICENSE @@ -0,0 +1,693 @@ +Aenigma - Onion routing based messaging application. + +Copyright (C) 2024 Romulus-Emanuel Ruja + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. \ No newline at end of file diff --git a/NetworkBridge/ConfigurationLoader.cs b/NetworkBridge/ConfigurationLoader.cs index 33ef95a..f968db9 100644 --- a/NetworkBridge/ConfigurationLoader.cs +++ b/NetworkBridge/ConfigurationLoader.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Common.Extensions; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Common.Extensions; using Enigma5.Crypto; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Primitives; diff --git a/NetworkBridge/ConnectionVector.cs b/NetworkBridge/ConnectionVector.cs index 0b9c72e..f76e36a 100644 --- a/NetworkBridge/ConnectionVector.cs +++ b/NetworkBridge/ConnectionVector.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Common.Constants; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Common.Constants; using Enigma5.App.Common.Contracts.Hubs; using Enigma5.App.Models; using Enigma5.App.Models.HubInvocation; diff --git a/NetworkBridge/HubConnectionExtensions.cs b/NetworkBridge/HubConnectionExtensions.cs index 6593c4a..4b9f6e0 100644 --- a/NetworkBridge/HubConnectionExtensions.cs +++ b/NetworkBridge/HubConnectionExtensions.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Common.Contracts.Hubs; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Common.Contracts.Hubs; using Enigma5.App.Models; using Microsoft.AspNetCore.SignalR.Client; diff --git a/NetworkBridge/HubConnectionsProxy.cs b/NetworkBridge/HubConnectionsProxy.cs index 7b23caa..52fe6ad 100644 --- a/NetworkBridge/HubConnectionsProxy.cs +++ b/NetworkBridge/HubConnectionsProxy.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Common.Contracts.Hubs; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Common.Contracts.Hubs; using Enigma5.App.Common.Extensions; using Enigma5.App.Models; using Enigma5.App.Models.Extensions; diff --git a/NetworkBridge/Program.cs b/NetworkBridge/Program.cs index 2da8c8e..b1a0d87 100644 --- a/NetworkBridge/Program.cs +++ b/NetworkBridge/Program.cs @@ -1,4 +1,24 @@ -using Enigma5.App.Common.Extensions; +/* + Aenigma - Onion Routing based messaging application + Copyright (C) 2024 Romulus-Emanuel Ruja + + This file is part of Aenigma project. + + Aenigma is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Aenigma is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Aenigma. If not, see . +*/ + +using Enigma5.App.Common.Extensions; namespace NetworkBridge;