Skip to content

Commit

Permalink
Merge pull request #14 from henkmollema/vs2017
Browse files Browse the repository at this point in the history
Update to VS2017
  • Loading branch information
henkmollema authored Apr 24, 2017
2 parents 813e277 + 2a69818 commit bc32f79
Show file tree
Hide file tree
Showing 14 changed files with 71 additions and 163 deletions.
27 changes: 9 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
language: csharp
sudo: required
sudo: false
dist: trusty
addons:
apt:
packages:
- gettext
- libcurl4-openssl-dev
- libicu-dev
- libssl-dev
- libunwind8
- zlib1g
env:
global:
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
mono:
- 4.0.5
mono: none
os:
- linux
#- osx
#osx_image: xcode7.1
#before_install:
# - if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install openssl; ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/; fi
- osx
osx_image: xcode8.2
before_install:
- if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install openssl; ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/; fi
before_script:
- chmod +x ./build.sh
script:
- ./build.sh --quiet verify

- ./build.sh
11 changes: 5 additions & 6 deletions CryptoHelper.sln
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
# Visual Studio 15
VisualStudioVersion = 15.0.26403.7
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{AED8A2C4-4D9F-42D7-A0D0-0832128A0072}"
ProjectSection(SolutionItems) = preProject
global.json = global.json
NuGet.Config = NuGet.Config
README.md = README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{AE91DAF8-4A94-4A25-BA27-87F603FBCD4B}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "CryptoHelper", "src\CryptoHelper\CryptoHelper.xproj", "{05BFEEDB-1E36-4A70-BADA-07D68CEF8862}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CryptoHelper", "src\CryptoHelper\CryptoHelper.csproj", "{05BFEEDB-1E36-4A70-BADA-07D68CEF8862}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{D7466811-2D0F-4015-9480-E97D32BD1EEA}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "CryptoHelper.Tests", "test\CryptoHelper.Tests\CryptoHelper.Tests.xproj", "{F4D8F18C-6809-4CE4-BBBA-1801B2710987}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CryptoHelper.Tests", "test\CryptoHelper.Tests\CryptoHelper.Tests.csproj", "{F4D8F18C-6809-4CE4-BBBA-1801B2710987}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# CryptoHelper
:key: Standalone password hasher for ASP.NET Core using a PBKDF2 implementation.
:key: Standalone password hasher for ASP.NET Core using a PBKDF2 implementation.

<hr>

Expand All @@ -8,7 +8,7 @@
| [![Build status](https://ci.appveyor.com/api/projects/status/hai0kndijmx6xb9d?svg=true)](https://ci.appveyor.com/project/henkmollema/cryptohelper) | [![Build Status](https://travis-ci.org/henkmollema/CryptoHelper.svg)](https://travis-ci.org/henkmollema/CryptoHelper) | [![Build Status](https://travis-ci.org/henkmollema/CryptoHelper.svg)](https://travis-ci.org/henkmollema/CryptoHelper) |

--
This utility provides a standalone password hasher for ASP.NET Core without a dependency on ASP.NET Identity. The passwords are hashed using the new [Data Protection](https://github.com/aspnet/DataProtection) stack.
This utility provides a standalone password hasher for ASP.NET Core without a dependency on ASP.NET Identity. The passwords are hashed using the new [Data Protection](https://github.com/aspnet/DataProtection) stack.

<hr>

Expand All @@ -18,7 +18,7 @@ This utility provides a standalone password hasher for ASP.NET Core without a de
Add this to your `project.json`:
```json
"dependencies": {
"CryptoHelper": "2.0.0"
"CryptoHelper": "2.1.1"
}
```

Expand Down
5 changes: 3 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
init:
- git config --global core.autocrlf true
build_script:
- build.cmd --quiet verify
- ps: .\build.ps1
clone_depth: 1
test: off
deploy: off
environment:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
os: Visual Studio 2017
16 changes: 8 additions & 8 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ErrorActionPreference = "Stop"

function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $retries)
function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $retries)
{
while($true)
{
Expand All @@ -19,7 +19,7 @@ function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $ret
Start-Sleep -Seconds 10

}
else
else
{
$exception = $_.Exception
throw $exception
Expand All @@ -33,7 +33,7 @@ cd $PSScriptRoot
$repoFolder = $PSScriptRoot
$env:REPO_FOLDER = $repoFolder

$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/rel/1.1.0.zip"
$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/8fbf3a9151eb555cedbfe8be8df9082a64c2fecb.zip"
if ($env:KOREBUILD_ZIP)
{
$koreBuildZip=$env:KOREBUILD_ZIP
Expand All @@ -43,18 +43,18 @@ $buildFolder = ".build"
$buildFile="$buildFolder\KoreBuild.ps1"

if (!(Test-Path $buildFolder)) {
Write-Host "Downloading KoreBuild from $koreBuildZip"
Write-Host "Downloading KoreBuild from $koreBuildZip"

$tempFolder=$env:TEMP + "\KoreBuild-" + [guid]::NewGuid()
New-Item -Path "$tempFolder" -Type directory | Out-Null

$localZipFile="$tempFolder\korebuild.zip"

DownloadWithRetry -url $koreBuildZip -downloadLocation $localZipFile -retries 6

Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory($localZipFile, $tempFolder)

New-Item -Path "$buildFolder" -Type directory | Out-Null
copy-item "$tempFolder\**\build\*" $buildFolder -Recurse

Expand All @@ -64,4 +64,4 @@ if (!(Test-Path $buildFolder)) {
}
}

&"$buildFile" $args
&"$buildFile" @args
22 changes: 11 additions & 11 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $repoFolder

koreBuildZip="https://github.com/aspnet/KoreBuild/archive/rel/1.1.0.zip"
koreBuildZip="https://github.com/aspnet/KoreBuild/archive/8fbf3a9151eb555cedbfe8be8df9082a64c2fecb.zip"
if [ ! -z $KOREBUILD_ZIP ]; then
koreBuildZip=$KOREBUILD_ZIP
fi
Expand All @@ -12,12 +12,12 @@ buildFile="$buildFolder/KoreBuild.sh"

if test ! -d $buildFolder; then
echo "Downloading KoreBuild from $koreBuildZip"
tempFolder="/tmp/KoreBuild-$(uuidgen)"

tempFolder="/tmp/KoreBuild-$(uuidgen)"
mkdir $tempFolder

localZipFile="$tempFolder/korebuild.zip"

retries=6
until (wget -O $localZipFile $koreBuildZip 2>/dev/null || curl -o $localZipFile --location $koreBuildZip 2>/dev/null)
do
Expand All @@ -29,17 +29,17 @@ if test ! -d $buildFolder; then
echo "Waiting 10 seconds before retrying. Retries left: $retries"
sleep 10s
done

unzip -q -d $tempFolder $localZipFile

mkdir $buildFolder
cp -r $tempFolder/**/build/** $buildFolder

chmod +x $buildFile

# Cleanup
if test ! -d $tempFolder; then
rm -rf $tempFolder
if test -d $tempFolder; then
rm -rf $tempFolder
fi
fi

Expand Down
3 changes: 0 additions & 3 deletions global.json

This file was deleted.

19 changes: 19 additions & 0 deletions src/CryptoHelper/CryptoHelper.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>Standalone password hasher for ASP.NET Core using a PBKDF2 implementation.</Description>
<Copyright>Copyright 2017 Henk Mollema</Copyright>
<VersionPrefix>2.1.1</VersionPrefix>
<Authors>Henk Mollema</Authors>
<TargetFrameworks>net451;netstandard1.3</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>hashing;crypto;core;PBKDF2;Rfc2898DeriveBytes</PackageTags>
<PackageProjectUrl>https://github.com/henkmollema/CryptoHelper</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/henkmollema/CryptoHelper/blob/master/LICENSE</PackageLicenseUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>git://github.com/henkmollema/CryptoHelper</RepositoryUrl>
<NetStandardImplicitPackageVersion>1.6.1</NetStandardImplicitPackageVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="1.1.1" />
</ItemGroup>
</Project>
19 changes: 0 additions & 19 deletions src/CryptoHelper/CryptoHelper.xproj

This file was deleted.

30 changes: 0 additions & 30 deletions src/CryptoHelper/project.json

This file was deleted.

13 changes: 13 additions & 0 deletions test/CryptoHelper.Tests/CryptoHelper.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp1.1;net452</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp1.1</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\CryptoHelper\CryptoHelper.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
<PackageReference Include="xunit" Version="2.2.0" />
</ItemGroup>
</Project>
19 changes: 0 additions & 19 deletions test/CryptoHelper.Tests/CryptoHelper.Tests.xproj

This file was deleted.

23 changes: 0 additions & 23 deletions test/CryptoHelper.Tests/Properties/AssemblyInfo.cs

This file was deleted.

21 changes: 0 additions & 21 deletions test/CryptoHelper.Tests/project.json

This file was deleted.

0 comments on commit bc32f79

Please sign in to comment.