diff --git a/src/Microsoft.AspNet.Cryptography.Internal/CryptoUtil.cs b/src/Microsoft.AspNet.Cryptography.Internal/CryptoUtil.cs index 1b2932789f..14e047c0c2 100644 --- a/src/Microsoft.AspNet.Cryptography.Internal/CryptoUtil.cs +++ b/src/Microsoft.AspNet.Cryptography.Internal/CryptoUtil.cs @@ -7,7 +7,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security.Cryptography; -#if !ASPNETCORE50 +#if !DNXCORE50 using System.Runtime.ConstrainedExecution; #endif @@ -53,7 +53,7 @@ namespace Microsoft.AspNet.Cryptography } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] -#if !ASPNETCORE50 +#if !DNXCORE50 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] #endif public static bool TimeConstantBuffersAreEqual(byte* bufA, byte* bufB, uint count) diff --git a/src/Microsoft.AspNet.Cryptography.Internal/SafeHandles/SafeHandleZeroOrMinusOneIsInvalid.cs b/src/Microsoft.AspNet.Cryptography.Internal/SafeHandles/SafeHandleZeroOrMinusOneIsInvalid.cs index fe725ea4d2..2f7ff5cee7 100644 --- a/src/Microsoft.AspNet.Cryptography.Internal/SafeHandles/SafeHandleZeroOrMinusOneIsInvalid.cs +++ b/src/Microsoft.AspNet.Cryptography.Internal/SafeHandles/SafeHandleZeroOrMinusOneIsInvalid.cs @@ -4,7 +4,7 @@ using System; using System.Runtime.InteropServices; -#if ASPNETCORE50 +#if DNXCORE50 namespace Microsoft.Win32.SafeHandles { internal abstract class SafeHandleZeroOrMinusOneIsInvalid : SafeHandle diff --git a/src/Microsoft.AspNet.Cryptography.Internal/SafeHandles/SafeLibraryHandle.cs b/src/Microsoft.AspNet.Cryptography.Internal/SafeHandles/SafeLibraryHandle.cs index 9c53390775..f13924ebb1 100644 --- a/src/Microsoft.AspNet.Cryptography.Internal/SafeHandles/SafeLibraryHandle.cs +++ b/src/Microsoft.AspNet.Cryptography.Internal/SafeHandles/SafeLibraryHandle.cs @@ -6,7 +6,7 @@ using System.Runtime.InteropServices; using System.Security; using Microsoft.Win32.SafeHandles; -#if !ASPNETCORE50 +#if !DNXCORE50 using System.Runtime.ConstrainedExecution; #endif @@ -127,12 +127,12 @@ namespace Microsoft.AspNet.Cryptography.SafeHandles return UnsafeNativeMethods.FreeLibrary(handle); } -#if !ASPNETCORE50 +#if !DNXCORE50 [SuppressUnmanagedCodeSecurity] #endif private static class UnsafeNativeMethods { -#if ASPNETCORE50 +#if DNXCORE50 private const string CORE_LIBRARY_LOADER_LIB = "api-ms-win-core-libraryloader-l1-1-0.dll"; private const string CORE_LOCALIZATION_LIB = "api-ms-win-core-localization-l1-2-0.dll"; #else @@ -140,7 +140,7 @@ namespace Microsoft.AspNet.Cryptography.SafeHandles #endif // http://msdn.microsoft.com/en-us/library/windows/desktop/ms679351(v=vs.85).aspx -#if ASPNETCORE50 +#if DNXCORE50 [DllImport(CORE_LOCALIZATION_LIB, EntryPoint = "FormatMessageW", CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Unicode, SetLastError = true)] #else [DllImport(KERNEL32_LIB, EntryPoint = "FormatMessageW", CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Unicode, SetLastError = true)] @@ -157,7 +157,7 @@ namespace Microsoft.AspNet.Cryptography.SafeHandles // http://msdn.microsoft.com/en-us/library/ms683152(v=vs.85).aspx [return: MarshalAs(UnmanagedType.Bool)] -#if ASPNETCORE50 +#if DNXCORE50 [DllImport(CORE_LIBRARY_LOADER_LIB, CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Unicode)] #else [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] @@ -167,7 +167,7 @@ namespace Microsoft.AspNet.Cryptography.SafeHandles // http://msdn.microsoft.com/en-us/library/ms683200(v=vs.85).aspx [return: MarshalAs(UnmanagedType.Bool)] -#if ASPNETCORE50 +#if DNXCORE50 [DllImport(CORE_LIBRARY_LOADER_LIB, EntryPoint = "GetModuleHandleExW", CallingConvention = CallingConvention.Winapi, SetLastError = true)] #else [DllImport(KERNEL32_LIB, EntryPoint = "GetModuleHandleExW", CallingConvention = CallingConvention.Winapi, SetLastError = true)] @@ -178,7 +178,7 @@ namespace Microsoft.AspNet.Cryptography.SafeHandles [Out] out IntPtr phModule); // http://msdn.microsoft.com/en-us/library/ms683212(v=vs.85).aspx -#if ASPNETCORE50 +#if DNXCORE50 [DllImport(CORE_LIBRARY_LOADER_LIB, CallingConvention = CallingConvention.Winapi, SetLastError = true)] #else [DllImport(KERNEL32_LIB, CallingConvention = CallingConvention.Winapi, SetLastError = true)] @@ -188,7 +188,7 @@ namespace Microsoft.AspNet.Cryptography.SafeHandles [In, MarshalAs(UnmanagedType.LPStr)] string lpProcName); // http://msdn.microsoft.com/en-us/library/windows/desktop/ms684179(v=vs.85).aspx -#if ASPNETCORE50 +#if DNXCORE50 [DllImport(CORE_LIBRARY_LOADER_LIB, EntryPoint = "LoadLibraryExW", CallingConvention = CallingConvention.Winapi, SetLastError = true)] #else [DllImport(KERNEL32_LIB, EntryPoint = "LoadLibraryExW", CallingConvention = CallingConvention.Winapi, SetLastError = true)] diff --git a/src/Microsoft.AspNet.Cryptography.Internal/SafeHandles/SafeNCryptKeyHandle.cs b/src/Microsoft.AspNet.Cryptography.Internal/SafeHandles/SafeNCryptKeyHandle.cs index a2a325d560..8898809059 100644 --- a/src/Microsoft.AspNet.Cryptography.Internal/SafeHandles/SafeNCryptKeyHandle.cs +++ b/src/Microsoft.AspNet.Cryptography.Internal/SafeHandles/SafeNCryptKeyHandle.cs @@ -5,7 +5,7 @@ using System; using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; -#if ASPNETCORE50 +#if DNXCORE50 namespace Microsoft.AspNet.Cryptography.SafeHandles { /// diff --git a/src/Microsoft.AspNet.Cryptography.Internal/SafeHandles/SecureLocalAllocHandle.cs b/src/Microsoft.AspNet.Cryptography.Internal/SafeHandles/SecureLocalAllocHandle.cs index a4ce4b3dcc..67d2072815 100644 --- a/src/Microsoft.AspNet.Cryptography.Internal/SafeHandles/SecureLocalAllocHandle.cs +++ b/src/Microsoft.AspNet.Cryptography.Internal/SafeHandles/SecureLocalAllocHandle.cs @@ -6,7 +6,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security; -#if !ASPNETCORE50 +#if !DNXCORE50 using System.Runtime.ConstrainedExecution; #endif @@ -43,7 +43,7 @@ namespace Microsoft.AspNet.Cryptography.SafeHandles return newHandle; } -#if !ASPNETCORE50 +#if !DNXCORE50 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] #endif private void AllocateImpl(IntPtr cb) diff --git a/src/Microsoft.AspNet.Cryptography.Internal/UnsafeBufferUtil.cs b/src/Microsoft.AspNet.Cryptography.Internal/UnsafeBufferUtil.cs index 7bb265b4ec..2949371fb9 100644 --- a/src/Microsoft.AspNet.Cryptography.Internal/UnsafeBufferUtil.cs +++ b/src/Microsoft.AspNet.Cryptography.Internal/UnsafeBufferUtil.cs @@ -6,7 +6,7 @@ using System.Runtime.CompilerServices; using System.Threading; using Microsoft.AspNet.Cryptography.SafeHandles; -#if !ASPNETCORE50 +#if !DNXCORE50 using System.Runtime.ConstrainedExecution; #endif @@ -17,7 +17,7 @@ namespace Microsoft.AspNet.Cryptography private static readonly byte[] _emptyArray = new byte[0]; [MethodImpl(MethodImplOptions.AggressiveInlining)] -#if !ASPNETCORE50 +#if !DNXCORE50 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] #endif public static void BlockCopy(void* from, void* to, int byteCount) @@ -26,7 +26,7 @@ namespace Microsoft.AspNet.Cryptography } [MethodImpl(MethodImplOptions.AggressiveInlining)] -#if !ASPNETCORE50 +#if !DNXCORE50 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] #endif public static void BlockCopy(void* from, void* to, uint byteCount) @@ -37,7 +37,7 @@ namespace Microsoft.AspNet.Cryptography } } -#if !ASPNETCORE50 +#if !DNXCORE50 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] #endif public static void BlockCopy(LocalAllocHandle from, void* to, uint byteCount) @@ -57,7 +57,7 @@ namespace Microsoft.AspNet.Cryptography } } -#if !ASPNETCORE50 +#if !DNXCORE50 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] #endif public static void BlockCopy(byte* from, LocalAllocHandle to, uint byteCount) @@ -77,7 +77,7 @@ namespace Microsoft.AspNet.Cryptography } } -#if !ASPNETCORE50 +#if !DNXCORE50 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] #endif public static void BlockCopy(LocalAllocHandle from, LocalAllocHandle to, IntPtr length) @@ -117,7 +117,7 @@ namespace Microsoft.AspNet.Cryptography [MethodImpl(MethodImplOptions.AggressiveInlining)] private static void BlockCopyImpl(byte* from, byte* to, uint byteCount) { -#if ASPNETCORE50 +#if DNXCORE50 Buffer.MemoryCopy(from, to, (ulong)byteCount, (ulong)byteCount); #else while (byteCount-- != 0) { @@ -129,7 +129,7 @@ namespace Microsoft.AspNet.Cryptography [MethodImpl(MethodImplOptions.AggressiveInlining)] private static void BlockCopyImpl(byte* from, byte* to, ulong byteCount) { -#if ASPNETCORE50 +#if DNXCORE50 Buffer.MemoryCopy(from, to, byteCount, byteCount); #else while (byteCount-- != 0) { @@ -142,7 +142,7 @@ namespace Microsoft.AspNet.Cryptography /// Securely clears a memory buffer. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] -#if !ASPNETCORE50 +#if !DNXCORE50 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] #endif public static void SecureZeroMemory(byte* buffer, int byteCount) @@ -154,7 +154,7 @@ namespace Microsoft.AspNet.Cryptography /// Securely clears a memory buffer. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] -#if !ASPNETCORE50 +#if !DNXCORE50 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] #endif public static void SecureZeroMemory(byte* buffer, uint byteCount) @@ -175,7 +175,7 @@ namespace Microsoft.AspNet.Cryptography /// Securely clears a memory buffer. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] -#if !ASPNETCORE50 +#if !DNXCORE50 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] #endif public static void SecureZeroMemory(byte* buffer, ulong byteCount) @@ -195,7 +195,7 @@ namespace Microsoft.AspNet.Cryptography /// /// Securely clears a memory buffer. /// -#if !ASPNETCORE50 +#if !DNXCORE50 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] #endif public static void SecureZeroMemory(byte* buffer, IntPtr length) diff --git a/src/Microsoft.AspNet.Cryptography.Internal/UnsafeNativeMethods.cs b/src/Microsoft.AspNet.Cryptography.Internal/UnsafeNativeMethods.cs index a7bfe972e3..07769f8dd4 100644 --- a/src/Microsoft.AspNet.Cryptography.Internal/UnsafeNativeMethods.cs +++ b/src/Microsoft.AspNet.Cryptography.Internal/UnsafeNativeMethods.cs @@ -12,13 +12,13 @@ using Microsoft.AspNet.Cryptography.Cng; using Microsoft.AspNet.Cryptography.SafeHandles; using Microsoft.Win32.SafeHandles; -#if !ASPNETCORE50 +#if !DNXCORE50 using System.Runtime.ConstrainedExecution; #endif namespace Microsoft.AspNet.Cryptography { -#if !ASPNETCORE50 +#if !DNXCORE50 [SuppressUnmanagedCodeSecurity] #endif internal unsafe static class UnsafeNativeMethods @@ -87,7 +87,7 @@ namespace Microsoft.AspNet.Cryptography [In] uint dwFlags); [DllImport(BCRYPT_LIB, CallingConvention = CallingConvention.Winapi)] -#if !ASPNETCORE50 +#if !DNXCORE50 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] #endif // http://msdn.microsoft.com/en-us/library/windows/desktop/aa375399(v=vs.85).aspx @@ -95,7 +95,7 @@ namespace Microsoft.AspNet.Cryptography [In] IntPtr hHash); [DllImport(BCRYPT_LIB, CallingConvention = CallingConvention.Winapi)] -#if !ASPNETCORE50 +#if !DNXCORE50 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] #endif // http://msdn.microsoft.com/en-us/library/windows/desktop/aa375404(v=vs.85).aspx @@ -202,7 +202,7 @@ namespace Microsoft.AspNet.Cryptography */ [DllImport(CRYPT32_LIB, CallingConvention = CallingConvention.Winapi)] -#if !ASPNETCORE50 +#if !DNXCORE50 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] #endif // http://msdn.microsoft.com/en-us/library/windows/desktop/aa376045(v=vs.85).aspx @@ -210,7 +210,7 @@ namespace Microsoft.AspNet.Cryptography [In] IntPtr pCertContext); [DllImport(CRYPT32_LIB, CallingConvention = CallingConvention.Winapi)] -#if !ASPNETCORE50 +#if !DNXCORE50 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] #endif // http://msdn.microsoft.com/en-us/library/windows/desktop/aa376075(v=vs.85).aspx @@ -227,7 +227,7 @@ namespace Microsoft.AspNet.Cryptography [DllImport(CRYPT32_LIB, CallingConvention = CallingConvention.Winapi, SetLastError = true)] // http://msdn.microsoft.com/en-us/library/windows/desktop/aa379885(v=vs.85).aspx -#if !ASPNETCORE50 +#if !DNXCORE50 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] #endif internal static extern bool CryptAcquireCertificatePrivateKey( @@ -286,7 +286,7 @@ namespace Microsoft.AspNet.Cryptography */ [DllImport(NCRYPT_LIB, CallingConvention = CallingConvention.Winapi)] -#if !ASPNETCORE50 +#if !DNXCORE50 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] #endif // http://msdn.microsoft.com/en-us/library/windows/desktop/hh706799(v=vs.85).aspx diff --git a/src/Microsoft.AspNet.Cryptography.Internal/project.json b/src/Microsoft.AspNet.Cryptography.Internal/project.json index da2f2d3a77..846a48ecec 100644 --- a/src/Microsoft.AspNet.Cryptography.Internal/project.json +++ b/src/Microsoft.AspNet.Cryptography.Internal/project.json @@ -1,12 +1,12 @@ -{ +{ "version": "1.0.0-*", "description": "Infrastructure for ASP.NET 5 cryptographic packages. Developers should not reference this package.", "dependencies": { }, "frameworks": { "net451": { }, - "aspnet50": { }, - "aspnetcore50": { + "dnx451": { }, + "dnxcore50": { "dependencies": { "System.Diagnostics.Debug": "4.0.10-beta-*", "System.Globalization": "4.0.10-beta-*", diff --git a/src/Microsoft.AspNet.Cryptography.KeyDerivation/project.json b/src/Microsoft.AspNet.Cryptography.KeyDerivation/project.json index 6582d52581..dfcd7bc5d1 100644 --- a/src/Microsoft.AspNet.Cryptography.KeyDerivation/project.json +++ b/src/Microsoft.AspNet.Cryptography.KeyDerivation/project.json @@ -1,4 +1,4 @@ -{ +{ "version": "1.0.0-*", "description": "ASP.NET 5 utilities for key derivation.", "dependencies": { @@ -6,8 +6,8 @@ }, "frameworks": { "net451": { }, - "aspnet50": { }, - "aspnetcore50": { + "dnx451": { }, + "dnxcore50": { "dependencies": { "System.Runtime.Extensions": "4.0.10-beta-*", "System.Security.Cryptography.Hashing.Algorithms": "4.0.0-beta-*" diff --git a/src/Microsoft.AspNet.DataProtection.Azure/project.json b/src/Microsoft.AspNet.DataProtection.Azure/project.json index 79272abe27..7962450b74 100644 --- a/src/Microsoft.AspNet.DataProtection.Azure/project.json +++ b/src/Microsoft.AspNet.DataProtection.Azure/project.json @@ -1,4 +1,4 @@ -{ +{ "version": "1.0.0-*", "description": "ASP.NET 5 blob storage repository for DataProtection.", "dependencies": { @@ -7,7 +7,7 @@ }, "frameworks": { "net451": {}, - "aspnet50": {} + "dnx451": {} }, "compilationOptions": { "warningsAsErrors": true diff --git a/src/Microsoft.AspNet.DataProtection/Cng/DpapiSecretSerializerHelper.cs b/src/Microsoft.AspNet.DataProtection/Cng/DpapiSecretSerializerHelper.cs index 44c0a8b692..13b583c4bf 100644 --- a/src/Microsoft.AspNet.DataProtection/Cng/DpapiSecretSerializerHelper.cs +++ b/src/Microsoft.AspNet.DataProtection/Cng/DpapiSecretSerializerHelper.cs @@ -62,7 +62,7 @@ namespace Microsoft.AspNet.DataProtection.Cng }; DATA_BLOB dataOut = default(DATA_BLOB); -#if !ASPNETCORE50 +#if !DNXCORE50 RuntimeHelpers.PrepareConstrainedRegions(); #endif try @@ -152,7 +152,7 @@ namespace Microsoft.AspNet.DataProtection.Cng fixed (byte* pbRetVal = retVal) { bool handleAcquired = false; -#if !ASPNETCORE50 +#if !DNXCORE50 RuntimeHelpers.PrepareConstrainedRegions(); #endif try @@ -202,7 +202,7 @@ namespace Microsoft.AspNet.DataProtection.Cng }; DATA_BLOB dataOut = default(DATA_BLOB); -#if !ASPNETCORE50 +#if !DNXCORE50 RuntimeHelpers.PrepareConstrainedRegions(); #endif try @@ -275,7 +275,7 @@ namespace Microsoft.AspNet.DataProtection.Cng using (unencryptedPayloadHandle) { bool handleAcquired = false; -#if !ASPNETCORE50 +#if !DNXCORE50 RuntimeHelpers.PrepareConstrainedRegions(); #endif try diff --git a/src/Microsoft.AspNet.DataProtection/DataProtectionServiceCollectionExtensions.cs b/src/Microsoft.AspNet.DataProtection/DataProtectionServiceCollectionExtensions.cs index 384e4bbc2e..14832f8d5d 100644 --- a/src/Microsoft.AspNet.DataProtection/DataProtectionServiceCollectionExtensions.cs +++ b/src/Microsoft.AspNet.DataProtection/DataProtectionServiceCollectionExtensions.cs @@ -124,7 +124,7 @@ namespace Microsoft.Framework.DependencyInjection private static DirectoryInfo TryGetLocalAppDataKeysFolderForUser() { -#if !ASPNETCORE50 +#if !DNXCORE50 // Environment.GetFolderPath returns null if the user profile isn't loaded. string folderPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); if (!String.IsNullOrEmpty(folderPath)) diff --git a/src/Microsoft.AspNet.DataProtection/Dpapi/DataProtectionScope.cs b/src/Microsoft.AspNet.DataProtection/Dpapi/DataProtectionScope.cs index 7cf629b023..e55496e2af 100644 --- a/src/Microsoft.AspNet.DataProtection/Dpapi/DataProtectionScope.cs +++ b/src/Microsoft.AspNet.DataProtection/Dpapi/DataProtectionScope.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // We only define this type in core CLR since desktop CLR already contains it. -#if ASPNETCORE50 +#if DNXCORE50 using System; namespace System.Security.Cryptography diff --git a/src/Microsoft.AspNet.DataProtection/Dpapi/ProtectedDataImpl.cs b/src/Microsoft.AspNet.DataProtection/Dpapi/ProtectedDataImpl.cs index 709cda218a..74929a0d4d 100644 --- a/src/Microsoft.AspNet.DataProtection/Dpapi/ProtectedDataImpl.cs +++ b/src/Microsoft.AspNet.DataProtection/Dpapi/ProtectedDataImpl.cs @@ -11,7 +11,7 @@ namespace Microsoft.AspNet.DataProtection.Dpapi { public byte[] Protect(byte[] userData, byte[] optionalEntropy, DataProtectionScope scope) { -#if ASPNETCORE50 +#if DNXCORE50 fixed (byte* pbUserData = userData) { fixed (byte* pbOptionalEntropy = optionalEntropy) @@ -31,7 +31,7 @@ namespace Microsoft.AspNet.DataProtection.Dpapi public byte[] Unprotect(byte[] encryptedData, byte[] optionalEntropy, DataProtectionScope scope) { -#if ASPNETCORE50 +#if DNXCORE50 Secret blob; fixed (byte* pbEncryptedData = encryptedData) { diff --git a/src/Microsoft.AspNet.DataProtection/Managed/ManagedAuthenticatedEncryptor.cs b/src/Microsoft.AspNet.DataProtection/Managed/ManagedAuthenticatedEncryptor.cs index c39738341f..687f5002a6 100644 --- a/src/Microsoft.AspNet.DataProtection/Managed/ManagedAuthenticatedEncryptor.cs +++ b/src/Microsoft.AspNet.DataProtection/Managed/ManagedAuthenticatedEncryptor.cs @@ -357,7 +357,7 @@ namespace Microsoft.AspNet.DataProtection.Managed using (var validationAlgorithm = CreateValidationAlgorithm(validationSubkey)) { -#if !ASPNETCORE50 +#if !DNXCORE50 // As an optimization, avoid duplicating the underlying buffer if we're on desktop CLR. byte[] underlyingBuffer = outputStream.GetBuffer(); #else diff --git a/src/Microsoft.AspNet.DataProtection/XmlEncryption/DpapiNGXmlEncryptor.cs b/src/Microsoft.AspNet.DataProtection/XmlEncryption/DpapiNGXmlEncryptor.cs index 9c2f856f4f..498df42350 100644 --- a/src/Microsoft.AspNet.DataProtection/XmlEncryption/DpapiNGXmlEncryptor.cs +++ b/src/Microsoft.AspNet.DataProtection/XmlEncryption/DpapiNGXmlEncryptor.cs @@ -51,7 +51,7 @@ namespace Microsoft.AspNet.DataProtection.XmlEncryption using (var memoryStream = new MemoryStream()) { plaintextElement.Save(memoryStream); -#if !ASPNETCORE50 +#if !DNXCORE50 // If we're on full desktop CLR, utilize the underlying buffer directly as an optimization. byte[] underlyingBuffer = memoryStream.GetBuffer(); secret = new Secret(new ArraySegment(underlyingBuffer, 0, checked((int)memoryStream.Length))); diff --git a/src/Microsoft.AspNet.DataProtection/XmlEncryption/DpapiXmlEncryptor.cs b/src/Microsoft.AspNet.DataProtection/XmlEncryption/DpapiXmlEncryptor.cs index 22916e2d24..121384d7bc 100644 --- a/src/Microsoft.AspNet.DataProtection/XmlEncryption/DpapiXmlEncryptor.cs +++ b/src/Microsoft.AspNet.DataProtection/XmlEncryption/DpapiXmlEncryptor.cs @@ -36,7 +36,7 @@ namespace Microsoft.AspNet.DataProtection.XmlEncryption { plaintextElement.Save(memoryStream); -#if !ASPNETCORE50 +#if !DNXCORE50 // If we're on full desktop CLR, utilize the underlying buffer directly as an optimization. byte[] underlyingBuffer = memoryStream.GetBuffer(); secret = new Secret(new ArraySegment(underlyingBuffer, 0, checked((int)memoryStream.Length))); diff --git a/src/Microsoft.AspNet.DataProtection/project.json b/src/Microsoft.AspNet.DataProtection/project.json index a0e70f0a0a..6162dc84ac 100644 --- a/src/Microsoft.AspNet.DataProtection/project.json +++ b/src/Microsoft.AspNet.DataProtection/project.json @@ -1,4 +1,4 @@ -{ +{ "version": "1.0.0-*", "description": "ASP.NET 5 logic to protect and unprotect data, similar to DPAPI.", "dependencies": { @@ -14,14 +14,14 @@ "System.Xml.Linq": "" } }, - "aspnet50": { + "dnx451": { "frameworkAssemblies": { "System.Security": "", "System.Xml": "", "System.Xml.Linq": "" } }, - "aspnetcore50": { + "dnxcore50": { "dependencies": { "Microsoft.Win32.Registry": "4.0.0-beta-*", "System.IO": "4.0.10-beta-*", diff --git a/test/Microsoft.AspNet.Cryptography.Internal.Test/project.json b/test/Microsoft.AspNet.Cryptography.Internal.Test/project.json index 8f1a47255e..eb24602f48 100644 --- a/test/Microsoft.AspNet.Cryptography.Internal.Test/project.json +++ b/test/Microsoft.AspNet.Cryptography.Internal.Test/project.json @@ -1,11 +1,11 @@ -{ +{ "dependencies": { "Microsoft.AspNet.Cryptography.Internal": "1.0.0-*", "Microsoft.AspNet.Testing": "1.0.0-*", "xunit.runner.kre": "1.0.0-*" }, "frameworks": { - "aspnet50": { } + "dnx451": { } }, "commands": { "test": "xunit.runner.kre" diff --git a/test/Microsoft.AspNet.Cryptography.KeyDerivation.Test/project.json b/test/Microsoft.AspNet.Cryptography.KeyDerivation.Test/project.json index ebed517c17..d94820a8be 100644 --- a/test/Microsoft.AspNet.Cryptography.KeyDerivation.Test/project.json +++ b/test/Microsoft.AspNet.Cryptography.KeyDerivation.Test/project.json @@ -1,4 +1,4 @@ -{ +{ "dependencies": { "Microsoft.AspNet.Cryptography.Internal": "1.0.0-*", "Microsoft.AspNet.Cryptography.KeyDerivation": "1.0.0-*", @@ -7,7 +7,7 @@ "xunit.runner.kre": "1.0.0-*" }, "frameworks": { - "aspnet50": { } + "dnx451": { } }, "commands": { "test": "xunit.runner.kre" diff --git a/test/Microsoft.AspNet.DataProtection.Test/project.json b/test/Microsoft.AspNet.DataProtection.Test/project.json index cc8993067d..e8be8937c0 100644 --- a/test/Microsoft.AspNet.DataProtection.Test/project.json +++ b/test/Microsoft.AspNet.DataProtection.Test/project.json @@ -1,4 +1,4 @@ -{ +{ "dependencies": { "Microsoft.AspNet.DataProtection": "1.0.0-*", "Microsoft.AspNet.Testing": "1.0.0-*", @@ -6,7 +6,7 @@ "xunit.runner.kre": "1.0.0-*" }, "frameworks": { - "aspnet50": { } + "dnx451": { } }, "commands": { "test": "xunit.runner.kre"