Skip to content

Commit da6c312

Browse files
Implements Logger scripting and initial SNMP support for every servers.
This commit implements a moddable logger scripting method as well as the first take on SNMP traps reporting (using that new logger scripting). This also gets rid of the useless ressource monitor.
1 parent 3fb124c commit da6c312

19 files changed

+1848
-187
lines changed

BackendServices/CastleLibrary/CastleLibrary.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
</PropertyGroup>
2222

2323
<ItemGroup>
24+
<PackageReference Include="Lextm.SharpSnmpLib" Version="12.5.5" />
2425
<PackageReference Include="Microsoft.TSS" Version="2.1.1" />
2526
</ItemGroup>
2627

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Bouncy Castle AES privacy provider
2+
// Copyright (C) 2009-2010 Lex Li, Milan Sinadinovic
3+
// Copyright (C) 2018 Matt Zinkevicius
4+
//
5+
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
6+
// software and associated documentation files (the "Software"), to deal in the Software
7+
// without restriction, including without limitation the rights to use, copy, modify, merge,
8+
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
9+
// to whom the Software is furnished to do so, subject to the following conditions:
10+
//
11+
// The above copyright notice and this permission notice shall be included in all copies or
12+
// substantial portions of the Software.
13+
//
14+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
15+
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
16+
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
17+
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
18+
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
19+
// DEALINGS IN THE SOFTWARE.
20+
21+
using Lextm.SharpSnmpLib;
22+
using Lextm.SharpSnmpLib.Security;
23+
24+
namespace Lextm.BouncyCastle
25+
{
26+
/// <summary>
27+
/// Privacy provider for AES 192.
28+
/// </summary>
29+
public sealed class BouncyCastleAES192PrivacyProvider : BouncyCastleAESPrivacyProviderBase
30+
{
31+
/// <summary>
32+
/// Initializes a new instance of the <see cref="BouncyCastleAES192PrivacyProvider"/> class.
33+
/// </summary>
34+
/// <param name="phrase">The phrase.</param>
35+
/// <param name="auth">The authentication provider.</param>
36+
public BouncyCastleAES192PrivacyProvider(OctetString phrase, IAuthenticationProvider auth)
37+
: base(24, phrase, auth)
38+
{ }
39+
40+
/// <summary>
41+
/// Returns a string that represents this object.
42+
/// </summary>
43+
public override string ToString() => "AES 192 (BouncyCastle) privacy provider";
44+
}
45+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Bouncy Castle AES privacy provider
2+
// Copyright (C) 2009-2010 Lex Li, Milan Sinadinovic
3+
// Copyright (C) 2018 Matt Zinkevicius
4+
//
5+
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
6+
// software and associated documentation files (the "Software"), to deal in the Software
7+
// without restriction, including without limitation the rights to use, copy, modify, merge,
8+
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
9+
// to whom the Software is furnished to do so, subject to the following conditions:
10+
//
11+
// The above copyright notice and this permission notice shall be included in all copies or
12+
// substantial portions of the Software.
13+
//
14+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
15+
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
16+
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
17+
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
18+
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
19+
// DEALINGS IN THE SOFTWARE.
20+
21+
using Lextm.SharpSnmpLib;
22+
using Lextm.SharpSnmpLib.Security;
23+
24+
namespace Lextm.BouncyCastle
25+
{
26+
/// <summary>
27+
/// Privacy provider for AES 256.
28+
/// </summary>
29+
public sealed class BouncyCastleAES256PrivacyProvider : BouncyCastleAESPrivacyProviderBase
30+
{
31+
/// <summary>
32+
/// Initializes a new instance of the <see cref="BouncyCastleAES256PrivacyProvider"/> class.
33+
/// </summary>
34+
/// <param name="phrase">The phrase.</param>
35+
/// <param name="auth">The authentication provider.</param>
36+
public BouncyCastleAES256PrivacyProvider(OctetString phrase, IAuthenticationProvider auth)
37+
: base(32, phrase, auth)
38+
{ }
39+
40+
/// <summary>
41+
/// Returns a string that represents this object.
42+
/// </summary>
43+
public override string ToString() => "AES 256 (BouncyCastle) privacy provider";
44+
}
45+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Bouncy Castle AES privacy provider
2+
// Copyright (C) 2009-2010 Lex Li, Milan Sinadinovic
3+
// Copyright (C) 2018 Matt Zinkevicius
4+
//
5+
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
6+
// software and associated documentation files (the "Software"), to deal in the Software
7+
// without restriction, including without limitation the rights to use, copy, modify, merge,
8+
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
9+
// to whom the Software is furnished to do so, subject to the following conditions:
10+
//
11+
// The above copyright notice and this permission notice shall be included in all copies or
12+
// substantial portions of the Software.
13+
//
14+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
15+
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
16+
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
17+
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
18+
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
19+
// DEALINGS IN THE SOFTWARE.
20+
21+
using Lextm.SharpSnmpLib;
22+
using Lextm.SharpSnmpLib.Security;
23+
24+
namespace Lextm.BouncyCastle
25+
{
26+
/// <summary>
27+
/// Privacy provider for AES 128.
28+
/// </summary>
29+
public sealed class BouncyCastleAESPrivacyProvider : BouncyCastleAESPrivacyProviderBase
30+
{
31+
/// <summary>
32+
/// Initializes a new instance of the <see cref="BouncyCastleAESPrivacyProvider"/> class.
33+
/// </summary>
34+
/// <param name="phrase">The phrase.</param>
35+
/// <param name="auth">The authentication provider.</param>
36+
public BouncyCastleAESPrivacyProvider(OctetString phrase, IAuthenticationProvider auth)
37+
: base(16, phrase, auth)
38+
{ }
39+
40+
/// <summary>
41+
/// Returns a string that represents this object.
42+
/// </summary>
43+
public override string ToString() => "AES 128 (BouncyCastle) privacy provider";
44+
}
45+
}

0 commit comments

Comments
 (0)