1

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:user@email.com -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?

  • If your script always worked and now it does not, then this is not necessarily a code issue, it's an environment change impacting execution success or the resource you are using. If it is the resource, you really need to contact the person or company who developed it. You are asking for debugging help with some module developed by someone else. This means someone looking at the source code of the older version of the module and comparing to the latest versions, which is something you can do directly; or just roll back to an earlier version that worked. – postanote May 08 '21 at 23:53

1 Answers1

2

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.

Sanjit
  • 21
  • 2