Getting Thirdparty SSL via scripts [Answered]RSS

3 replies

Last post Jan 04, 2011 04:07 AM by suchiwa

  • Getting Thirdparty SSL via scripts

    Nov 03, 2010 09:38 AM|rkr31|LINK

    Hi

    I need to automate our shared hosting platform so that we can automatically install SSL Certs for sites.  Is there any way to do this in powershell?

    I guess i need to generate a CSR (lets say we do it for GeoTrust)

    Then i need to send that CSR off to them (this part can be done by our internal systems)

    Then i need to add the response to the server thus activating the SSL.

    Any ideas?

  • Re: Getting Thirdparty SSL via scripts

    Nov 07, 2010 03:56 PM|rkr31|LINK

     bump!

  • Re: Getting Thirdparty SSL via scripts

    Nov 11, 2010 08:09 AM|rkr31|LINK

    I got to the bottom of this by calling certutil and certreq from within powershell.   It's ugly but worked :)

     See below for the scripts

    http://rrustean.blogspot.com/2010/11/automating-ssl-using-powershell.html

  • Re: Getting Thirdparty SSL via scripts

    Jan 04, 2011 04:07 AM|suchiwa|LINK

     Hi,

     I worked with selfSSL to create certificates.

    # Create SSL Certificate
    $FQDN = $env:computername
    selfSSL /T /N:CN=$FQDN /V:3650 /S:2 /Q

    # Identify SSL thumbprint
    $thumbPath = ls cert:\LocalMachine\My
    $certHash=$thumbPath[1].thumbprint

    # SSL Certifcate
    appcmd set config /section:system.applicationHost/sites /siteDefaults.ftpServer.security.ssl.serverCertHash:$certHash /commit:apphost

    Vincent