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

(OpenSSL.Light) Migrated to AU #701

Merged
merged 5 commits into from
Apr 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 17 additions & 12 deletions automatic/OpenSSL.Light/OpenSSL.Light.nuspec
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. -->
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>{{PackageName}}</id>
<title>OpenSSL – The Open Source SSL and TLS toolkit</title>
<id>OpenSSL.Light</id>
<version>1.1.0.20170216</version>
<packageSourceUrl>https://github.com/Chocolatey/chocolatey-coreteampackages/tree/master/automatic/OpenSSL.Light</packageSourceUrl>
<owners>chocolatey</owners>
<version>{{PackageVersion}}</version>
<title>OpenSSL – The Open Source SSL and TLS toolkit</title>
<authors>Shining Light Productions</authors>
<projectUrl>https://slproweb.com/products/Win32OpenSSL.html</projectUrl>
<iconUrl>https://cdn.rawgit.com/chocolatey/chocolatey-coreteampackages/ff58a020fa163df8a14004b9802a3cb455a76eac/icons/openssl.png</iconUrl>
<copyright>Ⓒ 2000-2003 Shining Light Productions</copyright>
<licenseUrl>https://www.openssl.org/source/license.html</licenseUrl>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the correct license for the Win32 distro?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, I don't now. I just reused the license already specified.

<requireLicenseAcceptance>false</requireLicenseAcceptance>
<tags>openssl-light openssl ssl tls pfx pem key rsa admin foss cross-platform</tags>
<summary>Open Source SSL v2/v3 and TLS v1 toolkit</summary>
<description>
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a full-strength general purpose cryptography library. The project is managed by a worldwide community of volunteers that use the Internet to communicate, plan, and develop the OpenSSL toolkit and its related documentation.

The Win32 OpenSSL Installation Project is dedicated to providing a simple installation of OpenSSL. It is easy to set up and easy to use through the simple, effective installer. No need to compile anything or jump through any hoops, just click a few times and it is installed, leaving you to doing real work. Download it today! Note that these are default builds of OpenSSL and subject to local and state laws. More information can be found in the legal agreement of the installation.
</description>
<projectUrl>https://slproweb.com/products/Win32OpenSSL.html</projectUrl>
<tags>openssl SSL TLS pfx pem key RSA admin</tags>
<licenseUrl>https://www.openssl.org/source/license.html</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<iconUrl>https://cdn.rawgit.com/chocolatey/chocolatey-coreteampackages/4e02a790f2396cfe0cc3343775338901e2072f5c/icons/openssl.png</iconUrl>
<releaseNotes></releaseNotes>
<packageSourceUrl>https://github.com/chocolatey/chocolatey-coreteampackages</packageSourceUrl>
</description>
<dependencies>
<!--We could set chocolatey to version 0.10.4, but that version was broken so we use 0.10.5-->
<dependency id="chocolatey" version="0.10.5" />
</dependencies>
</metadata>
<files>
<file src="legal\**" target="legal" />
<file src="tools\**" target="tools" />
</files>
</package>
5 changes: 5 additions & 0 deletions automatic/OpenSSL.Light/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# [<img src="https://cdn.rawgit.com/chocolatey/chocolatey-coreteampackages/ff58a020fa163df8a14004b9802a3cb455a76eac/icons/openssl.png" height="48" width="48" /> OpenSSL.Light](https://chocolatey.org/packages/OpenSSL.Light)

The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a full-strength general purpose cryptography library. The project is managed by a worldwide community of volunteers that use the Internet to communicate, plan, and develop the OpenSSL toolkit and its related documentation.

The Win32 OpenSSL Installation Project is dedicated to providing a simple installation of OpenSSL. It is easy to set up and easy to use through the simple, effective installer. No need to compile anything or jump through any hoops, just click a few times and it is installed, leaving you to doing real work. Download it today! Note that these are default builds of OpenSSL and subject to local and state laws. More information can be found in the legal agreement of the installation.
125 changes: 125 additions & 0 deletions automatic/OpenSSL.Light/legal/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@

LICENSE ISSUES
==============

The OpenSSL toolkit stays under a double license, i.e. both the conditions of
the OpenSSL License and the original SSLeay license apply to the toolkit.
See below for the actual license texts.

OpenSSL License
---------------

/* ====================================================================
* Copyright (c) 1998-2017 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
*
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* [email protected].
*
* 5. Products derived from this software may not be called "OpenSSL"
* nor may "OpenSSL" appear in their names without prior written
* permission of the OpenSSL Project.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
*
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
* This product includes cryptographic software written by Eric Young
* ([email protected]). This product includes software written by Tim
* Hudson ([email protected]).
*
*/

Original SSLeay License
-----------------------

/* Copyright (C) 1995-1998 Eric Young ([email protected])
* All rights reserved.
*
* This package is an SSL implementation written
* by Eric Young ([email protected]).
* The implementation was written so as to conform with Netscapes SSL.
*
* This library is free for commercial and non-commercial use as long as
* the following conditions are aheared to. The following conditions
* apply to all code found in this distribution, be it the RC4, RSA,
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
* included with this distribution is covered by the same copyright terms
* except that the holder is Tim Hudson ([email protected]).
*
* Copyright remains Eric Young's, and as such any Copyright notices in
* the code are not to be removed.
* If this package is used in a product, Eric Young should be given attribution
* as the author of the parts of the library used.
* This can be in the form of a textual message at program startup or
* in documentation (online or textual) provided with the package.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* "This product includes cryptographic software written by
* Eric Young ([email protected])"
* The word 'cryptographic' can be left out if the rouines from the library
* being used are not cryptographic related :-).
* 4. If you include any Windows specific code (or a derivative thereof) from
* the apps directory (application code) you must include an acknowledgement:
* "This product includes software written by Tim Hudson ([email protected])"
*
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* The licence and distribution terms for any publically available version or
* derivative of this code cannot be changed. i.e. this code cannot simply be
* copied and put under another distribution licence
* [including the GNU Public Licence.]
*/

21 changes: 21 additions & 0 deletions automatic/OpenSSL.Light/legal/VERIFICATION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
VERIFICATION
Verification is intended to assist the Chocolatey moderators and community
in verifying that this package's contents are trustworthy.

The embedded software have been downloaded from the listed download
location on <https://slproweb.com/products/Win32OpenSSL.html>
and can be verified by doing the following:

1. Download the following:
32-Bit software: <https://slproweb.com/download/Win32OpenSSL_Light-1_1_0e.exe>
64-Bit software: <https://slproweb.com/download/Win64OpenSSL_Light-1_1_0e.exe>
2. Get the checksum using one of the following methods:
- Using powershell function 'Get-FileHash'
- Use chocolatey utility 'checksum.exe'
3. The checksums should match the following:

checksum type: sha256
checksum32: B8C7754496D228CC52F63E5D4D98185C44DED85D2C10341202C7F493B5D7DED8
checksum64: 539AE73F8A19B5A01199126782DC2B8D1720403B6C89EDB59E5D80077784F4B6

The file 'LICENSE.txt' has been obtained from <https://www.openssl.org/source/license.txt>
36 changes: 12 additions & 24 deletions automatic/OpenSSL.Light/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
@@ -1,29 +1,17 @@
$packageId = '{{PackageName}}'
$ErrorActionPreference = 'Stop';

#default is to plop in c:\ -- yuck!
$installDir = Join-Path $Env:ProgramFiles 'OpenSSL'
$toolsPath = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"

$params = @{
packageName = $packageId;
fileType = 'exe';
#InnoSetup - http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html
silentArgs = '/silent', '/verysilent', '/sp-', '/suppressmsgboxes',
"/DIR=`"$installDir`"";
url = '{{DownloadUrl}}'
url64bit = '{{DownloadUrlx64}}'
$packageArgs = @{
packageName = 'OpenSSL.Light'
fileType = 'exe'
file = "$toolsPath\Win32OpenSSL_Light-1_1_0e.exe"
file64 = "$toolsPath\Win64OpenSSL_Light-1_1_0e.exe"
softwareName = ''
silentArgs = '/silent'
validExitCodes = @(0)
}

Install-ChocolateyPackage @params
Install-ChocolateyInstallPackage @packageArgs

if (!$Env:OPENSSL_CONF)
{
$configPath = Join-Path $installDir 'bin\openssl.cfg'

if (Test-Path $configPath)
{
[Environment]::SetEnvironmentVariable(
'OPENSSL_CONF', $configPath, 'User')

Write-Output "Configured OPENSSL_CONF variable as $configPath"
}
}
Remove-Item -Force -ea 0 "$toolsPath\*.exe","$toolsPath\*.ignore"
61 changes: 61 additions & 0 deletions automatic/OpenSSL.Light/update.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Import-Module AU
Import-Module "$PSScriptRoot\..\..\scripts\au_extensions.psm1"

$domain = 'https://slproweb.com'
$releases = "$domain/products/Win32OpenSSL.html"

$padUnderVersion = '1.1.1'

function global:au_BeforeUpdate { Get-RemoteFiles -Purge -NoSuffix }

function global:au_AfterUpdate { Set-DescriptionFromReadme -SkipFirst 1 }

function global:au_SearchReplace {
@{
".\legal\VERIFICATION.txt" = @{
"(?i)(^\s*location on\:?\s*)\<.*\>" = "`${1}<$releases>"
"(?i)(\s*32\-Bit Software.*)\<.*\>" = "`${1}<$($Latest.URL32)>"
"(?i)(\s*64\-Bit Software.*)\<.*\>" = "`${1}<$($Latest.URL64)>"
"(?i)(^\s*checksum\s*type\:).*" = "`${1} $($Latest.ChecksumType32)"
"(?i)(^\s*checksum(32)?\:).*" = "`${1} $($Latest.Checksum32)"
"(?i)(^\s*checksum64\:).*" = "`${1} $($Latest.Checksum64)"
}
".\tools\chocolateyInstall.ps1" = @{
"(?i)(^\s*file\s*=\s*`"[$]toolsPath\\).*`"" = "`${1}$($Latest.FileName32)`""
"(?i)(^\s*file64\s*=\s*`"[$]toolsPath\\).*`"" = "`${1}$($Latest.FileName64)`""
}
}
}
function global:au_GetLatest {
$download_page = Invoke-WebRequest -Uri $releases -UseBasicParsing

$re = 'Win32.*Light.*\.exe$'
$url32 = $domain + ($download_page.Links | ? href -match $re | select -first 1 -expand href)

$re = 'Win64.*Light.*\.exe$'
$url64 = $domain + ($download_page.links | ? href -match $re | select -first 1 -expand href)

$verRe = '[\-]|\.exe'
$version32 = ($url32 -split "$verRe" | select -last 1 -skip 1) -replace '_','.'
$version64 = ($url64 -split "$verRe" | select -last 1 -skip 1) -replace '_','.'
if ($version32 -ne $version64) {
throw "32bit version do not match the 64bit version"
}
$rev = ([byte][char]$version32[$version32.Length - 1]) - 97
$version32 = $version32 -replace '[a-z]+$',".$rev"

if ([version]$version32 -lt [version]'1.1.1') {
# Because previous package updates used dates, we need a number that ends up being larger
$revisionLen = '8' # Will end up with version '1.1.0.40000000'
} else {
$revisionLen = '4'
}

@{
URL32 = $url32
URL64 = $url64
Version = Get-PaddedVersion $version32 -OnlyBelowVersion $padUnderVersion -RevisionLength $revisionLen
}
}

update -ChecksumFor none
Binary file modified icons/openssl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading