Hi,
i use ACMESharp module to create ssl certificates
(i dont use client software, i use ACMESharp via power shell)
i got a mail says that i use ACMEv1 protocol an i need to upgrade to
ACMEv2 protocol
What do i have to change in my code?
Hi,
i use ACMESharp module to create ssl certificates
(i dont use client software, i use ACMESharp via power shell)
i got a mail says that i use ACMEv1 protocol an i need to upgrade to
ACMEv2 protocol
What do i have to change in my code?
See this comment from the author of ACMESharp. Upgrading to ACME v2 won’t be possible, so you will need to move to another client.
ACMESharp’s successor, ACMESharpCore, has a new PowerShell project - https://github.com/PKISharp/ACMESharpCore-PowerShell .
this is my code below,
where can if find a new code that creates multiple domain certificates?
#install-Module -Name ACMESharp
import-module ACMESharp
$email = "mailto:admin@admin.com"
$iissitename = "websitename"
$certname = "aaa15$(get-date -format yyyy-MM-dd--HH-mm)"
$pfxfile = "C:\Certs\03\pfx\$certname.pfx"
$initializevault = $FALSE
$createregistration = $FALSE
$createalias = $TRUE
$domains = @(<...list of domains...>
)
$aliases = @()
# Change to the Vault folder
cd C:\ProgramData\ACMESharp\sysVault
# First time on the machine - intiialize vault
if($initializevault)
{
Initialize-ACMEVault
}
Get-ACMEVault
if($createregistration)
{
# Set up new 'account' tied to an email address
New-AcmeRegistration -Contacts "$email" -AcceptTos
}
For ($i=0; $i -lt $domains.Length; $i++) {
$aliases += @($domains[$i]+$(get-date -format yyyyMMddHHmm))
# Associate a new site
New-AcmeIdentifier -Dns $domains[$i] -Alias $aliases[$i]
#New-ACMEIdentifier -Dns $domain2 -Alias $alias2
# Prove the site exists and is accessible => (This creates files at .well-known\acme-challenge folder)
Complete-ACMEChallenge $aliases[$i] -ChallengeType http-01 -Handler iis -HandlerParameters @{WebSiteRef="$iissitename"} -Force
#Complete-ACMEChallenge $alias2 -ChallengeType http-01 -Handler iis -HandlerParameters @{WebSiteRef="$iissitename"} -Force
# Validate site
Submit-ACMEChallenge $aliases[$i] -ChallengeType http-01 -Force
#Submit-ACMEChallenge $alias2 -ChallengeType http-01 -Force
# check until valid or invalid - pending =>(Just check the status field)
Update-ACMEIdentifier $aliases[$i] -ChallengeType http-01
#Update-ACMEIdentifier $alias2 -ChallengeType http-01
}
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.