You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.142
Former-commit-id: 7467d4b717762eeaf652d77f1486dd11ffb1ff1f
This commit is contained in:
parent
e52655b4dc
commit
0abdbe5a7d
@ -116,22 +116,6 @@ namespace MonoTests.System.Security.Cryptography {
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException (typeof (ArgumentException))]
|
||||
[Category ("NotDotNet")]
|
||||
public void Protect_InvalidDataProtectionScope ()
|
||||
{
|
||||
try {
|
||||
byte[] data = new byte[16];
|
||||
ProtectedData.Protect (data, notMuchEntropy, (DataProtectionScope) Int32.MinValue);
|
||||
// MS doesn't throw an ArgumentException but returning from
|
||||
// this method will throw an UnhandledException in NUnit
|
||||
}
|
||||
catch (PlatformNotSupportedException) {
|
||||
Assert.Ignore ("Only supported under Windows 2000 and later");
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException (typeof (ArgumentNullException))]
|
||||
public void ProtectNull ()
|
||||
@ -148,7 +132,6 @@ namespace MonoTests.System.Security.Cryptography {
|
||||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException (typeof (CryptographicException))]
|
||||
public void UnprotectNotProtectedData ()
|
||||
{
|
||||
try {
|
||||
@ -158,23 +141,9 @@ namespace MonoTests.System.Security.Cryptography {
|
||||
catch (PlatformNotSupportedException) {
|
||||
Assert.Ignore ("Only supported under Windows 2000 and later");
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException (typeof (ArgumentException))]
|
||||
[Category ("NotDotNet")]
|
||||
public void Unprotect_InvalidDataProtectionScope ()
|
||||
{
|
||||
try {
|
||||
byte[] data = new byte[16];
|
||||
byte[] encdata = ProtectedData.Protect (data, notMuchEntropy, DataProtectionScope.CurrentUser);
|
||||
ProtectedData.Unprotect (encdata, notMuchEntropy, (DataProtectionScope) Int32.MinValue);
|
||||
// MS doesn't throw an ArgumentException but returning from
|
||||
// this method will throw an UnhandledException in NUnit
|
||||
}
|
||||
catch (PlatformNotSupportedException) {
|
||||
Assert.Ignore ("Only supported under Windows 2000 and later");
|
||||
}
|
||||
catch (CryptographicException) {
|
||||
Assert.Pass ();
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -184,5 +153,4 @@ namespace MonoTests.System.Security.Cryptography {
|
||||
ProtectedData.Unprotect (null, notMuchEntropy, DataProtectionScope.CurrentUser);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user