From c113929264f7dfbee39ca09f9719285e4f100b73 Mon Sep 17 00:00:00 2001 From: Lex Li Date: Sun, 25 Jul 2021 16:47:38 -0400 Subject: [PATCH] Added obsolete attributes on obsolete types. --- SharpSnmpLib/Security/DESPrivacyProvider.cs | 1 + SharpSnmpLib/Security/MD5AuthenticationProvider.cs | 1 + SharpSnmpLib/Security/SHA1AuthenticationProvider.cs | 1 + SharpSnmpLib/Security/TripleDESPrivacyProvider.cs | 1 + 4 files changed, 4 insertions(+) diff --git a/SharpSnmpLib/Security/DESPrivacyProvider.cs b/SharpSnmpLib/Security/DESPrivacyProvider.cs index 07aa45d04..fd818401d 100644 --- a/SharpSnmpLib/Security/DESPrivacyProvider.cs +++ b/SharpSnmpLib/Security/DESPrivacyProvider.cs @@ -30,6 +30,7 @@ namespace Lextm.SharpSnmpLib.Security /// /// Ported from SNMP#NET PrivacyDES class. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "DES", Justification = "definition")] + [Obsolete("DES is no longer secure. Please use a more secure provider.")] public sealed class DESPrivacyProvider : IPrivacyProvider { private readonly SaltGenerator _salt = new SaltGenerator(); diff --git a/SharpSnmpLib/Security/MD5AuthenticationProvider.cs b/SharpSnmpLib/Security/MD5AuthenticationProvider.cs index 624743cc1..ab2cfff5c 100644 --- a/SharpSnmpLib/Security/MD5AuthenticationProvider.cs +++ b/SharpSnmpLib/Security/MD5AuthenticationProvider.cs @@ -26,6 +26,7 @@ namespace Lextm.SharpSnmpLib.Security /// /// Authentication provider using MD5. /// + [Obsolete("MD5 is no longer secure. Please use a more secure provider.")] public sealed class MD5AuthenticationProvider : IAuthenticationProvider { private const int Md5KeyCacheCapacity = 100; diff --git a/SharpSnmpLib/Security/SHA1AuthenticationProvider.cs b/SharpSnmpLib/Security/SHA1AuthenticationProvider.cs index 0c4498537..c9947a6c0 100644 --- a/SharpSnmpLib/Security/SHA1AuthenticationProvider.cs +++ b/SharpSnmpLib/Security/SHA1AuthenticationProvider.cs @@ -28,6 +28,7 @@ namespace Lextm.SharpSnmpLib.Security /// Authentication provider using SHA-1. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "SHA", Justification = "definition")] + [Obsolete("SHA-1 is no longer secure. Please use a more secure provider.")] public sealed class SHA1AuthenticationProvider : IAuthenticationProvider { private const int Sha1KeyCacheCapacity = 100; diff --git a/SharpSnmpLib/Security/TripleDESPrivacyProvider.cs b/SharpSnmpLib/Security/TripleDESPrivacyProvider.cs index ea57de551..15648e69f 100644 --- a/SharpSnmpLib/Security/TripleDESPrivacyProvider.cs +++ b/SharpSnmpLib/Security/TripleDESPrivacyProvider.cs @@ -28,6 +28,7 @@ namespace Lextm.SharpSnmpLib.Security /// Privacy provider for 3DES. /// /// Ported from SNMP#NET Privacy3DES class. + [Obsolete("3DES is no longer secure. Please use a more secure provider.")] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "DES", Justification = "definition")] public sealed class TripleDESPrivacyProvider : IPrivacyProvider {