Merge branch 'upstream'
Former-commit-id: 8ee14dfd8e6805804b5401149ab65132ff16f2d6
This commit is contained in:
commit
ba08552b8b
@ -1 +1 @@
|
||||
e4dbd55a6935d98c1061117e8bc216643726030d
|
||||
8a367a10d831ba50730c5291b24e29d1f4d445d3
|
@ -1 +1 @@
|
||||
662a404734cf8813c639a09f84523e7ab398aaf0
|
||||
a04bb48f853b87c4bc402467b1ac180fd2ca01ce
|
@ -1 +1 @@
|
||||
cd6b4d3f8c136b6d4635b6d9e4ee3fb53317ad1f
|
||||
0f27d5dca93a66ef6d5377c8ded4782c7bddc1e6
|
@ -1 +1 @@
|
||||
44384220745bdb3ead5e68f414891ec50eec5569
|
||||
505ae17b8dc98c3bbf1edd670f5bcc78ed694c38
|
@ -1 +1 @@
|
||||
44f13ddec9a8d9c04a955ae30eeba3a40f62c228
|
||||
7778ed32622d805dcf7b92ebc3cb615205382a38
|
@ -1 +1 @@
|
||||
e1a3482dd9bf1a8d93cbd3aa5d470cfbc6f3ad69
|
||||
ad43bd0bc249bd936072912d1338451bbadf2f3c
|
@ -1 +1 @@
|
||||
85e53fa31ae86cfa7512a7e8078a02f4174f02ec
|
||||
1d07f529e45ff235d033ff3e01d19d8866105451
|
@ -1 +1 @@
|
||||
75f7be33bba50e7c6162cc7a0d1340853e6959f9
|
||||
c1b96e23e4f3169d32fd0b3e2e81f63a56107ccc
|
@ -464,7 +464,7 @@ namespace System.Net.Http
|
||||
throw;
|
||||
}
|
||||
|
||||
return completionOption == HttpCompletionOption.ResponseContentRead ?
|
||||
return completionOption == HttpCompletionOption.ResponseContentRead && !string.Equals(request.Method.Method, "HEAD", StringComparison.OrdinalIgnoreCase) ?
|
||||
FinishSendAsyncBuffered(sendTask, request, cts, disposeCts) :
|
||||
FinishSendAsyncUnbuffered(sendTask, request, cts, disposeCts);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ static partial class Consts
|
||||
// Use these assembly version constants to make code more maintainable.
|
||||
//
|
||||
|
||||
public const string MonoVersion = "6.0.0.284";
|
||||
public const string MonoVersion = "6.0.0.293";
|
||||
public const string MonoCompany = "Mono development team";
|
||||
public const string MonoProduct = "Mono Common Language Infrastructure";
|
||||
public const string MonoCopyright = "(c) Various Mono authors";
|
||||
|
@ -30,7 +30,7 @@ namespace System.Security.Cryptography.X509Certificates
|
||||
{
|
||||
public static class RSACertificateExtensions
|
||||
{
|
||||
public static RSA GetRSAPrivateKey(this X509Certificate2 certificate)
|
||||
public static RSA GetRSAPrivateKey (this X509Certificate2 certificate)
|
||||
{
|
||||
if (certificate == null)
|
||||
throw new ArgumentNullException (nameof (certificate));
|
||||
@ -41,11 +41,21 @@ namespace System.Security.Cryptography.X509Certificates
|
||||
return certificate.Impl.GetRSAPrivateKey ();
|
||||
}
|
||||
|
||||
public static RSA GetRSAPublicKey(this X509Certificate2 certificate)
|
||||
public static RSA GetRSAPublicKey (this X509Certificate2 certificate)
|
||||
{
|
||||
if (certificate == null)
|
||||
throw new ArgumentNullException("certificate");
|
||||
throw new ArgumentNullException (nameof (certificate));
|
||||
return certificate.PublicKey.Key as RSA;
|
||||
}
|
||||
|
||||
public static X509Certificate2 CopyWithPrivateKey (this X509Certificate2 certificate, RSA privateKey)
|
||||
{
|
||||
if (certificate == null)
|
||||
throw new ArgumentNullException (nameof (certificate));
|
||||
if (privateKey == null)
|
||||
throw new ArgumentNullException (nameof (privateKey));
|
||||
var impl = certificate.Impl.CopyWithPrivateKey (privateKey);
|
||||
return (X509Certificate2)impl.CreateCertificate ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -80,8 +80,8 @@ namespace System.Net {
|
||||
if (!File.Exists (pvk_file))
|
||||
return null;
|
||||
var cert = new X509Certificate2 (cert_file);
|
||||
cert.PrivateKey = PrivateKey.CreateFromFile (pvk_file).RSA;
|
||||
certificate = cert;
|
||||
var privateKey = PrivateKey.CreateFromFile (pvk_file).RSA;
|
||||
certificate = new X509Certificate2 ((X509Certificate2Impl)cert.Impl.CopyWithPrivateKey (privateKey));
|
||||
return certificate;
|
||||
} catch {
|
||||
// ignore errors
|
||||
|
@ -83,6 +83,18 @@ namespace System.Security.Cryptography.X509Certificates
|
||||
|
||||
public abstract void AppendPrivateKeyInfo (StringBuilder sb);
|
||||
|
||||
public sealed override X509CertificateImpl CopyWithPrivateKey (RSA privateKey)
|
||||
{
|
||||
var impl = (X509Certificate2Impl)Clone ();
|
||||
impl.PrivateKey = privateKey;
|
||||
return impl;
|
||||
}
|
||||
|
||||
public sealed override X509Certificate CreateCertificate ()
|
||||
{
|
||||
return new X509Certificate2 (this);
|
||||
}
|
||||
|
||||
public abstract void Reset ();
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ using System.Text;
|
||||
|
||||
namespace System.Reflection
|
||||
{
|
||||
[Serializable]
|
||||
partial class MethodBase
|
||||
{
|
||||
//
|
||||
|
@ -123,6 +123,10 @@ namespace System.Security.Cryptography.X509Certificates
|
||||
|
||||
public abstract byte[] Export (X509ContentType contentType, SafePasswordHandle password);
|
||||
|
||||
public abstract X509CertificateImpl CopyWithPrivateKey (RSA privateKey);
|
||||
|
||||
public abstract X509Certificate CreateCertificate ();
|
||||
|
||||
public sealed override bool Equals (object obj)
|
||||
{
|
||||
var other = obj as X509CertificateImpl;
|
||||
|
@ -1 +1 @@
|
||||
7cd8184c6e906e7804425471eda17f75ade7c29f
|
||||
581faec1da3d53a1134ed7c388537cfe101e007a
|
@ -1,4 +1,5 @@
|
||||
namespace System.Reflection {
|
||||
[Serializable]
|
||||
partial class MethodInfo {
|
||||
internal virtual int GenericParameterCount => GetGenericArguments ().Length;
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
0081ae35dbce9a10dcfd0a9a0a22e9690e19da56
|
||||
8644f424bdc6234783527808eaf364fc4de93589
|
@ -1 +1 @@
|
||||
1cbed502c7bc7f3ee585f5a992af3439588908ee
|
||||
04ac9ca261d369e0152cd185f329179981ae261c
|
@ -1 +1 @@
|
||||
de4610d6ed476d486c45dcda2a88ff584d1ff1c3
|
||||
7f0002af7c012f940b77ef4faad9c0c76bbcd769
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user