Skip to content

Commit

Permalink
Merge pull request #8 from jbtule/msbuild15
Browse files Browse the repository at this point in the history
Msbuild15
  • Loading branch information
jbtule authored Jul 30, 2017
2 parents 84d2326 + 7074651 commit 028043b
Show file tree
Hide file tree
Showing 55 changed files with 368 additions and 985 deletions.
23 changes: 23 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
image: Visual Studio 2017

install:
- cmd: git submodule update --init --recursive

build: off

build_script:
- cmd: cd Keyczar
- cmd: msbuild /t:restore
- cmd: msbuild
- cmd: .\packages\nunit.runners\2.6.1\tools\nunit-console.exe -noxml -nodots -labels -stoponerror KeyczarTest\bin\Debug\net40\KeyczarTest.dll -include=Create

test:
categories:
except:
- Performance
- Create

artifacts:
- path: '**\bin\*\*.nupkg'

skip_branch_with_pr: true
25 changes: 17 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,26 @@
# see travis-ci.org for details

language: csharp
solution: Keyczar/Keyczar.sln
matrix:
include:
- os: linux
dist: trusty
sudo: required
- os: osx

env:
- EnableNuGetPackageRestore=true
solution: Keyczar/Keyczar.sln

mono:
- latest
- 3.12.0
- 3.10.0
- beta

install:
- cd Keyczar/
- msbuild /t:restore

script:
- cd Keyczar/
- xbuild
- msbuild
- .ci/RunTests.sh

branches:
only:
- master
6 changes: 2 additions & 4 deletions Keyczar/.ci/RunTests.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
#!/bin/sh -x

mono --runtime=v4.0 .nuget/NuGet.exe install NUnit.Runners -Version 2.6.1 -o packages

runTest(){
mono --runtime=v4.0 packages/NUnit.Runners.2.6.1/tools/nunit-console.exe -noxml -nodots -labels -stoponerror $@
mono --runtime=v4.0 packages/nunit.runners/2.6.1/tools/nunit-console.exe -noxml -nodots -labels $@
if [ $? -ne 0 ]
then
exit 1
fi
}

runTest KeyczarTest/bin/Debug/KeyczarTest.dll -exclude=Performance
runTest KeyczarTest/bin/Debug/net40/KeyczarTest.dll -exclude=Performance

exit $?
Binary file removed Keyczar/.nuget/Microsoft.Build.dll
Binary file not shown.
1 change: 0 additions & 1 deletion Keyczar/.nuget/Microsoft.Build.txt

This file was deleted.

6 changes: 0 additions & 6 deletions Keyczar/.nuget/NuGet.Config

This file was deleted.

Binary file removed Keyczar/.nuget/NuGet.exe
Binary file not shown.
143 changes: 0 additions & 143 deletions Keyczar/.nuget/NuGet.targets

This file was deleted.

5 changes: 0 additions & 5 deletions Keyczar/.nuget/packages.config

This file was deleted.

71 changes: 15 additions & 56 deletions Keyczar/Keyczar.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,75 +3,34 @@ Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Keyczar", "Keyczar\Keyczar.csproj", "{20FCD1CA-6F4D-424F-AD9C-A20A622BCA14}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{386EA88A-2149-473B-AF48-05672E301AE0}"
ProjectSection(SolutionItems) = preProject
.nuget\NuGet.Config = .nuget\NuGet.Config
.nuget\NuGet.exe = .nuget\NuGet.exe
.nuget\NuGet.targets = .nuget\NuGet.targets
.nuget\packages.config = .nuget\packages.config
EndProjectSection
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeyczarTest", "KeyczarTest\KeyczarTest.csproj", "{04AF71F6-BC6C-438F-9DB2-29E15FDDB77C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeyczarTest", "KeyczarTest\KeyczarTest.csproj", "{FCDC85F7-BC0C-4F95-8DF2-3C2F8FAA8FE7}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeyczarTool.Minified", "KeyczarTool.Minified\KeyczarTool.Minified.csproj", "{CD70F4E2-DA86-48D9-9BBC-5C782437474D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeyczarTool", "KeyczarTool\KeyczarTool.csproj", "{27C1284A-EF74-418E-81AC-0C6B0880B559}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeyczarTool.Minified", "KeyczarTool.Minified\KeyczarTool.Minified.csproj", "{14765EB7-C343-46BC-8653-4F4D6AED7792}"
ProjectSection(ProjectDependencies) = postProject
{27C1284A-EF74-418E-81AC-0C6B0880B559} = {27C1284A-EF74-418E-81AC-0C6B0880B559}
EndProjectSection
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeyczarTool", "KeyczarTool\KeyczarTool.csproj", "{05D8AB68-51EC-4EE1-898B-FFE7D7B7F474}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{20FCD1CA-6F4D-424F-AD9C-A20A622BCA14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{20FCD1CA-6F4D-424F-AD9C-A20A622BCA14}.Debug|Any CPU.Build.0 = Debug|Any CPU
{20FCD1CA-6F4D-424F-AD9C-A20A622BCA14}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{20FCD1CA-6F4D-424F-AD9C-A20A622BCA14}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{20FCD1CA-6F4D-424F-AD9C-A20A622BCA14}.Debug|x86.ActiveCfg = Debug|Any CPU
{20FCD1CA-6F4D-424F-AD9C-A20A622BCA14}.Release|Any CPU.ActiveCfg = Release|Any CPU
{20FCD1CA-6F4D-424F-AD9C-A20A622BCA14}.Release|Any CPU.Build.0 = Release|Any CPU
{20FCD1CA-6F4D-424F-AD9C-A20A622BCA14}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{20FCD1CA-6F4D-424F-AD9C-A20A622BCA14}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{20FCD1CA-6F4D-424F-AD9C-A20A622BCA14}.Release|x86.ActiveCfg = Release|Any CPU
{FCDC85F7-BC0C-4F95-8DF2-3C2F8FAA8FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FCDC85F7-BC0C-4F95-8DF2-3C2F8FAA8FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FCDC85F7-BC0C-4F95-8DF2-3C2F8FAA8FE7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{FCDC85F7-BC0C-4F95-8DF2-3C2F8FAA8FE7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{FCDC85F7-BC0C-4F95-8DF2-3C2F8FAA8FE7}.Debug|x86.ActiveCfg = Debug|Any CPU
{FCDC85F7-BC0C-4F95-8DF2-3C2F8FAA8FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FCDC85F7-BC0C-4F95-8DF2-3C2F8FAA8FE7}.Release|Any CPU.Build.0 = Release|Any CPU
{FCDC85F7-BC0C-4F95-8DF2-3C2F8FAA8FE7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{FCDC85F7-BC0C-4F95-8DF2-3C2F8FAA8FE7}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{FCDC85F7-BC0C-4F95-8DF2-3C2F8FAA8FE7}.Release|x86.ActiveCfg = Release|Any CPU
{27C1284A-EF74-418E-81AC-0C6B0880B559}.Debug|Any CPU.ActiveCfg = Debug|x86
{27C1284A-EF74-418E-81AC-0C6B0880B559}.Debug|Any CPU.Build.0 = Debug|x86
{27C1284A-EF74-418E-81AC-0C6B0880B559}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{27C1284A-EF74-418E-81AC-0C6B0880B559}.Debug|Mixed Platforms.Build.0 = Debug|x86
{27C1284A-EF74-418E-81AC-0C6B0880B559}.Debug|x86.ActiveCfg = Debug|x86
{27C1284A-EF74-418E-81AC-0C6B0880B559}.Debug|x86.Build.0 = Debug|x86
{27C1284A-EF74-418E-81AC-0C6B0880B559}.Release|Any CPU.ActiveCfg = Release|x86
{27C1284A-EF74-418E-81AC-0C6B0880B559}.Release|Any CPU.Build.0 = Release|x86
{27C1284A-EF74-418E-81AC-0C6B0880B559}.Release|Mixed Platforms.ActiveCfg = Release|x86
{27C1284A-EF74-418E-81AC-0C6B0880B559}.Release|Mixed Platforms.Build.0 = Release|x86
{27C1284A-EF74-418E-81AC-0C6B0880B559}.Release|x86.ActiveCfg = Release|x86
{27C1284A-EF74-418E-81AC-0C6B0880B559}.Release|x86.Build.0 = Release|x86
{14765EB7-C343-46BC-8653-4F4D6AED7792}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{14765EB7-C343-46BC-8653-4F4D6AED7792}.Debug|Any CPU.Build.0 = Debug|Any CPU
{14765EB7-C343-46BC-8653-4F4D6AED7792}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{14765EB7-C343-46BC-8653-4F4D6AED7792}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{14765EB7-C343-46BC-8653-4F4D6AED7792}.Debug|x86.ActiveCfg = Debug|Any CPU
{14765EB7-C343-46BC-8653-4F4D6AED7792}.Release|Any CPU.ActiveCfg = Release|Any CPU
{14765EB7-C343-46BC-8653-4F4D6AED7792}.Release|Any CPU.Build.0 = Release|Any CPU
{14765EB7-C343-46BC-8653-4F4D6AED7792}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{14765EB7-C343-46BC-8653-4F4D6AED7792}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{14765EB7-C343-46BC-8653-4F4D6AED7792}.Release|x86.ActiveCfg = Release|Any CPU
{04AF71F6-BC6C-438F-9DB2-29E15FDDB77C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{04AF71F6-BC6C-438F-9DB2-29E15FDDB77C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{04AF71F6-BC6C-438F-9DB2-29E15FDDB77C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{04AF71F6-BC6C-438F-9DB2-29E15FDDB77C}.Release|Any CPU.Build.0 = Release|Any CPU
{CD70F4E2-DA86-48D9-9BBC-5C782437474D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CD70F4E2-DA86-48D9-9BBC-5C782437474D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CD70F4E2-DA86-48D9-9BBC-5C782437474D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CD70F4E2-DA86-48D9-9BBC-5C782437474D}.Release|Any CPU.Build.0 = Release|Any CPU
{05D8AB68-51EC-4EE1-898B-FFE7D7B7F474}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{05D8AB68-51EC-4EE1-898B-FFE7D7B7F474}.Debug|Any CPU.Build.0 = Debug|Any CPU
{05D8AB68-51EC-4EE1-898B-FFE7D7B7F474}.Release|Any CPU.ActiveCfg = Release|Any CPU
{05D8AB68-51EC-4EE1-898B-FFE7D7B7F474}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
6 changes: 3 additions & 3 deletions Keyczar/Keyczar/AttachedSigner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public AttachedSigner(string keySetLocation) : this(new KeySet(keySetLocation))
/// <param name="keySet">The key set.</param>
public AttachedSigner(IKeySet keySet) : base(keySet)
{
_signer = new AttachedSignerHelper(keySet);
_signer = new AttachedSignerHelper(keySet, this);

}

Expand Down Expand Up @@ -96,10 +96,10 @@ protected class AttachedSignerHelper:Signer
/// Initializes a new instance of the <see cref="AttachedSignerHelper"/> class.
/// </summary>
/// <param name="keySet">The key set.</param>
public AttachedSignerHelper(IKeySet keySet)
public AttachedSignerHelper(IKeySet keySet,Keyczar parent)
: base(keySet)
{

Config = parent.Config;
}

/// <summary>
Expand Down
5 changes: 3 additions & 2 deletions Keyczar/Keyczar/AttachedVerifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public AttachedVerifier(IKeySet keySet) : base(keySet)
{
throw new InvalidKeySetException("This key set can not be used for verifying signatures.");
}
_verifier = new HelperAttachedVerify(keySet);
_verifier = new HelperAttachedVerify(keySet, this);
}


Expand Down Expand Up @@ -201,8 +201,9 @@ protected class HelperAttachedVerify:Verifier
/// Initializes a new instance of the <see cref="HelperAttachedVerify"/> class.
/// </summary>
/// <param name="keySet">The key set.</param>
public HelperAttachedVerify(IKeySet keySet) : base(keySet)
public HelperAttachedVerify(IKeySet keySet, Keyczar parent) : base(keySet)
{
Config = parent.Config;
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions Keyczar/Keyczar/Crypter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void Decrypt(Stream input, Stream output, long inputLength = -1)

bool ciphertextIsPreverified = false;
//in case there aren't any keys that match that hash we are going to fake verify.
using (var verifyStream = cryptKey.Maybe(m => m.GetAuthVerifyingStream(), () => new DummyStream()))
using (var verifyStream = cryptKey.Maybe(m => m.GetAuthVerifyingStream(this), () => new DummyStream()))
{
//If we verify in once pass like with AEAD verify stream will be null;
if (verifyStream != null)
Expand Down Expand Up @@ -157,7 +157,7 @@ public void Decrypt(Stream input, Stream output, long inputLength = -1)
resetStream.Reset();

input.Seek(HeaderLength, SeekOrigin.Current);
crypterStream = cryptKey.Maybe(m => m.GetDecryptingStream(wrapper), () => new DummyStream());
crypterStream = cryptKey.Maybe(m => m.GetDecryptingStream(wrapper, this), () => new DummyStream());

try
{
Expand Down
Loading

0 comments on commit 028043b

Please sign in to comment.