Imported Upstream version 4.8.0.495
Former-commit-id: 7ac3d9a0512daf5dbdfccee163b153a77fda675c
This commit is contained in:
parent
702a3ab1af
commit
af08d800c3
@ -207,16 +207,6 @@ namespace Mono.Btls
|
||||
isAuthenticated = true;
|
||||
}
|
||||
|
||||
void SetupCertificateStore ()
|
||||
{
|
||||
MonoBtlsProvider.SetupCertificateStore (ctx.CertificateStore);
|
||||
|
||||
if (Settings != null && Settings.TrustAnchors != null) {
|
||||
var trust = IsServer ? MonoBtlsX509TrustKind.TRUST_CLIENT : MonoBtlsX509TrustKind.TRUST_SERVER;
|
||||
ctx.CertificateStore.AddCollection (Settings.TrustAnchors, trust);
|
||||
}
|
||||
}
|
||||
|
||||
void InitializeConnection ()
|
||||
{
|
||||
ctx = new MonoBtlsSslCtx ();
|
||||
@ -226,7 +216,7 @@ namespace Mono.Btls
|
||||
ctx.SetDebugBio (errbio);
|
||||
#endif
|
||||
|
||||
SetupCertificateStore ();
|
||||
MonoBtlsProvider.SetupCertificateStore (ctx.CertificateStore, Settings, IsServer);
|
||||
|
||||
if (!IsServer || AskForClientCertificate)
|
||||
ctx.SetVerifyCallback (VerifyCallback, false);
|
||||
|
@ -150,7 +150,7 @@ namespace Mono.Btls
|
||||
using (var nativeChain = MonoBtlsProvider.GetNativeChain (certificates))
|
||||
using (var param = GetVerifyParam (targetHost, serverMode))
|
||||
using (var storeCtx = new MonoBtlsX509StoreCtx ()) {
|
||||
SetupCertificateStore (store);
|
||||
SetupCertificateStore (store, validator.Settings, serverMode);
|
||||
|
||||
storeCtx.Initialize (store, nativeChain);
|
||||
|
||||
@ -201,19 +201,45 @@ namespace Mono.Btls
|
||||
}
|
||||
}
|
||||
|
||||
internal static void SetupCertificateStore (MonoBtlsX509Store store, MonoTlsSettings settings, bool server)
|
||||
{
|
||||
AddTrustedRoots (store, settings, server);
|
||||
SetupCertificateStore (store);
|
||||
}
|
||||
|
||||
internal static void SetupCertificateStore (MonoBtlsX509Store store)
|
||||
{
|
||||
#if MONODROID
|
||||
store.SetDefaultPaths ();
|
||||
store.AddAndroidLookup ();
|
||||
#else
|
||||
AddUserStore (store);
|
||||
AddMachineStore (store);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !MONODROID
|
||||
static void AddUserStore (MonoBtlsX509Store store)
|
||||
{
|
||||
var userPath = MonoBtlsX509StoreManager.GetStorePath (MonoBtlsX509StoreType.UserTrustedRoots);
|
||||
if (Directory.Exists (userPath))
|
||||
store.AddDirectoryLookup (userPath, MonoBtlsX509FileType.PEM);
|
||||
}
|
||||
|
||||
static void AddMachineStore (MonoBtlsX509Store store)
|
||||
{
|
||||
var machinePath = MonoBtlsX509StoreManager.GetStorePath (MonoBtlsX509StoreType.MachineTrustedRoots);
|
||||
if (Directory.Exists (machinePath))
|
||||
store.AddDirectoryLookup (machinePath, MonoBtlsX509FileType.PEM);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void AddTrustedRoots (MonoBtlsX509Store store, MonoTlsSettings settings, bool server)
|
||||
{
|
||||
if (settings?.TrustAnchors == null)
|
||||
return;
|
||||
var trust = server ? MonoBtlsX509TrustKind.TRUST_CLIENT : MonoBtlsX509TrustKind.TRUST_SERVER;
|
||||
store.AddCollection (settings.TrustAnchors, trust);
|
||||
}
|
||||
|
||||
public static string GetSystemStoreLocation ()
|
||||
|
@ -159,8 +159,7 @@ namespace Mono.Btls
|
||||
|
||||
internal void AddTrustedRoots ()
|
||||
{
|
||||
var systemRoot = MonoBtlsProvider.GetSystemStoreLocation ();
|
||||
LoadLocations (null, systemRoot);
|
||||
MonoBtlsProvider.SetupCertificateStore (this);
|
||||
}
|
||||
|
||||
public MonoBtlsX509Lookup AddLookup (MonoBtlsX509LookupType type)
|
||||
|
@ -1 +1 @@
|
||||
5e769f86c6e601eeed6a547e159a1e065ec48f06
|
||||
dd943c55962ea9b83f4ea03f975d288bc9cef06b
|
@ -861,7 +861,7 @@ EXTRA_DIST = TestDriver.cs \
|
||||
Makefile.am.in
|
||||
|
||||
version.h: Makefile
|
||||
echo "#define FULL_VERSION \"Stable 4.8.0.489/9ac5bf2\"" > version.h
|
||||
echo "#define FULL_VERSION \"Stable 4.8.0.495/e4a3cf3\"" > version.h
|
||||
|
||||
# Utility target for patching libtool to speed up linking
|
||||
patch-libtool:
|
||||
|
@ -861,7 +861,7 @@ EXTRA_DIST = TestDriver.cs \
|
||||
Makefile.am.in
|
||||
|
||||
version.h: Makefile
|
||||
echo "#define FULL_VERSION \"Stable 4.8.0.489/9ac5bf2\"" > version.h
|
||||
echo "#define FULL_VERSION \"Stable 4.8.0.495/e4a3cf3\"" > version.h
|
||||
|
||||
# Utility target for patching libtool to speed up linking
|
||||
patch-libtool:
|
||||
|
@ -1 +1 @@
|
||||
d78d3160cb95346fa22eb7f257a9e51030af6b97
|
||||
1d2d50a79752da03d88b373dcfa4536e767c289d
|
@ -1 +1 @@
|
||||
8f2ef218cc4e9047676a88b73fef6c609e45b6fd
|
||||
1b752cd4d3afff4c3c4fa86f3c53cad92fa6ca37
|
@ -1 +1 @@
|
||||
#define FULL_VERSION "Stable 4.8.0.489/9ac5bf2"
|
||||
#define FULL_VERSION "Stable 4.8.0.495/e4a3cf3"
|
||||
|
@ -379,7 +379,8 @@ mono_threads_platform_set_priority (MonoThreadInfo *info, MonoThreadPriority pri
|
||||
param.sched_priority = 0;
|
||||
break;
|
||||
default:
|
||||
g_error ("%s: unknown policy %d", __func__, policy);
|
||||
g_warning ("%s: unknown policy %d", __func__, policy);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
BIN
po/mcs/de.gmo
BIN
po/mcs/de.gmo
Binary file not shown.
@ -1 +1 @@
|
||||
da2fd49923155b32b5bca18fb07cf7c7e320a8dc
|
||||
24891e68bb877147f45264905411a3d29b9697a2
|
BIN
po/mcs/es.gmo
BIN
po/mcs/es.gmo
Binary file not shown.
@ -1 +1 @@
|
||||
e4a9bbec1f2d716b4b646529ce5394539d5aaf92
|
||||
9a0004e54942d65f96b8db4923ab25ae00b98111
|
BIN
po/mcs/ja.gmo
BIN
po/mcs/ja.gmo
Binary file not shown.
@ -1 +1 @@
|
||||
6b60ac7183d65ee9d7f074c8a23f3799d762e2b6
|
||||
23ce3caec9ef14b46dd2699cb25dc0b6ba1e24b2
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: mono 4.8.0\n"
|
||||
"Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n"
|
||||
"POT-Creation-Date: 2017-02-15 09:35+0000\n"
|
||||
"POT-Creation-Date: 2017-02-22 17:10+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"
|
||||
|
BIN
po/mcs/pt_BR.gmo
BIN
po/mcs/pt_BR.gmo
Binary file not shown.
@ -1 +1 @@
|
||||
593851f8ddc8ae23de4aecfe19261ca7f69713f9
|
||||
d89d14404907c8feee684d37888501a226d846e8
|
Loading…
x
Reference in New Issue
Block a user