The C# wrapper bundled with wolfSSL can be used in conjunction with Mono to run C# projects on platforms other than Windows! Mono provides users with an easy way to cross platforms with C# applications. To get things started when using wolfSSL, first compile the easy to use Visual Studio example in the wolfssl-X.X.X/wrapper/CSharp directory, then transport the “DLL Debug” folder, that gets created after a successful build, to any platform with Mono. After compiling and transporting the folder the executable can be run with the command “mono wolfSSL-TLS-Server.exe” from inside the “DLL Debug” folder.
Server Using wolfSSL C# Wrapper with Mono on MacOS:
$ mono wolfSSL-TLS-Server.exe Calling ctx Init from wolfSSL Finished init of ctx .... now load in cert and key Ciphers : TLS13-AES128-GCM-SHA256:TLS13-AES256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES128-CCM-SHA256:TLS13-AES128-CCM-8-SHA256:TLS13-SHA256-SHA256:TLS13-SHA384-SHA384 … … Started TCP and waiting for a connection Connection made wolfSSL_accept SSL version is TLSv1.3 SSL cipher suite is TLS13-AES128-GCM-SHA256 hello wolfssl! freeing ssl handle freeing ctx handle
Client Connecting to Server:
$ ./examples/client/client -v 4 peer's cert info: issuer : /C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.wolfssl.com/emailAddressfirstname.lastname@example.org subject: /C=US/ST=Montana/L=Bozeman/O=wolfSSL/OU=Support/CN=www.wolfssl.com/emailAddressemail@example.com serial number:01 SSL version is TLSv1.3 SSL cipher suite is TLS_AES_128_GCM_SHA256 SSL curve name is SECP256R1 Session timeout set to 500 seconds Client Random : C10258AEC4862BD98BC6E3DEFB59A1BBBC28FA064FA571515A367DEE4FC61DBE ERROR: Unable to print out session Hello, this is the wolfSSL C# wrapper
Using the C# wrapper from wolfSSL provides access to FIPS certified code, DTLS, TLS 1.3, and many crypto performance improvements such as AES-NI and ARM hardware accelerations. For questions or assistance with using wolfSSL contact firstname.lastname@example.org.