Skip to content

Commit 0956091

Browse files
committed
prototypes
1 parent 23bfb01 commit 0956091

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

wrapper/CSharp/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ sudo make install
4545
```
4646
cd wrapper/CSharp
4747
48-
msc wolfSSL_CSharp/wolfSSL.cs wolfSSL_CSharp/X509.cs \
48+
mcs wolfSSL_CSharp/wolfSSL.cs wolfSSL_CSharp/X509.cs \
4949
wolfSSL-TLS-Server/wolfSSL-TLS-Server.cs
5050
```
5151

wrapper/CSharp/wolfSSL_CSharp/wolfSSL.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,17 @@ public void free()
290290
[DllImport(wolfssl_dll, CallingConvention = CallingConvention.Cdecl)]
291291
private extern static int wolfSSL_CTX_use_psk_identity_hint(IntPtr ctx, StringBuilder identity);
292292

293+
/********************************
294+
* SNI
295+
*/
296+
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
297+
public delegate int sni_delegate(IntPtr ssl, IntPtr ret, IntPtr exArg);
298+
[DllImport(wolfssl_dll, CallingConvention = CallingConvention.Cdecl)]
299+
private extern static void wolfSSL_CTX_set_servername_callback(IntPtr ctx, sni_delegate sni_cb);
300+
[DllImport(wolfssl_dll, CallingConvention = CallingConvention.Cdecl)]
301+
private extern static void wolfSSL_CTX_set_tlsext_servername_callback(IntPtr ctx, sni_delegate sni_cb);
302+
[DllImport(wolfssl_dll, CallingConvention = CallingConvention.Cdecl)]
303+
private extern static void wolfSSL_CTX_set_servername_arg(IntPtr ctx, IntPtr arg);
293304

294305
/********************************
295306
* SSL Structure

0 commit comments

Comments
 (0)