Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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]+)";
Expand All @@ -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;
Expand Down Expand Up @@ -147,7 +147,7 @@ private void DisposeCertificates(IEnumerable<X509Certificate2> disposables)
}
}

#if NETCOREAPP2_2
#if NETCOREAPP2_0 || NETCOREAPP2_1 || NETCOREAPP2_2

public X509Certificate2 CreateAspNetCoreHttpsDevelopmentCertificate(DateTimeOffset notBefore, DateTimeOffset notAfter, string subjectOverride)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down