Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New-PACertificate throws error if DnsPlugin is not explicitly specified #109

Closed
TiloGit opened this issue Nov 27, 2018 · 5 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@TiloGit
Copy link

TiloGit commented Nov 27, 2018

HI,

just tried simple manual DNS like the tutorial but seems not working. here my debug:

PS C:\tools> New-PACertificate svn.mydom123.com -AcceptTOS -Contact tilos@mydom123.com -Verbose
VERBOSE: Using directory https://acme-v02.api.letsencrypt.org/directory
VERBOSE: POST https://acme-v02.api.letsencrypt.org/acme/acct/46614051 with -1-byte payload
VERBOSE: received 330-byte response of content type application/json
VERBOSE: Using account 46614051
VERBOSE: POST https://acme-v02.api.letsencrypt.org/acme/order/46614051/194759532 with -1-byte payload
VERBOSE: received 369-byte response of content type application/json
VERBOSE: Using existing order for svn.mydom123.com with status pending
Submit-ChallengeValidation : Cannot validate argument on parameter 'DnsPlugin'. The argument is null, empty, or an element of the argument collection contains
a null value. Supply a collection that does not contain any null values and then try the command again.
At C:\Users\tilos\Documents\WindowsPowerShell\Modules\Posh-ACME\Public\New-PACertificate.ps1:183 char:36
+         Submit-ChallengeValidation @chalParams
+                                    ~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Submit-ChallengeValidation], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Submit-ChallengeValidation

VERBOSE: POST https://acme-v02.api.letsencrypt.org/acme/order/46614051/194759532 with -1-byte payload
VERBOSE: received 369-byte response of content type application/json
@rmbolger rmbolger added the bug Something isn't working label Nov 27, 2018
@rmbolger rmbolger self-assigned this Nov 27, 2018
@rmbolger
Copy link
Owner

Whoops! This is definitely a bug. Thanks for finding it! Give me a bit to look into it. In the mean time, explicitly specifying the plugin with -DnsPlugin Manual should work around the problem.

@TiloGit
Copy link
Author

TiloGit commented Nov 27, 2018

tried that but no luck:

PS C:\tools> New-PACertificate svn.mydom123.com -AcceptTOS -Contact tilos@mydom123.com -Plugin Manual
New-PACertificate : Cannot process argument transformation on parameter 'PluginArgs'. Cannot convert the "Manual" value of type "System.String" to type
"System.Collections.Hashtable".
At line:1 char:91
+ ... lutions.com -AcceptTOS -Contact tilos@mydom123.com -Plugin Manual
+                                                                    ~~~~~~
    + CategoryInfo          : InvalidData: (:) [New-PACertificate], ParameterBindingArgumentTransformationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,New-PACertificate
	
PS C:\tools> Get-DnsPluginHelp Manual Add

NAME
    Add-DnsTxtManual

SYNOPSIS
    Stores the TXT record to display when Save-DnsTxtManual is called.


SYNTAX
    Add-DnsTxtManual [-RecordName] <String> [-TxtValue] <String> [-ExtraParams <Object>] [<CommonParameters>]


DESCRIPTION
    This plugin requires user interaction and should not be used for any certificates that require automated renewals. Renewal operations will skip these.


RELATED LINKS

REMARKS
    To see the examples, type: "get-help Add-DnsTxtManual -examples".
    For more information, type: "get-help Add-DnsTxtManual -detailed".
    For technical information, type: "get-help Add-DnsTxtManual -full".

PS C:\tools> New-PACertificate svn.mydom123.com -AcceptTOS -Contact tilos@mydom123.com -Plugin Manual -PluginArgs
New-PACertificate : Missing an argument for parameter 'PluginArgs'. Specify a parameter of type 'System.Collections.Hashtable' and try again.
At line:1 char:98
+ ... -AcceptTOS -Contact tilos@mydom123.com -Plugin Manual -PluginArgs
+                                                               ~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [New-PACertificate], ParameterBindingException
    + FullyQualifiedErrorId : MissingArgument,New-PACertificate

@rmbolger
Copy link
Owner

You typo'd the parameter name. You want -DnsPlugin, not -Plugin. The one you typed gets interpreted as -PluginArgs.

@rmbolger
Copy link
Owner

Also, it looks like this may have been broken since as far back as 2.5.0.

@rmbolger rmbolger changed the title Manual broken in 3.0? New-PACertificate throws error if DnsPlugin is not explicitly specified Nov 27, 2018
rmbolger added a commit that referenced this issue Nov 27, 2018
@rmbolger
Copy link
Owner

This should now be fixed in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants