You've already forked linux-packaging-mono
Imported Upstream version 5.20.0.180
Former-commit-id: ff953ca879339fe1e1211f7220f563e1342e66cb
This commit is contained in:
parent
0e2d47d1c8
commit
0510252385
@ -320,9 +320,6 @@ mgk3bWUV6ChegutbguiKrI/DbO7wPiDLxw==
|
||||
Assert.AreEqual ("System.Security.Cryptography.X509Certificates.X509Certificate", x.ToString (false), "ToString(false)");
|
||||
Assert.IsTrue (x.Equals (x), "Equals(X509Certificate)");
|
||||
Assert.IsTrue (x.Equals ((object) x), "Equals(object)");
|
||||
x.Reset ();
|
||||
x.Import (cert1);
|
||||
Assert.AreEqual ("02720006E8", x.GetSerialNumberString (), "GetSerialNumberString");
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -456,7 +453,7 @@ mgk3bWUV6ChegutbguiKrI/DbO7wPiDLxw==
|
||||
|
||||
#if !MOBILE
|
||||
[Test]
|
||||
[ExpectedException (typeof (NullReferenceException))]
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
public void GetObjectData_Null ()
|
||||
{
|
||||
X509Certificate x = new X509Certificate ();
|
||||
@ -465,6 +462,7 @@ mgk3bWUV6ChegutbguiKrI/DbO7wPiDLxw==
|
||||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
public void GetObjectData ()
|
||||
{
|
||||
X509Certificate x = new X509Certificate (cert1);
|
||||
@ -472,27 +470,22 @@ mgk3bWUV6ChegutbguiKrI/DbO7wPiDLxw==
|
||||
Assert.IsNotNull (s, "ISerializable");
|
||||
SerializationInfo info = new SerializationInfo (typeof (X509Certificate), new FormatterConverter ());
|
||||
s.GetObjectData (info, new StreamingContext (StreamingContextStates.All));
|
||||
Assert.AreEqual (1, info.MemberCount, "MemberCount");
|
||||
byte[] raw = (byte[]) info.GetValue ("RawData", typeof (byte[]));
|
||||
}
|
||||
#endif
|
||||
|
||||
[Test]
|
||||
[ExpectedException (typeof (NullReferenceException))]
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
public void Ctor_Serialization_Null ()
|
||||
{
|
||||
new X509Certificate (null, new StreamingContext (StreamingContextStates.All));
|
||||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
public void Ctor_Serialization ()
|
||||
{
|
||||
SerializationInfo info = new SerializationInfo (typeof (X509Certificate), new FormatterConverter ());
|
||||
info.AddValue ("RawData", cert1);
|
||||
X509Certificate x = new X509Certificate (info, new StreamingContext (StreamingContextStates.All));
|
||||
Assert.AreEqual (cert1, x.GetRawCertData (), "GetRawCertData");
|
||||
// decoding is done too
|
||||
Assert.AreEqual ("02720006E8", x.GetSerialNumberString (), "SerialNumber");
|
||||
new X509Certificate (info, new StreamingContext (StreamingContextStates.All));
|
||||
}
|
||||
|
||||
|
||||
@ -741,15 +734,6 @@ mgk3bWUV6ChegutbguiKrI/DbO7wPiDLxw==
|
||||
{
|
||||
new X509Certificate (farscape_pkcs7);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException (typeof (CryptographicException))]
|
||||
[Category ("MacNotWorking")] // SecCertificateCreateWithData does different things on 10.11 vs 10.12 with invalid certificates https://bugzilla.xamarin.com/show_bug.cgi?id=53689
|
||||
public void Pkcs7_Import ()
|
||||
{
|
||||
X509Certificate x = new X509Certificate ();
|
||||
x.Import (farscape_pkcs7);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user