Merge branch 'upstream'

Former-commit-id: ca8f3cd62c0f7c121c18a7d62811b880d354813d
This commit is contained in:
Xamarin Public Jenkins (auto-signing) 2018-08-23 08:23:55 +00:00
commit 9a3f47c281
46 changed files with 145 additions and 38 deletions

View File

@ -1 +1 @@
7d284941342ec1cd091ea92c920e7a1067762050
77471da09981783f11a22f4c503b67e02d2d7c83

View File

@ -1 +1 @@
b4edd2150613367bbf97e0245adf4ed33f1c72ee
46b8fbc938f78685dd03c29c823ff7dd3bfa42ee

View File

@ -128,6 +128,7 @@
<xsl:value-of select="@time"/>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="traits"/>
<xsl:if test="reason">
<reason>
<message>
@ -135,7 +136,6 @@
</message>
</reason>
</xsl:if>
<xsl:apply-templates select="traits"/>
<xsl:apply-templates select="failure"/>
</test-case>
</xsl:template>

View File

@ -34,7 +34,7 @@ static class Consts
// Use these assembly version constants to make code more maintainable.
//
public const string MonoVersion = "5.16.0.117";
public const string MonoVersion = "5.16.0.119";
public const string MonoCompany = "Mono development team";
public const string MonoProduct = "Mono Common Language Infrastructure";
public const string MonoCopyright = "(c) Various Mono authors";

View File

@ -33,6 +33,7 @@ using System.IO;
using System.Threading;
using System.Threading.Tasks;
using System.Net.Security;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Security.Authentication;
@ -213,12 +214,96 @@ namespace Mono.Btls
X509Chain chain, MonoBtlsX509StoreCtx storeCtx,
bool success, ref MonoSslPolicyErrors errors, ref int status11)
{
status11 = unchecked((int)0);
if (!success) {
errors = MonoSslPolicyErrors.RemoteCertificateChainErrors;
status11 = unchecked((int)0x800B010B);
var error = storeCtx.GetError();
if (error != Mono.Btls.MonoBtlsX509Error.OK &
error != Mono.Btls.MonoBtlsX509Error.CRL_NOT_YET_VALID) {
chain.Impl.AddStatus(MapVerifyErrorToChainStatus(error));
status11 = unchecked((int)0x800B010B);
}
}
}
internal static X509ChainStatusFlags MapVerifyErrorToChainStatus(MonoBtlsX509Error code)
{
switch (code)
{
case Mono.Btls.MonoBtlsX509Error.OK :
return X509ChainStatusFlags.NoError;
case Mono.Btls.MonoBtlsX509Error.CERT_NOT_YET_VALID :
case Mono.Btls.MonoBtlsX509Error.CERT_HAS_EXPIRED:
case Mono.Btls.MonoBtlsX509Error.ERROR_IN_CERT_NOT_BEFORE_FIELD:
case Mono.Btls.MonoBtlsX509Error.ERROR_IN_CERT_NOT_AFTER_FIELD:
return X509ChainStatusFlags.NotTimeValid;
case Mono.Btls.MonoBtlsX509Error.CERT_REVOKED:
return X509ChainStatusFlags.Revoked;
case Mono.Btls.MonoBtlsX509Error.UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY:
case Mono.Btls.MonoBtlsX509Error.CERT_SIGNATURE_FAILURE:
return X509ChainStatusFlags.NotSignatureValid;
case Mono.Btls.MonoBtlsX509Error.CERT_UNTRUSTED:
case Mono.Btls.MonoBtlsX509Error.DEPTH_ZERO_SELF_SIGNED_CERT:
case Mono.Btls.MonoBtlsX509Error.SELF_SIGNED_CERT_IN_CHAIN:
return X509ChainStatusFlags.UntrustedRoot;
case Mono.Btls.MonoBtlsX509Error.CRL_HAS_EXPIRED:
return X509ChainStatusFlags.OfflineRevocation;
case Mono.Btls.MonoBtlsX509Error.CRL_NOT_YET_VALID:
case Mono.Btls.MonoBtlsX509Error.CRL_SIGNATURE_FAILURE:
case Mono.Btls.MonoBtlsX509Error.ERROR_IN_CRL_LAST_UPDATE_FIELD:
case Mono.Btls.MonoBtlsX509Error.ERROR_IN_CRL_NEXT_UPDATE_FIELD:
case Mono.Btls.MonoBtlsX509Error.KEYUSAGE_NO_CRL_SIGN:
case Mono.Btls.MonoBtlsX509Error.UNABLE_TO_DECRYPT_CRL_SIGNATURE:
case Mono.Btls.MonoBtlsX509Error.UNABLE_TO_GET_CRL:
case Mono.Btls.MonoBtlsX509Error.UNABLE_TO_GET_CRL_ISSUER:
case Mono.Btls.MonoBtlsX509Error.UNHANDLED_CRITICAL_CRL_EXTENSION:
return X509ChainStatusFlags.RevocationStatusUnknown;
case Mono.Btls.MonoBtlsX509Error.INVALID_EXTENSION:
return X509ChainStatusFlags.InvalidExtension;
case Mono.Btls.MonoBtlsX509Error.UNABLE_TO_GET_ISSUER_CERT:
case Mono.Btls.MonoBtlsX509Error.UNABLE_TO_GET_ISSUER_CERT_LOCALLY:
case Mono.Btls.MonoBtlsX509Error.UNABLE_TO_VERIFY_LEAF_SIGNATURE:
return X509ChainStatusFlags.PartialChain;
case Mono.Btls.MonoBtlsX509Error.INVALID_PURPOSE:
return X509ChainStatusFlags.NotValidForUsage;
case Mono.Btls.MonoBtlsX509Error.INVALID_CA:
case Mono.Btls.MonoBtlsX509Error.INVALID_NON_CA:
case Mono.Btls.MonoBtlsX509Error.PATH_LENGTH_EXCEEDED:
case Mono.Btls.MonoBtlsX509Error.KEYUSAGE_NO_CERTSIGN:
case Mono.Btls.MonoBtlsX509Error.KEYUSAGE_NO_DIGITAL_SIGNATURE:
return X509ChainStatusFlags.InvalidBasicConstraints;
case Mono.Btls.MonoBtlsX509Error.INVALID_POLICY_EXTENSION:
case Mono.Btls.MonoBtlsX509Error.NO_EXPLICIT_POLICY:
return X509ChainStatusFlags.InvalidPolicyConstraints;
case Mono.Btls.MonoBtlsX509Error.CERT_REJECTED:
return X509ChainStatusFlags.ExplicitDistrust;
case Mono.Btls.MonoBtlsX509Error.UNHANDLED_CRITICAL_EXTENSION:
return X509ChainStatusFlags.HasNotSupportedCriticalExtension;
case Mono.Btls.MonoBtlsX509Error.CERT_CHAIN_TOO_LONG:
throw new CryptographicException();
case Mono.Btls.MonoBtlsX509Error.OUT_OF_MEM:
throw new OutOfMemoryException();
default:
throw new CryptographicException("Unrecognized X509VerifyStatusCode:" + code);
}
}
internal static void SetupCertificateStore (MonoBtlsX509Store store, MonoTlsSettings settings, bool server)
{
/*

View File

@ -142,6 +142,11 @@ namespace Mono.Btls
return mono_btls_x509_store_ctx_get_error (Handle.DangerousGetHandle (), out error_string_ptr);
}
public int GetErrorDepth ()
{
return mono_btls_x509_store_ctx_get_error_depth (Handle.DangerousGetHandle ());
}
public MonoBtlsX509Exception GetException ()
{
IntPtr error_string_ptr;

View File

@ -25,6 +25,7 @@
// THE SOFTWARE.
#if SECURITY_DEP && MONO_FEATURE_BTLS
using System;
using System.Collections.Generic;
using System.Text;
using System.Security;
using System.Security.Cryptography;
@ -42,6 +43,7 @@ namespace Mono.Btls
X509Certificate2Collection untrusted;
X509Certificate2[] certificates;
X509ChainPolicy policy;
List<X509ChainStatus> chainStatusList;
internal X509ChainImplBtls (MonoBtlsX509Chain chain)
{
@ -124,7 +126,16 @@ namespace Mono.Btls
}
public override X509ChainStatus[] ChainStatus {
get { throw new NotImplementedException (); }
get {
return chainStatusList.ToArray();
}
}
public override void AddStatus (X509ChainStatusFlags errorCode)
{
if (chainStatusList == null)
chainStatusList = new List<X509ChainStatus>();
chainStatusList.Add (new X509ChainStatus(errorCode));
}
public override bool Build (X509Certificate2 certificate)

View File

@ -59,6 +59,8 @@ namespace System.Security.Cryptography.X509Certificates
public abstract bool Build (X509Certificate2 certificate);
public abstract void AddStatus (X509ChainStatusFlags errorCode);
public abstract void Reset ();
public void Dispose ()

View File

@ -110,6 +110,10 @@ namespace System.Security.Cryptography.X509Certificates {
// methods
public override void AddStatus (X509ChainStatusFlags error)
{
}
[MonoTODO ("Not totally RFC3280 compliant, but neither is MS implementation...")]
public override bool Build (X509Certificate2 certificate)
{

View File

@ -1 +1 @@
d9acdccc6ac1c957dcbc61b3d292ecec99486cda
f62165ad371b9ec669d20dba4fc52964c3f9cc16

View File

@ -1 +1 @@
f27f41f18750c6759dd5eb0d37ce416a7bc90a02
093da4251f1738ab4470e35b77e3a31c4244ad99

View File

@ -1 +1 @@
6408a5a4b96854d81a5ad4dd11ba25d35c9036f3
300f8c4d4432a0dd47f644d12d00dd6e64ed9cac

View File

@ -1 +1 @@
924c378c6aa852f8d710590bf122c8dcb2517511
4363e0a78df3945bbe4499a3b5ab4724ef2119b7

View File

@ -1 +1 @@
829831686aa1d3f4ce328e7b897fbf497416a331
a95c24769e0a19c48e64da08da9c543a1fa4ac86

View File

@ -1 +1 @@
2c4a8f6cc7772af68425f1f717c31623f19c8291
ee989464bba21bcece33919ef912d836328b37d5

View File

@ -1 +1 @@
56c13fa3b5c1f24857860749a57fd0b73009f9a3
ccc44145bf4838b1934673709cb1d7c1f6eaa99b

View File

@ -1 +1 @@
c8236115536f96c8f588f69e21905a2e01fdc366
2168d7fdb9425378ac627e2784398ec34a1517de

View File

@ -1 +1 @@
d9acdccc6ac1c957dcbc61b3d292ecec99486cda
f62165ad371b9ec669d20dba4fc52964c3f9cc16

View File

@ -1 +1 @@
f27f41f18750c6759dd5eb0d37ce416a7bc90a02
093da4251f1738ab4470e35b77e3a31c4244ad99

View File

@ -1 +1 @@
6408a5a4b96854d81a5ad4dd11ba25d35c9036f3
300f8c4d4432a0dd47f644d12d00dd6e64ed9cac

View File

@ -1 +1 @@
924c378c6aa852f8d710590bf122c8dcb2517511
4363e0a78df3945bbe4499a3b5ab4724ef2119b7

View File

@ -1 +1 @@
829831686aa1d3f4ce328e7b897fbf497416a331
a95c24769e0a19c48e64da08da9c543a1fa4ac86

View File

@ -1 +1 @@
2c4a8f6cc7772af68425f1f717c31623f19c8291
ee989464bba21bcece33919ef912d836328b37d5

View File

@ -1 +1 @@
56c13fa3b5c1f24857860749a57fd0b73009f9a3
ccc44145bf4838b1934673709cb1d7c1f6eaa99b

View File

@ -1 +1 @@
c8236115536f96c8f588f69e21905a2e01fdc366
2168d7fdb9425378ac627e2784398ec34a1517de

View File

@ -1 +1 @@
d9acdccc6ac1c957dcbc61b3d292ecec99486cda
f62165ad371b9ec669d20dba4fc52964c3f9cc16

View File

@ -1 +1 @@
f27f41f18750c6759dd5eb0d37ce416a7bc90a02
093da4251f1738ab4470e35b77e3a31c4244ad99

View File

@ -1 +1 @@
6408a5a4b96854d81a5ad4dd11ba25d35c9036f3
300f8c4d4432a0dd47f644d12d00dd6e64ed9cac

View File

@ -1 +1 @@
924c378c6aa852f8d710590bf122c8dcb2517511
4363e0a78df3945bbe4499a3b5ab4724ef2119b7

View File

@ -1 +1 @@
829831686aa1d3f4ce328e7b897fbf497416a331
a95c24769e0a19c48e64da08da9c543a1fa4ac86

View File

@ -1 +1 @@
2c4a8f6cc7772af68425f1f717c31623f19c8291
ee989464bba21bcece33919ef912d836328b37d5

View File

@ -1 +1 @@
56c13fa3b5c1f24857860749a57fd0b73009f9a3
ccc44145bf4838b1934673709cb1d7c1f6eaa99b

View File

@ -1 +1 @@
c8236115536f96c8f588f69e21905a2e01fdc366
2168d7fdb9425378ac627e2784398ec34a1517de

View File

@ -1 +1 @@
#define FULL_VERSION "explicit/16dcedd"
#define FULL_VERSION "explicit/0955dd2"

Binary file not shown.

View File

@ -1 +1 @@
162a61dac5b5025c8d90f1b30fd99c19d680c814
a2fc98e61190b0fd984b99d43be79c913294394c

Binary file not shown.

View File

@ -1 +1 @@
07b53e04a435697dfaa6c8ed4c82784828b223ec
8f67971ed8eac4992053c75c1a79195cb587992b

Binary file not shown.

View File

@ -1 +1 @@
ee95824606552521aebbc33dbaa2c1e61df8e94a
61b9396cf61c8c451465f0bc1fa32aae1952e613

View File

@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: mono 5.16.0.117\n"
"Project-Id-Version: mono 5.16.0.119\n"
"Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n"
"POT-Creation-Date: 2018-08-21 08:11+0000\n"
"POT-Creation-Date: 2018-08-23 08:04+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

Binary file not shown.

View File

@ -1 +1 @@
954d6be36d89456b773028e7490e1bd408b480a5
c415705f1e0f8158a64983342efbccfdcade0b0a