Skip to content

Commit

Permalink
stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
ffMathy committed Jan 14, 2019
1 parent c5522b5 commit a155504
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@ await client.WebApps.Manager
{
logger.LogDebug("Will create new Azure certificate for key {0} of {1} bytes", persistenceType, bytes.Length);

var certificate = new X509Certificate2(bytes, "");

logger.LogTrace("Trying to fetch DnsName from created certificate.");

var certificate = new X509Certificate2(bytes, nameof(FluffySpoon));
var domain = certificate.GetNameInfo(X509NameType.DnsName, false);

logger.LogInformation("Creating new Azure certificate for key {0} and domain {1}.", persistenceType, domain);
Expand Down Expand Up @@ -102,8 +99,8 @@ await client.WebApps.Manager
.Define(certificateName)
.WithRegion(regionName)
.WithExistingResourceGroup(options.ResourceGroupName)
.WithPfxByteArray(bytes)
.WithPfxPassword(string.Empty)
.WithPfxByteArray()
.WithPfxPassword(nameof(FluffySpoon))
.CreateAsync();

var tags = new Dictionary<string, string>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ private async Task<byte[]> AcquireCertificateBytesFromOrderAsync(IOrderContext o
privateKey);

var pfxBuilder = certificateChain.ToPfx(privateKey);
var pfxBytes = pfxBuilder.Build(CertificateFriendlyName, string.Empty);
var pfxBytes = pfxBuilder.Build(CertificateFriendlyName, nameof(FluffySpoon));

_logger.LogInformation("Certificate acquired.");
return pfxBytes;
Expand Down

0 comments on commit a155504

Please sign in to comment.