Skip to content

Commit

Permalink
fixed variable access before it is initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
Crypt32 committed Apr 15, 2021
1 parent a6fc573 commit a6847f6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions PKI/CertificateServices/CATemplate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ public class CATemplate {
throw new PlatformNotSupportedException();
}

version = certificateAuthority.Version;
sku = certificateAuthority.Sku;
configString = certificateAuthority.ConfigString;

ICertPropReaderD propReader;
if (certificateAuthority.PingRequest()) {
propReader = new CertPropReaderD(configString, false);
Expand All @@ -67,9 +71,6 @@ public class CATemplate {
Name = certificateAuthority.Name;
DisplayName = certificateAuthority.DisplayName;
ComputerName = certificateAuthority.ComputerName;
version = certificateAuthority.Version;
sku = certificateAuthority.Sku;
configString = certificateAuthority.ConfigString;

String[,] templates = propReader.GetCaTemplates();
for (Int32 i = 0; i <= templates.GetUpperBound(0); i++) {
Expand Down

0 comments on commit a6847f6

Please sign in to comment.