evergreen icon indicating copy to clipboard operation
evergreen copied to clipboard

[New app]: OpenSSL

Open AScott-WWF opened this issue 1 year ago • 3 comments

What is the new application?

OpenSSL is a widely used SSL security component in a number of products The purpose of adding this App to Evergreen is primarily for reporting purposes (although the download for the latest version could be useful for developers "openssl-*.tar.gz") OpenSSL publish all the latest releases on both their downloads page (https://www.openssl.org/source/) and on GitHub (https://api.github.com/repos/openssl/openssl/releases) As (currently) OpenSSL keep 3 different versions of their products available (v3.0.x, v3.1.x and v3.2.x) it would not (IMHO) be possible to use the 'latest' version via the Github API (https://api.github.com/repos/openssl/openssl/releases/latest) as this would only show the latest v3.2.x version I'm wondering if it is possible to get all the OpenSSL releases from the API (https://api.github.com/repos/openssl/openssl/releases), then sort by version number and filter the top version of each?

I did attempt to create a Get-OpenSSL.ps1 (App) and OpenSSL.json (Manifest) but found I got no results. Get-OpenSSL.ps1:

Function Get-OpenSSL {
    <#
        .SYNOPSIS
            Returns the latest OpenSSL version numbers and downloads.

        .NOTES
            Author: Adrian Scott
    #>
    [OutputType([System.Management.Automation.PSObject])]
    [CmdletBinding(SupportsShouldProcess = $False)]
    param (
        [Parameter(Mandatory = $False, Position = 0)]
        [ValidateNotNull()]
        [System.Management.Automation.PSObject]
        $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1])
    )

    # Pass the repo releases API URL and return a formatted object
    $params = @{
        Uri          = $res.Get.Uri
        MatchVersion = $res.Get.MatchVersion
        Filter       = $res.Get.MatchFileTypes
    }
    $object = Get-GitHubRepoRelease @params
    Write-Output -InputObject $object
}

OpenSSL.json:

{
    "Name": "OpenSSL",
    "Source": "https://www.openssl.org/source/",
    "Get": {
        "Uri": "https://api.github.com/repos/openssl/openssl/releases/latest",
        "MatchVersion": "openssl-(\\d+(\\.\\d+){1,4}).*",
        "MatchFileTypes": "\\.tar\\.gz$"
    },
    "Install": {
        "Setup": "openssl-*.tar.gz",
        "Preinstall": "",
        "Physical": {
            "Arguments": "/S",
            "PostInstall": []
        },
        "Virtual": {
            "Arguments": "/S",
            "PostInstall": []
        }
    }
}

Vendor site

https://www,openssl.org

Does the vendor require a sign-in to download the app?

No

Does the application include an updater?

No

Have you reviewed the list of supported applications?

  • [X] Supported apps at: https://stealthpuppy.com/evergreen/apps/

AScott-WWF avatar Feb 12 '24 13:02 AScott-WWF

BTW ShiningLight make EXE/MSI builds for this rather than relying on just the zips:

https://slproweb.com/products/Win32OpenSSL.html

Also they have a JSON file with download links and hashes:

https://raw.githubusercontent.com/slproweb/opensslhashes/master/win32_openssl_hashes.json

DanGough avatar Feb 27 '24 20:02 DanGough

@AScott-WWF no releases are returned because the .tar.gz file is not included in the releases. These files are just a rollup of the entire repo.

aaronparker avatar Mar 11 '24 03:03 aaronparker

-ReturnVersionOnly could be used to return the version number from the OpenSSL repo, and then hardcode URLs with text replacement in the JSON.

Otherwise, go with the Shining Light version because the OpenSSL version requires compiling anyway, so not usable for most administrators.

aaronparker avatar Mar 11 '24 03:03 aaronparker