You've already forked linux-packaging-mono
Imported Upstream version 5.8.0.22
Former-commit-id: df344e34b07851d296efb3e6604c8db42b6f7aa3
This commit is contained in:
parent
5f4a27cc8a
commit
7d05485754
@@ -1046,6 +1046,16 @@ public class DSACryptoServiceProviderTest {
|
||||
dsa = new DSACryptoServiceProvider (minKeySize);
|
||||
dsa.ImportCspBlob (blob);
|
||||
}
|
||||
|
||||
[Test] //bug 38054
|
||||
public void NonExportableKeysAreNonExportable ()
|
||||
{
|
||||
var cspParams = new CspParameters (13, null, "Mono1024");
|
||||
cspParams.KeyContainerName = "TestDSAKey";
|
||||
cspParams.Flags = CspProviderFlags.UseNonExportableKey;
|
||||
var rsa = new DSACryptoServiceProvider(cspParams);
|
||||
Assert.Throws<CryptographicException>(() => rsa.ExportParameters(true));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// HashAlgorithmTest.cs - NUnit Test Cases for HashAlgorithm
|
||||
// HashAlgorithmTestBase.cs - NUnit Test Cases for HashAlgorithm
|
||||
//
|
||||
// Author:
|
||||
// Sebastien Pouliot <sebastien@ximian.com>
|
||||
@@ -38,8 +38,9 @@ namespace MonoTests.System.Security.Cryptography {
|
||||
// HashAlgorithm is a abstract class - so most of it's functionality wont
|
||||
// be tested here (but will be in its descendants).
|
||||
|
||||
[TestFixture]
|
||||
public class HashAlgorithmTest {
|
||||
// we can't make this a [TestFixture] since the class is shared with System.Core
|
||||
// and causes issues in XA where these are in the same process.
|
||||
public abstract class HashAlgorithmTestBase {
|
||||
|
||||
protected HashAlgorithm hash;
|
||||
|
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// HashAlgorithmTestImpl.cs
|
||||
//
|
||||
// Author:
|
||||
// Alexander Köplinger <alkpli@microsoft.com>
|
||||
//
|
||||
// Copyright (C) 2017 Microsoft
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace MonoTests.System.Security.Cryptography {
|
||||
|
||||
[TestFixture]
|
||||
public class HashAlgorithmTestImpl : HashAlgorithmTestBase {
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -19,7 +19,7 @@ namespace MonoTests.System.Security.Cryptography {
|
||||
// be tested here (but will be in its descendants).
|
||||
|
||||
[TestFixture]
|
||||
public class KeyedHashAlgorithmTest : HashAlgorithmTest {
|
||||
public class KeyedHashAlgorithmTest : HashAlgorithmTestBase {
|
||||
|
||||
[SetUp]
|
||||
public override void SetUp ()
|
||||
|
@@ -1 +1 @@
|
||||
6e44e3235b24061c7626bc48311a4cacbf686184
|
||||
c9011cb41f6f9a37736eb9d0ba9e89d39e203b67
|
@@ -23,7 +23,7 @@ namespace MonoTests.System.Security.Cryptography {
|
||||
// same results (hence should run a common set of unit tests).
|
||||
|
||||
[TestFixture]
|
||||
public class SHA1CryptoServiceProviderTest : SHA1Test {
|
||||
public class SHA1CryptoServiceProviderTest : SHA1TestBase {
|
||||
|
||||
[SetUp]
|
||||
public override void SetUp ()
|
||||
|
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// SHA1Test.cs - NUnit Test Cases for SHA1
|
||||
// SHA1TestBase.cs - NUnit Test Cases for SHA1
|
||||
//
|
||||
// Author:
|
||||
// Sebastien Pouliot <sebastien@ximian.com>
|
||||
@@ -24,8 +24,9 @@ namespace MonoTests.System.Security.Cryptography
|
||||
// SHA1 is a abstract class - so most of the test included here wont be tested
|
||||
// on the abstract class but should be tested in ALL its descendants.
|
||||
|
||||
[TestFixture]
|
||||
public class SHA1Test : HashAlgorithmTest {
|
||||
// we can't make this a [TestFixture] since the class is shared with System.Core
|
||||
// and causes issues in XA where these are in the same process.
|
||||
public abstract class SHA1TestBase : HashAlgorithmTestBase {
|
||||
|
||||
[SetUp]
|
||||
public override void SetUp ()
|
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// SHA1TestImpl.cs
|
||||
//
|
||||
// Author:
|
||||
// Alexander Köplinger <alkpli@microsoft.com>
|
||||
//
|
||||
// Copyright (C) 2017 Microsoft
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace MonoTests.System.Security.Cryptography
|
||||
{
|
||||
|
||||
[TestFixture]
|
||||
public class SHA1TestImpl : SHA1TestBase {
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -23,7 +23,7 @@ namespace MonoTests.System.Security.Cryptography {
|
||||
// same results (hence should run a common set of unit tests).
|
||||
|
||||
[TestFixture]
|
||||
public class SHA256ManagedTest : SHA256Test {
|
||||
public class SHA256ManagedTest : SHA256TestBase {
|
||||
|
||||
[SetUp]
|
||||
public override void SetUp ()
|
||||
|
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// SHA256Test.cs - NUnit Test Cases for SHA256
|
||||
// SHA256TestBase.cs - NUnit Test Cases for SHA256
|
||||
//
|
||||
// Author:
|
||||
// Sebastien Pouliot <sebastien@ximian.com>
|
||||
@@ -23,8 +23,9 @@ namespace MonoTests.System.Security.Cryptography {
|
||||
// SHA256 is a abstract class - so most of the test included here wont be tested
|
||||
// on the abstract class but should be tested in ALL its descendants.
|
||||
|
||||
[TestFixture]
|
||||
public class SHA256Test : HashAlgorithmTest {
|
||||
// we can't make this a [TestFixture] since the class is shared with System.Core
|
||||
// and causes issues in XA where these are in the same process.
|
||||
public abstract class SHA256TestBase : HashAlgorithmTestBase {
|
||||
|
||||
[SetUp]
|
||||
public override void SetUp ()
|
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// SHA256TestImpl.cs
|
||||
//
|
||||
// Author:
|
||||
// Alexander Köplinger <alkpli@microsoft.com>
|
||||
//
|
||||
// Copyright (C) 2017 Microsoft
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace MonoTests.System.Security.Cryptography
|
||||
{
|
||||
|
||||
[TestFixture]
|
||||
public class SHA256TestImpl : SHA256TestBase {
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -23,7 +23,7 @@ namespace MonoTests.System.Security.Cryptography {
|
||||
// same results (hence should run a common set of unit tests).
|
||||
|
||||
[TestFixture]
|
||||
public class SHA384ManagedTest : SHA384Test {
|
||||
public class SHA384ManagedTest : SHA384TestBase {
|
||||
|
||||
[SetUp]
|
||||
public override void SetUp ()
|
||||
|
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// SHA384Test.cs - NUnit Test Cases for SHA384
|
||||
// SHA384TestBase.cs - NUnit Test Cases for SHA384
|
||||
//
|
||||
// Author:
|
||||
// Sebastien Pouliot <sebastien@ximian.com>
|
||||
@@ -23,8 +23,9 @@ namespace MonoTests.System.Security.Cryptography {
|
||||
// SHA384 is a abstract class - so most of the test included here wont be tested
|
||||
// on the abstract class but should be tested in ALL its descendants.
|
||||
|
||||
[TestFixture]
|
||||
public class SHA384Test : HashAlgorithmTest {
|
||||
// we can't make this a [TestFixture] since the class is shared with System.Core
|
||||
// and causes issues in XA where these are in the same process.
|
||||
public abstract class SHA384TestBase : HashAlgorithmTestBase {
|
||||
|
||||
[SetUp]
|
||||
public override void SetUp ()
|
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// SHA384TestImpl.cs
|
||||
//
|
||||
// Author:
|
||||
// Alexander Köplinger <alkpli@microsoft.com>
|
||||
//
|
||||
// Copyright (C) 2017 Microsoft
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace MonoTests.System.Security.Cryptography
|
||||
{
|
||||
|
||||
[TestFixture]
|
||||
public class SHA384TestImpl : SHA384TestBase {
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -23,7 +23,7 @@ namespace MonoTests.System.Security.Cryptography {
|
||||
// same results (hence should run a common set of unit tests).
|
||||
|
||||
[TestFixture]
|
||||
public class SHA512ManagedTest : SHA512Test {
|
||||
public class SHA512ManagedTest : SHA512TestBase {
|
||||
|
||||
[SetUp]
|
||||
public override void SetUp ()
|
||||
|
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// SHA512Test.cs - NUnit Test Cases for SHA512
|
||||
// SHA512TestBase.cs - NUnit Test Cases for SHA512
|
||||
//
|
||||
// Author:
|
||||
// Sebastien Pouliot <sebastien@ximian.com>
|
||||
@@ -23,8 +23,9 @@ namespace MonoTests.System.Security.Cryptography {
|
||||
// SHA512 is a abstract class - so most of the test included here wont be tested
|
||||
// on the abstract class but should be tested in ALL its descendants.
|
||||
|
||||
[TestFixture]
|
||||
public class SHA512Test : HashAlgorithmTest {
|
||||
// we can't make this a [TestFixture] since the class is shared with System.Core
|
||||
// and causes issues in XA where these are in the same process.
|
||||
public abstract class SHA512TestBase : HashAlgorithmTestBase {
|
||||
|
||||
[SetUp]
|
||||
public override void SetUp ()
|
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// SHA512TestImpl.cs
|
||||
//
|
||||
// Author:
|
||||
// Alexander Köplinger <alkpli@microsoft.com>
|
||||
//
|
||||
// Copyright (C) 2017 Microsoft
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace MonoTests.System.Security.Cryptography
|
||||
{
|
||||
|
||||
[TestFixture]
|
||||
public class SHA512TestImpl : SHA512TestBase {
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user