Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mcs/class/System/Assembly/AssemblyInfo.cs1
-rw-r--r--mcs/tools/Makefile3
-rw-r--r--mcs/tools/btls/AssemblyInfo.cs26
-rw-r--r--mcs/tools/btls/Makefile17
-rw-r--r--mcs/tools/btls/btls-cert-sync-net_4_x.csproj99
-rw-r--r--mcs/tools/btls/btls-cert-sync.cs61
-rw-r--r--mcs/tools/btls/btls-cert-sync.exe.sources4
-rw-r--r--mcs/tools/security/cert-sync.cs38
-rw-r--r--msvc/scripts/order.xml11
-rw-r--r--net_4_x.sln6
-rw-r--r--scripts/.gitignore1
-rw-r--r--scripts/Makefile.am1
12 files changed, 25 insertions, 243 deletions
diff --git a/mcs/class/System/Assembly/AssemblyInfo.cs b/mcs/class/System/Assembly/AssemblyInfo.cs
index b3c55010f65..9b7145c1130 100644
--- a/mcs/class/System/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System/Assembly/AssemblyInfo.cs
@@ -69,7 +69,6 @@ using System.Runtime.InteropServices;
[assembly: InternalsVisibleTo ("System.ComponentModel.DataAnnotations, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo ("System.Net.Http, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
-[assembly: InternalsVisibleTo ("btls-cert-sync, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
[assembly: InternalsVisibleTo ("Mono.Btls.Interface, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
[assembly: InternalsVisibleTo ("Mono.Security, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
diff --git a/mcs/tools/Makefile b/mcs/tools/Makefile
index 60600a30a32..a5d69ff81e5 100644
--- a/mcs/tools/Makefile
+++ b/mcs/tools/Makefile
@@ -46,8 +46,7 @@ net_4_5_dirs := \
mdbrebase \
ikdasm \
mono-symbolicate \
- linker-analyzer \
- btls
+ linker-analyzer
build_SUBDIRS = gacutil security culevel cil-stringreplacer commoncryptogenerator
net_4_5_SUBDIRS = gacutil
diff --git a/mcs/tools/btls/AssemblyInfo.cs b/mcs/tools/btls/AssemblyInfo.cs
deleted file mode 100644
index 06f8d61c8d2..00000000000
--- a/mcs/tools/btls/AssemblyInfo.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System;
-using System.Diagnostics;
-using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-[assembly: AssemblyTitle ("btls-cert-sync")]
-[assembly: AssemblyDescription ("btls-cert-sync")]
-[assembly: AssemblyDefaultAlias ("btls-cert-sync")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
-[assembly: SatelliteContractVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-
-[assembly: CLSCompliant (true)]
-[assembly: NeutralResourcesLanguage ("en-US")]
-
-[assembly: ComVisible (false)]
-
-[assembly: AssemblyDelaySign (true)]
-[assembly: AssemblyKeyFile ("../../class/mono.pub")]
diff --git a/mcs/tools/btls/Makefile b/mcs/tools/btls/Makefile
deleted file mode 100644
index b551fa782c6..00000000000
--- a/mcs/tools/btls/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-thisdir = tools/btls
-SUBDIRS =
-include ../../build/rules.make
-
-LOCAL_MCS_FLAGS =
-LIB_REFS = System Mono.Security Mono.Btls.Interface
-PROGRAM = btls-cert-sync.exe
-
-ifndef HAVE_BTLS
-PROGRAM_NAME = dummy-btls-cert-sync.exe
-NO_INSTALL = yes
-NO_SIGN_ASSEMBLY = yes
-NO_TEST = yes
-NO_BUILD = yes
-endif
-
-include ../../build/executable.make
diff --git a/mcs/tools/btls/btls-cert-sync-net_4_x.csproj b/mcs/tools/btls/btls-cert-sync-net_4_x.csproj
deleted file mode 100644
index 5b49c7c70dc..00000000000
--- a/mcs/tools/btls/btls-cert-sync-net_4_x.csproj
+++ /dev/null
@@ -1,99 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{2323EB4F-0DBA-47C7-B4AA-AD38CCD16BF8}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <NoWarn>1699</NoWarn>
- <OutputPath>./../../class/lib/net_4_x</OutputPath>
- <IntermediateOutputPath>obj-net_4_x</IntermediateOutputPath>
- <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
- <NoStdLib>True</NoStdLib>
-
- <NoConfig>True</NoConfig>
-
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>
- </RootNamespace>
- <AssemblyName>btls-cert-sync</AssemblyName>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
-
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <NoWarn>1699</NoWarn>
- <Optimize>false</Optimize>
- <DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <NoWarn>1699</NoWarn>
- <Optimize>true</Optimize>
- <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
- Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
- is a problem to compile the Mono mscorlib.dll -->
- <PropertyGroup>
- <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
- </PropertyGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <ItemGroup>
- <Compile Include="..\..\build\common\Consts.cs" />
- <Compile Include="..\..\build\common\SR.cs" />
- <Compile Include="AssemblyInfo.cs" />
- <Compile Include="btls-cert-sync.cs" /> </ItemGroup>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup>
- <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
-
- </PreBuildEvent>
- <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
-
- </PreBuildEvent>
- <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
-
- </PostBuildEvent>
- <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
-
- </PostBuildEvent>
- </PropertyGroup>
- <ItemGroup>
- <ProjectReference Include="../../class/corlib/corlib-net_4_x.csproj">
- <Project>{2CA6026B-2DC8-4C4C-A12C-1E8234049DB7}</Project>
- <Name>corlib-net_4_x</Name>
- </ProjectReference>
- <ProjectReference Include="../../class/System/System-net_4_x.csproj">
- <Project>{2762E921-91A8-4C87-91E9-BA628013F753}</Project>
- <Name>System-net_4_x</Name>
- </ProjectReference>
- <ProjectReference Include="../../class/Mono.Security/Mono.Security-net_4_x.csproj">
- <Project>{42D59DE7-586F-4ACF-BDD5-E7869E39E3EF}</Project>
- <Name>Mono.Security-net_4_x</Name>
- </ProjectReference>
- <ProjectReference Include="../../class/Mono.Btls.Interface/Mono.Btls.Interface-net_4_x.csproj">
- <Project>{BF32D586-8FBB-4A2A-A734-AA17CDAB283F}</Project>
- <Name>Mono.Btls.Interface-net_4_x</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
-</Project>
-
diff --git a/mcs/tools/btls/btls-cert-sync.cs b/mcs/tools/btls/btls-cert-sync.cs
deleted file mode 100644
index fcdc708e0ab..00000000000
--- a/mcs/tools/btls/btls-cert-sync.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-using System;
-using System.IO;
-using System.Text;
-using System.Security.Cryptography.X509Certificates;
-using MNS = Mono.Net.Security;
-
-namespace Mono.Btls
-{
- static class BtlsCertSync
- {
- static void Main (string[] args)
- {
- if (!MNS.MonoTlsProviderFactory.IsBtlsSupported ()) {
- Console.Error.WriteLine ("BTLS is not supported in this runtime!");
- Environment.Exit (255);
- }
-
- var configPath = Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData);
- configPath = Path.Combine (configPath, ".mono");
-
- var oldStorePath = Path.Combine (configPath, "certs", "Trust");
- var newStorePath = MonoBtlsX509StoreManager.GetStorePath (MonoBtlsX509StoreType.UserTrustedRoots);
-
- if (!Directory.Exists (oldStorePath)) {
- Console.WriteLine ("Old trust store {0} does not exist.");
- Environment.Exit (255);
- }
-
- if (Directory.Exists (newStorePath))
- Directory.Delete (newStorePath, true);
- Directory.CreateDirectory (newStorePath);
-
- var oldfiles = Directory.GetFiles (oldStorePath, "*.cer");
- Console.WriteLine ("Found {0} files in the old store.", oldfiles.Length);
-
- foreach (var file in oldfiles) {
- Console.WriteLine ("Converting {0}.", file);
- var data = File.ReadAllBytes (file);
- using (var x509 = MonoBtlsX509.LoadFromData (data, MonoBtlsX509Format.DER)) {
- ConvertToNewFormat (newStorePath, x509);
- }
- }
- }
-
- static void ConvertToNewFormat (string root, MonoBtlsX509 x509)
- {
- long hash = x509.GetSubjectNameHash ();
-
- string newName;
- int index = 0;
- do {
- newName = Path.Combine (root, string.Format ("{0:x8}.{1}", hash, index++));
- } while (File.Exists (newName));
- Console.WriteLine (" new name: {0}", newName);
-
- using (var stream = new FileStream (newName, FileMode.Create))
- using (var bio = MonoBtlsBio.CreateMonoStream (stream))
- x509.ExportAsPEM (bio, true);
- }
- }
-}
diff --git a/mcs/tools/btls/btls-cert-sync.exe.sources b/mcs/tools/btls/btls-cert-sync.exe.sources
deleted file mode 100644
index 706d78f894b..00000000000
--- a/mcs/tools/btls/btls-cert-sync.exe.sources
+++ /dev/null
@@ -1,4 +0,0 @@
-../../build/common/SR.cs
-../../build/common/Consts.cs
-AssemblyInfo.cs
-btls-cert-sync.cs
diff --git a/mcs/tools/security/cert-sync.cs b/mcs/tools/security/cert-sync.cs
index 56797562e50..b7b77f8f766 100644
--- a/mcs/tools/security/cert-sync.cs
+++ b/mcs/tools/security/cert-sync.cs
@@ -1,5 +1,5 @@
//
-// cert-sync.cs: Import the root certificates from Linux SSL store into Mono
+// cert-sync.cs: Import the root certificates from a certificate store into Mono
//
// Authors:
// Sebastien Pouliot <sebastien@ximian.com>
@@ -38,8 +38,8 @@ using System.Text;
using Mono.Security.X509;
-[assembly: AssemblyTitle ("Linux Cert Store Sync")]
-[assembly: AssemblyDescription ("Synchronize local certs with certs from local Linux trust store.")]
+[assembly: AssemblyTitle ("Mono Certificate Store Sync")]
+[assembly: AssemblyDescription ("Populate Mono certificate store from a concatenated list of certificates.")]
namespace Mono.Tools
{
@@ -50,7 +50,6 @@ namespace Mono.Tools
static string inputFile;
static bool quiet;
static bool userStore;
- static bool btlsStore = false;
static X509Certificate DecodeCertificate (string s)
{
@@ -116,13 +115,26 @@ namespace Mono.Tools
WriteLine ("No certificates were found.");
return 0;
}
-
- X509Stores stores;
- if (userStore)
- stores = btlsStore ? X509StoreManager.NewCurrentUser : X509StoreManager.CurrentUser;
- else
- stores = btlsStore ? X509StoreManager.NewLocalMachine : X509StoreManager.LocalMachine;
- X509Store store = stores.TrustedRoot;
+
+ if (userStore) {
+ WriteLine ("Importing into legacy user store:");
+ ImportToStore (roots, X509StoreManager.CurrentUser.TrustedRoot);
+ WriteLine ("");
+ WriteLine ("Importing into BTLS user store:");
+ ImportToStore (roots, X509StoreManager.NewCurrentUser.TrustedRoot);
+ } else {
+ WriteLine ("Importing into legacy system store:");
+ ImportToStore (roots, X509StoreManager.LocalMachine.TrustedRoot);
+ WriteLine ("");
+ WriteLine ("Importing into BTLS system store:");
+ ImportToStore (roots, X509StoreManager.NewLocalMachine.TrustedRoot);
+ }
+
+ return 0;
+ }
+
+ static void ImportToStore (X509CertificateCollection roots, X509Store store)
+ {
X509CertificateCollection trusted = store.Certificates;
int additions = 0;
WriteLine ("I already trust {0}, your new list has {1}", trusted.Count, roots.Count);
@@ -156,7 +168,6 @@ namespace Mono.Tools
}
}
WriteLine ("Import process completed.");
- return 0;
}
static string Thumbprint (string algorithm, X509Certificate certificate)
@@ -179,8 +190,7 @@ namespace Mono.Tools
case "--user":
userStore = true;
break;
- case "--btls":
- btlsStore = true;
+ case "--btls": // we always import to the btls store too now, keep for compat
break;
default:
WriteLine ("Unknown option '{0}'.", args[i]);
diff --git a/msvc/scripts/order.xml b/msvc/scripts/order.xml
index 55ab833cd1c..9e8ddb8e7fb 100644
--- a/msvc/scripts/order.xml
+++ b/msvc/scripts/order.xml
@@ -5610,17 +5610,6 @@
<resources></resources>
<response>linkeranalyzer.exe.sources</response>
</project>
- <project dir="tools/btls" library="btls-cert-sync-net_4_x">
- <boot></boot>
- <flags>/codepage:65001 /nologo /noconfig /deterministic -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll /debug:portable -optimize -r:System -r:Mono.Security -r:Mono.Btls.Interface</flags>
- <output>btls-cert-sync.exe</output>
- <built_sources></built_sources>
- <library_output>./../../class/lib/net_4_x/btls-cert-sync.exe</library_output>
- <fx_version>4.5</fx_version>
- <profile>net_4_x</profile>
- <resources></resources>
- <response>btls-cert-sync.exe.sources</response>
- </project>
<project dir="mcs" library="mcs-net_4_x">
<boot></boot>
<flags>/codepage:65001 /nologo /noconfig /deterministic -d:STATIC,NO_SYMBOL_WRITER,NO_AUTHENTICODE -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_PROCESS_START -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib -r:./../class/lib/net_4_x/mscorlib.dll /debug:portable -optimize -r:System.Core -r:System.Xml -r:System</flags>
diff --git a/net_4_x.sln b/net_4_x.sln
index 4b1ce16de33..49a8a63a038 100644
--- a/net_4_x.sln
+++ b/net_4_x.sln
@@ -669,8 +669,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mono-symbolicate-net_4_x",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "linkeranalyzer-net_4_x", "mcs/tools/linker-analyzer/linkeranalyzer-net_4_x.csproj", "{D7789C48-C33A-4FE5-BD42-4DBAB2850796}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "btls-cert-sync-net_4_x", "mcs/tools/btls/btls-cert-sync-net_4_x.csproj", "{2323EB4F-0DBA-47C7-B4AA-AD38CCD16BF8}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mcs-net_4_x", "mcs/mcs/mcs-net_4_x.csproj", "{322A755A-ED38-4295-979D-E49EBAFA2852}"
EndProject
Global
@@ -2015,10 +2013,6 @@ Global
{D7789C48-C33A-4FE5-BD42-4DBAB2850796}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D7789C48-C33A-4FE5-BD42-4DBAB2850796}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D7789C48-C33A-4FE5-BD42-4DBAB2850796}.Release|Any CPU.Build.0 = Release|Any CPU
- {2323EB4F-0DBA-47C7-B4AA-AD38CCD16BF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2323EB4F-0DBA-47C7-B4AA-AD38CCD16BF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2323EB4F-0DBA-47C7-B4AA-AD38CCD16BF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2323EB4F-0DBA-47C7-B4AA-AD38CCD16BF8}.Release|Any CPU.Build.0 = Release|Any CPU
{322A755A-ED38-4295-979D-E49EBAFA2852}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{322A755A-ED38-4295-979D-E49EBAFA2852}.Debug|Any CPU.Build.0 = Debug|Any CPU
{322A755A-ED38-4295-979D-E49EBAFA2852}.Release|Any CPU.ActiveCfg = Release|Any CPU
diff --git a/scripts/.gitignore b/scripts/.gitignore
index 6b79de7dc52..f7f8b3fe0e2 100644
--- a/scripts/.gitignore
+++ b/scripts/.gitignore
@@ -2,7 +2,6 @@
/al
/al1
/al2
-/btls-cert-sync
/caspol
/cert-sync
/cert2spc
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 6c2a338bc4a..62d350c79dd 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -74,7 +74,6 @@ scripts_4_0 = \
prj2make$(SCRIPT_SUFFIX) \
soapsuds$(SCRIPT_SUFFIX) \
caspol$(SCRIPT_SUFFIX) \
- btls-cert-sync$(SCRIPT_SUFFIX) \
cert-sync$(SCRIPT_SUFFIX) \
cert2spc$(SCRIPT_SUFFIX) \
certmgr$(SCRIPT_SUFFIX) \