Imported Upstream version 5.10.0.47

Former-commit-id: d0813289fa2d35e1f8ed77530acb4fb1df441bc0
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-01-24 17:04:36 +00:00
parent 88ff76fe28
commit e46a49ecf1
5927 changed files with 226314 additions and 129848 deletions

View File

@@ -31,6 +31,10 @@ endif
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
ifdef MOBILE_PROFILE
NO_TEST = yes
endif
EXTRA_DISTFILES = \
Test/Resources/test.cer \
Test/Resources/test_neg_serial.cer \

View File

@@ -123,8 +123,8 @@ namespace System.IdentityModel.Tokens
{
if (algorithm == SecurityAlgorithms.HmacSha1Signature)
return new HMACSHA1 (key);
//if (algorithm == SecurityAlgorithms.HmacSha256Signature)
// return new HMACSHA256 (key);
if (algorithm == SecurityAlgorithms.HmacSha256Signature)
return new HMACSHA256 (key);
throw new NotSupportedException ();
}
@@ -212,6 +212,7 @@ namespace System.IdentityModel.Tokens
{
switch (algorithm) {
case SecurityAlgorithms.HmacSha1Signature:
case SecurityAlgorithms.HmacSha256Signature:
case SecurityAlgorithms.Psha1KeyDerivation:
case SecurityAlgorithms.Aes128Encryption:
case SecurityAlgorithms.Aes128KeyWrap:

View File

@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !MOBILE
using System;
using System.IdentityModel.Claims;
using System.Net.Mail;
@@ -52,3 +53,4 @@ namespace MonoTests.System.IdentityModel.Claims
}
}
}
#endif

View File

@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !MOBILE
using System;
using System.IdentityModel.Claims;
using System.Net.Mail;
@@ -116,3 +117,4 @@ namespace MonoTests.System.IdentityModel.Claims
}
}
}
#endif

View File

@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !MOBILE
using System;
using System.IdentityModel.Claims;
using NUnit.Framework;
@@ -102,3 +103,4 @@ namespace MonoTests.System.IdentityModel.Claims
}
}
}
#endif

View File

@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !MOBILE
using System;
using System.Collections.Generic;
using System.IdentityModel.Claims;
@@ -70,3 +71,4 @@ namespace MonoTests.System.IdentityModel.Claims
}
}
}
#endif

View File

@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !MOBILE
using System;
using System.Globalization;
using System.IO;
@@ -97,3 +98,4 @@ namespace MonoTests.System.IdentityModel.Common
}
}
}
#endif

View File

@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !MOBILE
using System;
using System.IdentityModel.Claims;
using System.IdentityModel.Policy;
@@ -72,3 +73,4 @@ namespace MonoTests.System.IdentityModel.Claims
}
}
}
#endif

View File

@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !MOBILE && !XAMMAC_4_5
using System;
using System.Collections.Generic;
using System.IdentityModel.Claims;
@@ -80,3 +81,4 @@ namespace MonoTests.System.IdentityModel.Selectors
}
}
}
#endif

View File

@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !MOBILE && !XAMMAC_4_5
using System;
using System.Collections.Generic;
using System.IdentityModel.Claims;
@@ -66,3 +67,4 @@ namespace MonoTests.System.IdentityModel.Selectors
}
}
}
#endif

View File

@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !MOBILE && !XAMMAC_4_5
using System;
using System.Collections.Generic;
using System.IdentityModel.Claims;
@@ -118,3 +119,4 @@ Console.Error.WriteLine (doc.OuterXml);
}
}
}
#endif

View File

@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !MOBILE
using System;
using System.IdentityModel.Selectors;
using System.IdentityModel.Tokens;
@@ -95,3 +96,4 @@ namespace MonoTests.System.IdentityModel.Selectors
}
}
}
#endif

View File

@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !MOBILE
using System;
using System.Collections.ObjectModel;
using System.IdentityModel.Selectors;
@@ -79,3 +80,4 @@ namespace MonoTests.System.IdentityModel.Selectors
}
}
}
#endif

View File

@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !MOBILE && !XAMMAC_4_5
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -82,3 +83,4 @@ namespace MonoTests.System.IdentityModel.Selectors
}
}
#endif

View File

@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !MOBILE && !XAMMAC_4_5
using System;
using System.Collections.Generic;
using System.IdentityModel.Claims;
@@ -81,3 +82,4 @@ namespace MonoTests.System.IdentityModel.Selectors
}
}
}
#endif

View File

@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !MOBILE
using System;
using System.IdentityModel.Selectors;
using System.IdentityModel.Tokens;
@@ -52,3 +53,4 @@ namespace MonoTests.System.IdentityModel.Selectors
}
}
}
#endif

View File

@@ -1,7 +1,7 @@
//
// BootstrapContextTest.cs - NUnit Test Cases for System.IdentityModel.Tokens.BootstrapContext
//
#if !MOBILE
using System;
using System.IO;
using System.IdentityModel.Tokens;
@@ -247,3 +247,4 @@ namespace MonoTests.System.IdentityModel.Tokens.net_4_5 {
}
}
}
#endif

View File

@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !MOBILE
using System;
using System.IdentityModel.Selectors;
using System.IdentityModel.Tokens;
@@ -51,3 +52,4 @@ namespace MonoTests.System.IdentityModel.Selectors
}
}
}
#endif

View File

@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !MOBILE
using System;
using System.IO;
using System.Text;
@@ -275,5 +276,23 @@ namespace MonoTests.System.IdentityModel.Tokens
Assert.IsFalse (key.IsSymmetricAlgorithm (SecurityAlgorithms.RsaOaepKeyWrap), "#3");
Assert.IsTrue (key.IsSymmetricAlgorithm (SecurityAlgorithms.Psha1KeyDerivation), "#4");
}
[Test]
public void GetKeyedHashAlgorithm()
{
InMemorySymmetricSecurityKey key = new InMemorySymmetricSecurityKey(new byte[0]);
Assert.That(() => key.GetKeyedHashAlgorithm(SecurityAlgorithms.HmacSha256Signature), Throws.Nothing);
}
[Test]
public void IsSupportedAlgorithm()
{
InMemorySymmetricSecurityKey key = new InMemorySymmetricSecurityKey(new byte[0]);
Assert.That(() => key.IsSupportedAlgorithm(SecurityAlgorithms.HmacSha256Signature), Is.True);
}
}
}
#endif

View File

@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !MOBILE
using System;
using System.IdentityModel.Selectors;
using System.IdentityModel.Tokens;
@@ -53,3 +54,4 @@ namespace MonoTests.System.IdentityModel.Selectors
}
}
}
#endif

Some files were not shown because too many files have changed in this diff Show More