On Mon, Nov 19, 2012 at 9:45 AM, John Zavgren <j...@zavgren.com> wrote:

> Thomas:
> You make very good suggestions. Of them all (aside from the use of tact in
> approaching the developers :-) ), I think that easy-to-follow code examples
> would improve the openSSL experience more than anything else you identify.
> These examples could even provide a natural context for the "cookbook usage
> examples", and then we'd achieve two of your objectives.
>
> I can recall situations where I had to incorporate
> a cartographic calculation in code I was writing, e.g., compute a
> signature, and was unable to find any examples, and the man pages were a
> poor starting point. They are good for learning the individual library
> procedures, but they aren't good for pulling them together to create a
> working software module. (In fact, when I needed to learn how to compute a
> signature, I downloaded the openVPN source code and read it.)
>
> So, what is a list of easy-to-follow code examples? Here are some
> suggestions:
> 1.) read private key and a message from a file: encrypt message with
> private key, write encrypted buffer to (another) file.
> 2.) read cert and private key, read file, compute signature, etc.
> 3.) read file, read signature, read ca certs, validate signature.
> 4.) Example 3 + check CRL.
> 5.) Example 3 + check with OCSP responder.
> ???
> I'm sure there are a LOT of CA related examples that would help, because I
> find the creation of a CA to be one of the more painful exercises.
>
>
> I concur.  But I'd take it a step further.  To take C/C++ programming, as
an example.  It is one thing to learn to write decent code, but quite
another to write 'secure' code.  I have several references that assume a
better than average knowledge of C and C++, and focusses on good and bad
coding practices that  relate to writing secure code.  All of the code,
good and bad, in these rferences is legal C or C++, but some of it
represents an opportunity for bad guys to hack the application for whatever
purpose.

Similarly, I would suggest that your easy to follow examples include
several variants of each use case, and followed by illustrations of coding
practice that are possible withthe library but ill advised because they
compromise security acompanied by examples of how to support the same
requirement without compromising security.  I would suggest that this is
especially important for a library like openssl since it will only be used
in applications in which one of the main requirements is security, and
using it badly seems likely to make the application using it less secure
than it would be without use of a library like it.

Cheers

Ted

Reply via email to