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

Unable to create a new certificate request using a csr #121

Closed
cmblackburn opened this issue Jun 14, 2022 · 1 comment
Closed

Unable to create a new certificate request using a csr #121

cmblackburn opened this issue Jun 14, 2022 · 1 comment

Comments

@cmblackburn
Copy link

Environment

Operating System:  windows 10
VenafiPS version: 4.5
PowerShell version:  5.1
TPP version (if applicable): 

Steps to reproduce

$csr = "-----BEGIN NEW CERTIFICATE REQUEST-----MIID/zCCAucCAQAwgYoxCzAJBgNVBAYTAlVTMRYwFAYDVQQIDA1NYXNzYWNodXNldHRzMQ8wDQYDVQQHDAZCb3N0b24xFDASBgNVBAoMC0NvbnRvc28gSW5jMR4wHAYDVQQLDBVDb250b3NvIEVhc3QgRGl2aXNpb24xHDAaBgNVBAMME25ld2NlcnQuY29udG9zby5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDGU8NfoVLcNKqxKPjp52MRsaX/Wy/CI3iDhdnF+zvIH2f6Ioczd09BGILnfE7LcoHGcHhwBBhJgT5BBmuAet05r1HBtjWGULfL/JcxXWRpwmwAXxxu2EowMlRJqGjPrK8U4KxrMqYtRX4ZB+2IvnSkdBjvQlTobjk1hO6Amftt0Ir7y5z+KM+Sc2EbU8YsFFM/qR9esRvD6LHo0rRh5yQLNRnPAXW3om5lhM4dSugtjjrdfox/fD5cwNKTDTKDLtymbwVBju0z6Q+R8aKM9do8bgrE3/7b4pNSl5ZBHFO0ObiNSiea4Q6RxPjv0hmgiY6q3UJ3RD/2GuAxhkZOTvNAgMBAAGgggEtMBwGCisGAQQBgjcNAgMxDhYMMTAuMC4xOTA0Mi4yMEQGCSsGAQQBgjcVFDE3MDUCAQkMF0xURjRFRTA4QTNGNzdFLm5mY3UubmV0DApORkNVXGMxODUzDAtjZXJ0cmVxLmV4ZTBTBgkqhkiG9w0BCQ4xRjBEMA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATAdBgNVHQ4EFgQUiYV+fWBe4YIw2rI2zHlm30PmNmkwcgYKKwYBBAGCNw0CAjFkMGICAQEeWgBNAGkAYwByAG8AcwBvAGYAdAAgAFIAUwBBACAAUwBDAGgAYQBuAG4AZQBsACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcgMBADANBgkqhkiG9w0BAQUFAAOCAQEAI43qW4xqp4epxr/fayRD8aBgm61Bc1Pd58QoJyI1KbyjWiJ0pWtII7T35JfcSBkq2ALOFAWB29S8y0A6E3LQQMk/kQbmwJmCQYl/KGegL5+EaAxzR2p9EYj01uUweWEsqvPzPnakJBDO/C3XIpfNggHsMYLq/udx2boPIdDFIiw528QKIJxk4NUyRVzWIXE5Um1DED9dlSJtope8JxjIcQNuRoIJ7iXiOsP5cBxFTxr1Fo5man4MFuOkmFbHDdIlsn+95N22g8tDl7mXtT5OI7vw64R249qH1dMvhtvpl962n9TWpwBCkmuPAzRV3gWY0SlWFobgtTailePAgahd/A==-----END NEW CERTIFICATE REQUEST-----"
new-tppcertificate -csr "$($csr)"

Expected behavior

create a certificate with user provided csr

Actual behavior

Cannot find an overload for "Add" and the argument count: "3".
At C:\scripts\PKI-Team-Scripts\powershellmodules\VenafiPS\Public\New-TppCertificate.ps1:287 char:13

  •         $params.Body.Add('PKCS10', $Csr -replace "`n|`r", "")
    
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], MethodException
    • FullyQualifiedErrorId : MethodCountCouldNotFindBest

Screenshots

@gdbarron
Copy link
Collaborator

Duplicate of #111, fixed in v4.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants