Giter Site home page Giter Site logo

How to use ACME-PS with SANs about acme-ps HOT 6 CLOSED

pkisharp avatar pkisharp commented on July 3, 2024
How to use ACME-PS with SANs

from acme-ps.

Comments (6)

glatzert avatar glatzert commented on July 3, 2024

from acme-ps.

glatzert avatar glatzert commented on July 3, 2024

Can you tell me, what line of your code throws the exception?

The error message says it's part of Get-ACMEChallenge, which is never called from the module itself, so it seems the error comes later?

from acme-ps.

zoTT5301 avatar zoTT5301 commented on July 3, 2024

First of all my script begins with
using module ACME-PS

That offers the type "AcmeIdentifier" and is the only way to call the New-ACMEOrder type-conform with an AcmeIdentifier[] array.

# Build the array
[AcmeIdentifier[]] $ACMEIdentifiers = $NULL;
$ACMEIdentifiers +=$ACMEServerCN;

#Add SANs from a SAN string-array
foreach ($SAN in $LECERT_SANs) 
{
      $ACMEIdentifiers += New-ACMEIdentifier $SAN
}

# Create the order object at the ACME service.
$ACMEOrder = New-ACMEOrder $ACMEState  -Identifiers $ACMEIdentifiers;

# Fetch the authorizations for that order
$ACMEauthZ = Get-ACMEAuthorization  -Order $ACMEOrder;

# Select a challenge to fullfill
$ACMEChallenge = Get-ACMEChallenge $ACMEState $ACMEauthZ "http-01";

and here occurs the exception: Get-ACMEChallenge

That was my approach to place an order more than one Name for the Certificate.

I am also not sure how to get a wildcard-Certificate...

from acme-ps.

glatzert avatar glatzert commented on July 3, 2024

Get-ACMEAuthorizations might return multiple authorizations for SAN.
foreach($authz in $acmeAuthz) {...} might solve your problem.

from acme-ps.

glatzert avatar glatzert commented on July 3, 2024

Since I did not hear back anything by now, I'm closing this as done.

from acme-ps.

asifma avatar asifma commented on July 3, 2024

This works, just pipe it...:

$ACMEChallenge = $ACMEauthZ | Get-ACMEChallenge -State $ACMEState -Type "dns-01"

from acme-ps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.