From e8b49db7f8f5cc6ab9e66089a6f4684c8b1fe7cd Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Tue, 8 May 2018 12:46:15 -0700 Subject: [PATCH] Don't remove tfms from shared folder, add them --- .../CertificateManager.cs | 6 +++--- .../EnsureCertificateResult.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/shared/Microsoft.AspNetCore.Certificates.Generation.Sources/CertificateManager.cs b/shared/Microsoft.AspNetCore.Certificates.Generation.Sources/CertificateManager.cs index 115bca74dfe..5eceee4f891 100644 --- a/shared/Microsoft.AspNetCore.Certificates.Generation.Sources/CertificateManager.cs +++ b/shared/Microsoft.AspNetCore.Certificates.Generation.Sources/CertificateManager.cs @@ -37,7 +37,7 @@ internal class CertificateManager private const string MacOSSystemKeyChain = "/Library/Keychains/System.keychain"; private static readonly string MacOSUserKeyChain = Environment.GetEnvironmentVariable("HOME") + "/Library/Keychains/login.keychain-db"; private const string MacOSFindCertificateCommandLine = "security"; -#if NETCOREAPP2_2 +#if NETCOREAPP2_0 || NETCOREAPP2_1 || NETCOREAPP2_2 private static readonly string MacOSFindCertificateCommandLineArgumentsFormat = "find-certificate -c {0} -a -Z -p " + MacOSSystemKeyChain; #endif private const string MacOSFindCertificateOutputRegex = "SHA-1 hash: ([0-9A-Z]+)"; @@ -46,7 +46,7 @@ internal class CertificateManager private const string MacOSDeleteCertificateCommandLine = "sudo"; private const string MacOSDeleteCertificateCommandLineArgumentsFormat = "security delete-certificate -Z {0} {1}"; private const string MacOSTrustCertificateCommandLine = "sudo"; -#if NETCOREAPP2_2 +#if NETCOREAPP2_0 || NETCOREAPP2_1 || NETCOREAPP2_2 private static readonly string MacOSTrustCertificateCommandLineArguments = "security add-trusted-cert -d -r trustRoot -k " + MacOSSystemKeyChain + " "; #endif private const int UserCancelledErrorCode = 1223; @@ -147,7 +147,7 @@ private void DisposeCertificates(IEnumerable disposables) } } -#if NETCOREAPP2_2 +#if NETCOREAPP2_0 || NETCOREAPP2_1 || NETCOREAPP2_2 public X509Certificate2 CreateAspNetCoreHttpsDevelopmentCertificate(DateTimeOffset notBefore, DateTimeOffset notAfter, string subjectOverride) { diff --git a/shared/Microsoft.AspNetCore.Certificates.Generation.Sources/EnsureCertificateResult.cs b/shared/Microsoft.AspNetCore.Certificates.Generation.Sources/EnsureCertificateResult.cs index 7485305e92e..84c495249db 100644 --- a/shared/Microsoft.AspNetCore.Certificates.Generation.Sources/EnsureCertificateResult.cs +++ b/shared/Microsoft.AspNetCore.Certificates.Generation.Sources/EnsureCertificateResult.cs @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -#if NETCOREAPP2_2 +#if NETCOREAPP2_0 || NETCOREAPP2_1 || NETCOREAPP2_2 namespace Microsoft.AspNetCore.Certificates.Generation {