File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ function New-PACertificate {
128
128
# - has different SANs
129
129
# - has different CSR
130
130
# - has different Lifetime
131
+ # - has different Profile
131
132
$order = Get-PAOrder - Name $Name - Refresh
132
133
$oldOrder = $null
133
134
$SANs = @ ($Domain | Where-Object { $_ -ne $Domain [0 ] }) | Sort-Object
@@ -138,7 +139,8 @@ function New-PACertificate {
138
139
(' CertKeyLength' -in $psbKeys -and $CertKeyLength -ne $order.KeyLength ) -or
139
140
($SANs -join ' ,' ) -ne (($order.SANs | Sort-Object ) -join ' ,' ) -or
140
141
($csrDetails -and $csrDetails.Base64Url -ne $order.CSRBase64Url ) -or
141
- ($LifetimeDays -and $LifetimeDays -ne $order.LifetimeDays ) )
142
+ ($LifetimeDays -and $LifetimeDays -ne $order.LifetimeDays ) -or
143
+ ($Profile -and $Profile -ne $order.Profile ) )
142
144
{
143
145
144
146
$oldOrder = $order
Original file line number Diff line number Diff line change @@ -125,10 +125,11 @@ function New-PAOrder {
125
125
126
126
$oldDomains = (@ ($order.MainDomain ) + @ ($order.SANs ) | Sort-Object ) -join ' ,'
127
127
128
- # skip confirmation if the Domains or KeyLength are different regardless
129
- # of the original order status or if the order is pending but expired
128
+ # skip confirmation if the Domains, KeyLength, or Profile are different
129
+ # regardless of the original order status or if the order is pending but expired
130
130
if ( ($order -and ($KeyLength -ne $order.KeyLength -or
131
131
($oldDomains -ne ($Domain | Sort-Object ) -join ' ,' ) -or
132
+ ($Profile -and $Profile -ne $order.Profile ) -or
132
133
($order.status -eq ' pending' -and (Get-DateTimeOffsetNow ) -gt ([DateTimeOffset ]::Parse($order.expires ))) ))) {
133
134
# do nothing
134
135
You can’t perform that action at this time.
0 commit comments