Is there a recommended DTLS library? [closed] - c

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Is there a dtls library that you recommended?

You might take a look at OpenSSL. It handles both TLS and DTLS protocols.
To get an example, you might also want to look at the source code of OpenVPN.
I implemented a C++ abstraction layer for both TLS/DTLS using these sources.
Anyway, you'll have to be very patient since OpenSSL API is spread across multiple sources and doesn't provide an effecient way to "search" for a particular function or structure.

I wrote a commentary/guide on how Net-SNMP used OpenSSL to implement DTLS:
http://www.net-snmp.org/wiki/index.php/DTLS_Implementation_Notes
Unfortunately, there are probably a few things incorrect and out of date with it. But it's still a better starting place because there is very little usable documentation out there at all.

The open source CyaSSL library supports both DTLS 1.0 and DTLS 1.2 as well, in addition to standard SSL/TLS protocols up to TLS 1.2. Written in C, there is also a Java wrapper available.
The CyaSSL Manual is a good reference regarding usage and guidance, and the download package contains both client and server examples to help users get up and running more quickly (found under the ./examples directory).
The following Wikipedia article can be a good reference point when comparing SSL/TLS libraries: http://en.wikipedia.org/wiki/Comparison_of_TLS_implementations.

DTLS is supported in the GnuTLS library as well. Information on the API and examples are provided in the GnuTLS Manual.

Openssl starts to support DTLS 1.0 since version 0.9.8, and version 1.0.1c or above is recommended due to some DTLS-related fixes(support for DTLS-SRTP, avoiding DTLS DoS attack, etc.)
If DTLS 1.2 is needed, openssl version 1.1.0 is necessary.

Related

Linux Kernel Programming Book for 3.x versions [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm Trying to develop linux kernel module for my own server.
I have a Ubuntu with linux kernel 3.4, but I can't find any books or tutorials for developing modules on 3.x versions, all tutorials and books are for 2.x versions.
And the most part of code not compiling on 3.4 version, specially kernel threads parts.
Do you know anything that would be useful to understand 3.x module development ?
Thanks.
There is not much difference between 2.6.32+ and 3.x in the basics how the kernel works. But yes, function names and APIs change from time to time. This is why books are already old once they are released. This is why I can recommend http://kernelnewbies.org/.
Similar questions have been answered already:
Documentation about device driver programming on kernel 3.x
Linux Device Drivers 3rd Ed and 3.2 kernel
The best documentation is the Linux kernel source itself as it changes so quickly. There are a lot of comments in the code and you should really check out the "Documentation" directory.
Wouldn't it be a good exercise to port the examples to more recent versions?
Very important is a list of changes to keep up with the mainline development: http://kernelnewbies.org/LinuxVersions
If they change the API, they also document the transition. Look at drivers doing similar things to what you want to achieve. How do they work? How did they react on API changes? ...
Subscribe to the related Linux kernel mailing lists and ask there for help for bigger issues from the active kernel developers.
You can use LDD(Linux Device Driver) as reference but it's for 2.x kernel. you can join Eudyptula Challenge challenge for kernel developing learning and training. also remember a very good reference always is linux kernel source code

Difference between libcurl and libsoup [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
What are the advantages and disadvantages of using libcurl and libsoup?
Which one is better to use for a HTTP operation where I have to send request to a server to get a response, and has a quick reaction time?
Libsoup is coming along, but libcurl has much better support and stability. Lib soup devs readily admit that you should probably be using libcurl.
The 4th item is especially important because even on Linux KDE and XCF users will install gnome-related libs, but it isn't nice to force them to use the gnome libraries when a platform independent option is available.
libcurl is (far) more portable
libsoup lacks support for: NTLM for proxies (Proxy-Authentication:), GSS, trailers in chunked responses, OpenSSL
libsoup offers server-side support
libsoup is using GNOME-related libs, making it a less convenient choice for non-GNOME environments.
"I found that libsoup is far slower than libcurl. It uses at least 4x the amount of CPU to transfer a high-bitrate datastream over HTTP. I attribute this to the over-reliance on heavy-weight glib/gobject constructs. Man, that stuff is slow and a pain to use!" - Matt Gruenke
I was looking at libsoup to implement the server side of an API on a hobby project (I was making my own router).
By the time I got through satisfying the GNOME dependencies, the simplicity of the callback based server side code didn't seem as attractive as it once did. The interface is nice enough, see soup_server_add_handler().
If you write GNOME applications (thus can already count on the GNOME dependencies being there), it's okay (it felt sluggish, to me).
If you are just writing client code, or anything that has to work in the absence of GNOME, stick to curl.
http://curl.haxx.se/libcurl/libsoup.html
Your probably better off sticking with libcurl if you want portability and stability.
Using libsoup caused an increase of almost 11MB in my rootfs, where libcurl only added around 1MB.
This is important in embedded systems with limited storage resources.

How to incorporate WebSockets into a Cocoa application [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am developing a Cocoa application which involves a chat element. One approach I've considered is using Websockets to handle client-server communication. This would be particularly desirable because chats will also be displayed on a website, and using Websockets could make the implementation very simple.
So: would it be possible to use a WebView element, and use Websockets within it? (I know Safari doesn't support Websockets yet, so I imagine this is not possible?)
Failing that, are there any Websocket client libraries for C, Objective C, or any other language I could successfully embed within my application?
Suggestions welcomed.
The only objective-c WebSocket library that supports the latest standard, RFC 6455 (at the time of writing this post) is SocketRocket (disclaimer: I'm author of it).
Both Unitt's and Zimt's client implementations are using deprecated protocols and don't seem to be maintained.
Here is an implementation of websockets for objective-c
http://github.com/esad/zimt
zimt doesn't seem to work on iOS4 - no changes were made since april 2nd 2010..
There is libwebsocket provided by warmcat as an answer to my question of a C++ Websocket library.
It supports the most recent -04 and -05 standard recommendation and also provides encryption through SSL.
Additionally it should work on iOS devices.
You can use it if you don't mind using C code or you could write an Objective-C wrapper for the library.
Couldn't get zimt or UnitT to work in my project, so i wrote this quick wrapper around uiwebview to use the native WebSockets supported included in iOS 4.2.
https://github.com/zootreeves/iOS-WebSockets/
Performance is sufficient for small messages.

Good SMTP + SSL/TLS Library for C? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I apologize if this question has been asked before. I did a rather extensive search for similar questions, however all I could find were answers related to C++ or C#. I'm using GNU C.
I'm writing a daemon that needs to be able to send e-mail using SMTP. I need to be able to login to an external mail server, send the email and interpret any error codes. For various reasons, I can not use the system's sendmail facility (if even one is present).
The library should support at least OpenSSL. GNUTLS would be a perk, but not really needed.
Ideally, the library would be licensed LGPL2 (and later) or 3 clause BSD.
Any suggestions?
This answer is more for anyone reading this post after the fact, but it looks like as of version 7.20.0 libcurl supports SMTP, including SSL.
It looks like SASL support is planned, but maybe not released yet. I did find this patch however.
Tim,
Have you looked at CyaSSL? It supports all current industry standards up to TLS 1.2 (as well as some cool features such as stream ciphers), has an OpenSSL compatibility layer, and focuses on optimizing speed and size.
It's dual licensed under both GPLv2 and a commercial license (if you need support). I recently used it with some Android work I was doing and was very pleased.
http://yassl.com/yaSSL/Products_cyassl.html
Regards,
Chris

Good collection of libraries for C? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'm looking for a good collection of libraries for ANSI-C, stuff for handling vectors, hash maps, binary tress, string processing, etc.
Try glib? It's used by GTK+, but it can also be used on other platforms. You can also try Apache APR, which is used by the Apache web server and some of their other C components, or NSPR, which is used by Mozilla projects in C.
gnu's glib collection. furthermore, it's portable for many platforms.
You might also find this question useful:
Container Class / Library for C
As well, this book might be interesting:
Mastering Algorithms with C
The full source code is on the CD and it has code for most of those data structures and algorithms.
check also gnulib's data structures. This library also provides many other features as well as portable layer to ANSI/non-ANSI compilers and POSIX/non-POSIX systems.
checkout http://www.invincibleideas.com/library.asp
GLUT OpenGL I can recommend for very flexible C (graphics) development

Resources