8000 Tabify changes for consistency · openssl-net/openssl-net@48131de · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 48131de

Browse files
committed
Tabify changes for consistency
1 parent 9db4630 commit 48131de

File tree

3 files changed

+30
-30
lines changed

3 files changed

+30
-30
lines changed

ManagedOpenSsl/Core/Native.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,11 +1576,11 @@ public class bn_gencb_st
15761576
[DllImport(DLLNAME, CallingConvention=CallingConvention.Cdecl)]
15771577
public extern static IntPtr EVP_PKEY_get1_RSA(IntPtr pkey);
15781578

1579-
[DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
1580-
public extern static int EVP_PKEY_set1_EC_KEY(IntPtr pkey, IntPtr key);
1579+
[DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
1580+
public extern static int EVP_PKEY_set1_EC_KEY(IntPtr pkey, IntPtr key);
15811581

1582-
[DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
1583-
public extern static IntPtr EVP_PKEY_get1_EC(IntPtr pkey);
1582+
[DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
1583+
public extern static IntPtr EVP_PKEY_get1_EC(IntPtr pkey);
15841584

15851585
[DllImport(DLLNAME, CallingConvention=CallingConvention.Cdecl)]
15861586
public extern static int EVP_PKEY_set1_DH(IntPtr pkey, IntPtr key);

ManagedOpenSsl/Crypto/CryptoKey.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -197,15 +197,15 @@ public CryptoKey(RSA rsa)
197197
Native.ExpectSuccess(Native.EVP_PKEY_set1_RSA(ptr, rsa.Handle));
198198
}
199199

200-
/// <summary>
201-
/// Calls EVP_PKEY_set1_EC()
202-
/// </summary>
203-
/// <param name="ec"></param>
204-
public CryptoKey(EC.Key ec)
205-
: this()
206-
{
207-
Native.ExpectSuccess(Native.EVP_PKEY_set1_EC_KEY(ptr, ec.Handle));
208-
}
200+
/// <summary>
201+
/// Calls EVP_PKEY_set1_EC()
202+
/// </summary>
203+
/// <param name="ec"></param>
204+
public CryptoKey(EC.Key ec)
205+
: this()
206+
{
207+
Native.ExpectSuccess(Native.EVP_PKEY_set1_EC_KEY(ptr, ec.Handle));
208+
}
209209

210210
/// <summary>
211211
/// Calls EVP_PKEY_set1_DH()

test/TestCryptoKey.cs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -134,23 +134,23 @@ public void CanCreateFromRSA()
134134
}
135135
}
136136

137-
[Test]
138-
public void CanCreateFromEC()
139-
{
140-
using (Key ec = new Key())
141-
{
142-
using (Group group = Group.FromCurveName(Objects.NID.X9_62_prime256v1))
143-
{
144-
ec.Group = group;
145-
}
146-
ec.GenerateKey();
147-
using (CryptoKey key = new CryptoKey(ec))
148-
{
149-
Assert.AreEqual(CryptoKey.KeyType.EC, key.Type);
150-
Assert.AreEqual(ec.Size, key.Size);
151-
}
152-
}
153-
}
137+
[Test]
138+
public void CanCreateFromEC()
139+
{
140+
using (Key ec = new Key())
141+
{
142+
using (Group group = Group.FromCurveName(Objects.NID.X9_62_prime256v1))
143+
{
144+
ec.Group = group;
145+
}
146+
ec.GenerateKey();
147+
using (CryptoKey key = new CryptoKey(ec))
148+
{
149+
Assert.AreEqual(CryptoKey.KeyType.EC, key.Type);
150+
Assert.AreEqual(ec.Size, key.Size);
151+
}
152+
}
153+
}
154154

155155
[Test]
156156
public void CanCreateFromDH()

0 commit comments

Comments
 (0)
0