From 3be64176a12946fc6d0d19ed685e6ff14a11ec52 Mon Sep 17 00:00:00 2001 From: Jeremy Barton Date: Fri, 11 Oct 2019 14:31:40 -0700 Subject: [PATCH] Only pass the needed sub-struct in WriteUncompressedPublicKey. (dotnet/corefx#41712) Commit migrated from https://github.com/dotnet/corefx/commit/57ae5430e0e6cbf16b5c7b7def4fc95015b2b722 --- .../Common/src/System/Security/Cryptography/EccKeyFormatHelper.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libraries/Common/src/System/Security/Cryptography/EccKeyFormatHelper.cs b/src/libraries/Common/src/System/Security/Cryptography/EccKeyFormatHelper.cs index 12c4b14..cae5d7c 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/EccKeyFormatHelper.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/EccKeyFormatHelper.cs @@ -732,12 +732,12 @@ namespace System.Security.Cryptography writer.WriteBitString( publicKeyLength, - ecParameters, - (publicKeyBytes, ecParams) => + ecParameters.Q, + (publicKeyBytes, point) => { publicKeyBytes[0] = 0x04; - ecParams.Q.X.AsSpan().CopyTo(publicKeyBytes.Slice(1)); - ecParams.Q.Y.AsSpan().CopyTo(publicKeyBytes.Slice(1 + ecParams.Q.X.Length)); + point.X.AsSpan().CopyTo(publicKeyBytes.Slice(1)); + point.Y.AsSpan().CopyTo(publicKeyBytes.Slice(1 + point.X.Length)); }); } -- 2.7.4