Skip to content

Commit

Permalink
3.19.6.0 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
JiajunW committed Jun 11, 2019
2 parents 31df256 + 01ef03d commit 6aac8e5
Show file tree
Hide file tree
Showing 2,552 changed files with 14,770 additions and 23,199 deletions.
114 changes: 57 additions & 57 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,65 +1,65 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################

[attr]wintext text eol=crlf

* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

# Default
*.* wintext

# Build Specifications
*.sln wintext
*.csproj wintext

# Sources (Managed)
*.cs wintext
*.ptfconfig wintext
*.opn wintext
*.asset wintext
*.metadata wintext
*.inf wintext
*.cdf wintext
*.vsmdi wintext
*.TestSettings wintext


# Sources (Script)
*.cmd wintext
*.bat wintext
*.sh wintext
*.vbs wintext

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

# Configuration
*.gitattributes wintext
*.gitignore wintext
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

#Binaries
*.exe binary
*.dll binary
*.obj binary
*.pdb binary
*.msi binary
*.cer binary
*.cat binary
*.sys binary
*.RDP binary
*.vhdx binary
*.vhds binary
*.avhdx binary
*.zip binary
*.ico binary
*.xlsm binary
*.rc binary
*.docx binary
*.pfx binary
*.jar binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain

#Images (Binary)
*.png binary
*.jpg binary
*.bmp binary
*.pdf binary
*.jpeg binary
# Force bash scripts to always use lf line endings
*.sh text eol=lf
2 changes: 1 addition & 1 deletion AssemblyInfo/SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
using System.Reflection;

[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyVersion("3.19.3.0")]
[assembly: AssemblyVersion("3.19.6.0")]
5 changes: 3 additions & 2 deletions AssemblyInfo/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

#define _BLDVER_H_
#define COMPANY_NAME "Microsoft"
#define BUILD_VERSION "3.19.3.0"
#define INET_VER 3,19,3,0

#define BUILD_VERSION "3.19.6.0"
#define INET_VER 3,19,6,0

#endif
3 changes: 1 addition & 2 deletions CommonScripts/RestartAndRun.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ catch
# Show prompt
Write-Host "The computer is going to restart..." -ForegroundColor Yellow
if($AutoRestart -eq $true) {
sleep 3
# Auto restart
# Restart
Restart-Computer -Force
shutdown -r -t 10 -f
}
2 changes: 1 addition & 1 deletion InstallPrerequisites/PrerequisitesConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<tool name="MMA_x64" FileName="MessageAnalyzer64.msi" AppName="Microsoft Message Analyzer" version="4.0.8108.0" url="https://download.microsoft.com/download/2/8/3/283DE38A-5164-49DB-9883-9D1CC432174D/MessageAnalyzer64.msi" arguments="/q"/>
<tool name="MMA_x86" FileName="MessageAnalyzer.msi" AppName="Microsoft Message Analyzer" version="4.0.8108.0" url="https://download.microsoft.com/download/2/8/3/283DE38A-5164-49DB-9883-9D1CC432174D/MessageAnalyzer.msi" arguments="/q"/>
<tool name="SE" FileName="SpecExplorer.msi" AppName="Spec Explorer 2010" version="3.5.3146.0" url="https://specexplorerteam.gallerycdn.vsassets.io/extensions/specexplorerteam/specexplorer2010visualstudiopowertool-5089/3.5.3146.0/1482139098514/36449/3/SpecExplorer.msi" arguments="/q"/>
<tool name="PTF" FileName="ProtocolTestFramework.msi" AppName="Microsoft Protocol Test Framework" version="1.0.6000.0" BackwardCompatible="false" url="https://github.com/Microsoft/ProtocolTestFramework/releases/download/1.0.6000.0/ProtocolTestFrameworkInstaller.msi" arguments="/q"/>
<tool name="PTF" FileName="ProtocolTestFramework.msi" AppName="Microsoft Protocol Test Framework" version="1.0.6500.0" BackwardCompatible="false" url="https://github.com/Microsoft/ProtocolTestFramework/releases/download/1.0.6500.0/ProtocolTestFrameworkInstaller.msi" arguments="/q"/>
<tool name="Wix311" FileName="Wix311.exe" AppName="WiX Toolset v3.11" version="3.11.1" url="https://github.com/wixtoolset/wix3/releases/download/wix3111rtm/wix311.exe" arguments="/q"/>
<tool name="OpenXMLSDK" FileName="OpenXMLSDK.msi" AppName="Open XML SDK 2.5" version="2.5.5631" url="https://download.microsoft.com/download/5/5/3/553C731E-9333-40FB-ADE3-E02DC9643B31/OpenXMLSDKV25.msi" arguments="/q"/>
<tool name="VS2017Community" FileName="vs_community.exe" AppName="Visual Studio Community 2017" version="15.7.27703.2047" url="https://aka.ms/vs/15/release/vs_community.exe" arguments="" />
Expand Down
103 changes: 103 additions & 0 deletions ProtoSDK/KerberosLib/Asn1Code/Spng/KerberosMICToken.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using Microsoft.Protocols.TestTools.StackSdk.Messages.Marshaling;
using Microsoft.Protocols.TestTools.StackSdk.Security.Cryptographic;
using System;
using System.Collections.Generic;
using System.Linq;

namespace Microsoft.Protocols.TestTools.StackSdk.Security.KerberosLib
{
/*
* Constants, data structures and algorithms are defined in [RFC4121](https://tools.ietf.org/html/rfc4121).
*/
public enum KerberosMICToken_TOK_ID_Values : UInt16
{
GSS_GetMIC = 0x0404,
}

[Flags]
public enum KerberosMICToken_Flags_Values : Byte
{
None = 0x0,
SentByAcceptor = 0x01,
Sealed = 0x02,
AcceptorSubkey = 0x04,
}

public struct KerberosMICTokenHeader
{
[ByteOrder(EndianType.BigEndian)]
public KerberosMICToken_TOK_ID_Values TOK_ID;

public KerberosMICToken_Flags_Values Flags;

[StaticSize(5)]
public byte[] Filler;

[ByteOrder(EndianType.BigEndian)]
public long SND_SEQ;
}

public struct KerberosMICToken
{
public KerberosMICTokenHeader Header;

public byte[] SGN_CKSUM;

public static KerberosMICToken GSS_GetMIC(KerberosMICToken_Flags_Values flags, long sequenceNumber, ChecksumType type, byte[] key, byte[] data)
{
var applicableChecksumType = new List<ChecksumType>()
{
ChecksumType.hmac_sha1_96_aes128,
ChecksumType.hmac_sha1_96_aes256
};
if (!applicableChecksumType.Any(checksumType => checksumType == type))
{
throw new InvalidOperationException("The checksum type is not applicable!");
}

var obj = new KerberosMICToken();
obj.Header.TOK_ID = KerberosMICToken_TOK_ID_Values.GSS_GetMIC;
obj.Header.Flags = flags;
obj.Header.Filler = new byte[5] { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
obj.Header.SND_SEQ = sequenceNumber;

var headerBytes = TypeMarshal.ToBytes(obj.Header);

var checksumData = data.Concat(headerBytes).ToArray();

int usage;

if (flags.HasFlag(KerberosMICToken_Flags_Values.SentByAcceptor))
{
usage = (int)TokenKeyUsage.KG_USAGE_ACCEPTOR_SIGN;
}
else
{
usage = (int)TokenKeyUsage.KG_USAGE_INITIATOR_SIGN;
}

obj.SGN_CKSUM = KerberosUtility.GetChecksum(key, checksumData, usage, type);

return obj;
}

public byte[] Encode()
{
var header = TypeMarshal.ToBytes(Header);
var result = header.Concat(SGN_CKSUM).ToArray();
return result;
}

public static KerberosMICToken Decode(byte[] data)
{
var result = new KerberosMICToken();
int offset = 0;
result.Header = TypeMarshal.ToStruct<KerberosMICTokenHeader>(data, ref offset);
result.SGN_CKSUM = data.Skip(offset).ToArray();
return result;
}
}
}
5 changes: 5 additions & 0 deletions ProtoSDK/KerberosLib/KerberosLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
<Compile Include="Asn1Code\Spng\ContextFlags.cs" />
<Compile Include="Asn1Code\Spng\InitialNegToken.cs" />
<Compile Include="Asn1Code\Spng\InitialNegToken2.cs" />
<Compile Include="Asn1Code\Spng\KerberosMICToken.cs" />
<Compile Include="Asn1Code\Spng\MechSpecInfo.cs" />
<Compile Include="Asn1Code\Spng\MechType.cs" />
<Compile Include="Asn1Code\Spng\MechTypeList.cs" />
Expand Down Expand Up @@ -190,6 +191,10 @@
<Project>{BF6AFAF0-7592-467F-AD5C-18429D854057}</Project>
<Name>CryptoLib</Name>
</ProjectReference>
<ProjectReference Include="..\Messages\Messages.csproj">
<Project>{75544419-3F4E-4308-A676-165F45C1462E}</Project>
<Name>Messages</Name>
</ProjectReference>
<ProjectReference Include="..\MS-PAC\Pac.csproj">
<Project>{AEFAF10D-D1BF-44C4-BD9F-5CFF2AFA432F}</Project>
<Name>Pac</Name>
Expand Down
20 changes: 18 additions & 2 deletions ProtoSDK/KerberosLib/KerberosUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,22 @@ public static byte[] DecodeNegotiationToken(byte[] token)
}
}

public static T DecodeNegotiationToken<T>(byte[] token) where T : class
{
var negotiationToken = new NegotiationToken();
negotiationToken.BerDecode(new Asn1DecodingBuffer(token));

var data = negotiationToken.GetData();
if (data is T)
{
return data as T;
}
else
{
return null;
}
}

public static byte[] EncodeInitialNegToken(byte[] token,
KerberosConstValue.OidPkt oidPkt)
{
Expand All @@ -969,7 +985,7 @@ public static byte[] EncodeInitialNegToken(byte[] token,

MechTypeList mechTypeList = new MechTypeList(
new MechType[]
{
{
new MechType(oidInt)
}
);
Expand Down Expand Up @@ -1018,7 +1034,7 @@ public delegate void DumpMessageEventHandler(string messageName,
string messageDescription,
DumpLevel dumpLevel,
byte[] payload);

/// <summary>
/// Occur when messages are ready for dumping
/// </summary>
Expand Down
8 changes: 6 additions & 2 deletions ProtoSDK/MS-FSCC/Fscc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@
<Project>{75544419-3F4E-4308-A676-165F45C1462E}</Project>
<Name>Messages</Name>
</ProjectReference>
<ProjectReference Include="..\MS-SMB2\Smb2.csproj">
<Project>{C7F08825-D3C9-4DDD-9BA3-06733B1ABE36}</Project>
<Name>Smb2</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\AssemblyInfo\SharedAssemblyInfo.cs">
Expand All @@ -97,10 +101,12 @@
<Compile Include="Messages\FsccFileFsSectorSizeInformationResponsePacket.cs" />
<Compile Include="Messages\FsccFsctlGetIntegrityInformationRequestPacket.cs" />
<Compile Include="Messages\FsccFsctlGetIntegrityInformationResponsePacket.cs" />
<Compile Include="Messages\FsccFsctlGetNtfsVolumeDataResponsePacket.cs" />
<Compile Include="Messages\FsccFsctlOffloadReadRequestPacket.cs" />
<Compile Include="Messages\FsccFsctlOffloadReadResponsePacket.cs" />
<Compile Include="Messages\FsccFsctlOffloadWriteRequestPacket.cs" />
<Compile Include="Messages\FsccFsctlOffloadWriteResponsePacket.cs" />
<Compile Include="Messages\FsccFsctlReadFileUsnDataResponsePacket.cs" />
<Compile Include="Messages\FsccFsctlSetIntegrityInformationRequestPacket.cs" />
<Compile Include="Messages\FsccStandardBytesPacket.cs" />
<Compile Include="Messages\FsccErrorPacket.cs" />
Expand Down Expand Up @@ -228,7 +234,6 @@
<Compile Include="Messages\FsccFsctlGetCompressionRequestPacket.cs" />
<Compile Include="Messages\FsccFsctlGetCompressionResponsePacket.cs" />
<Compile Include="Messages\FsccFsctlGetNtfsVolumeDataRequestPacket.cs" />
<Compile Include="Messages\FsccFsctlGetNtfsVolumeDataResponsePacket.cs" />
<Compile Include="Messages\FsccFsctlGetObjectIdRequestPacket.cs" />
<Compile Include="Messages\FsccFsctlGetObjectIdResponsePacket.cs" />
<Compile Include="Messages\FsccFsctlGetReparsePointRequestPacket.cs" />
Expand All @@ -254,7 +259,6 @@
<Compile Include="Messages\FsccFsctlQuerySparingInfoRequestPacket.cs" />
<Compile Include="Messages\FsccFsctlQuerySparingInfoResponsePacket.cs" />
<Compile Include="Messages\FsccFsctlReadFileUsnDataRequestPacket.cs" />
<Compile Include="Messages\FsccFsctlReadFileUsnDataResponsePacket.cs" />
<Compile Include="Messages\FsccFsctlRecallFileRequestPacket.cs" />
<Compile Include="Messages\FsccFsctlRecallFileResponsePacket.cs" />
<Compile Include="Messages\FsccFsctlSetCompressionRequestPacket.cs" />
Expand Down
Loading

0 comments on commit 6aac8e5

Please sign in to comment.