prototypes

This commit is contained in:
gasbytes
2024-05-30 16:14:17 +02:00
parent 23bfb01e54
commit 095609107d
2 changed files with 12 additions and 1 deletions

View File

@ -45,7 +45,7 @@ sudo make install
```
cd wrapper/CSharp
msc wolfSSL_CSharp/wolfSSL.cs wolfSSL_CSharp/X509.cs \
mcs wolfSSL_CSharp/wolfSSL.cs wolfSSL_CSharp/X509.cs \
wolfSSL-TLS-Server/wolfSSL-TLS-Server.cs
```

View File

@ -290,6 +290,17 @@ namespace wolfSSL.CSharp {
[DllImport(wolfssl_dll, CallingConvention = CallingConvention.Cdecl)]
private extern static int wolfSSL_CTX_use_psk_identity_hint(IntPtr ctx, StringBuilder identity);
/********************************
* SNI
*/
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate int sni_delegate(IntPtr ssl, IntPtr ret, IntPtr exArg);
[DllImport(wolfssl_dll, CallingConvention = CallingConvention.Cdecl)]
private extern static void wolfSSL_CTX_set_servername_callback(IntPtr ctx, sni_delegate sni_cb);
[DllImport(wolfssl_dll, CallingConvention = CallingConvention.Cdecl)]
private extern static void wolfSSL_CTX_set_tlsext_servername_callback(IntPtr ctx, sni_delegate sni_cb);
[DllImport(wolfssl_dll, CallingConvention = CallingConvention.Cdecl)]
private extern static void wolfSSL_CTX_set_servername_arg(IntPtr ctx, IntPtr arg);
/********************************
* SSL Structure