ACMESharp Invalid URI: The URI scheme is not valid

869 Views Asked by At

I have a script created to automate the process of generating Let's Encrypt certificates for my websites. The Script always worked fine, but starting yesterday I am receiving the issue below when I try to run:

New-ACMERegistration -Contacts mailto:[email protected] -AcceptTos

Error:

System.UriFormatException: Invalid URI: The URI scheme is not valid.
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
   at ACMESharp.AcmeClient.GetDirectory(Boolean saveRelative) in 
C:\projects\acmesharp\ACMESharp\ACMESharp\AcmeClient.cs:line 145
   at ACMESharp.POSH.NewRegistration.ProcessRecord() in 
C:\projects\acmesharp\ACMESharp\ACMESharp.POSH\NewRegistration.cs:line 63
   at System.Management.Automation.CommandProcessor.ProcessRecord()

I have the latest version of th PowerShell module installed (https://www.powershellgallery.com/packages/ACMESharp/0.9.1.326).

Has anybody stumbled on a similar issue?

1

There are 1 best solutions below

0
On

An error is thrown because the BaseUri: https://acme-v01.api.letsencrypt.org/directory returns a JSON Error. ACME Protocol Version 1 has been deprecated. You will need to use a client that uses ACME Protocol Version 2. Consider replacing ACMESharp with ACME-PS.