in reply to daniel:// stenberg://

Disclosure: I'm the OpenSSL Foundation community manager and I was part of a (failed) effort to get a Documentation feature added to Stack Overflow. (See my writing on the topic on my blog: jlericson.com/tag/documentatio…)

I agree the OpenSSL documentation is lacking. (Which is the nice way of saying it's inconsistent, fails to provide necessary information needed to use the software and disorganized.) The problem is multifaceted, but the shear size of the API is, indeed, at the root. Quite a lot of the library isn't documented at all:

$ perl ./util/find-doc-nits -u   <br># 1243 libcrypto names are not documented<br># 30 libssl names are not documented<br># 45 macros undocumented (count is approximate)<br>

The current policy (enforced by CI) is to not allow new undocumented functions, but that's just preventing the coverage problem from getting worse. It doesn't address the problems you highlighted with d2i_X509. (Though I should mention you linked to the 3.3 version and there has been some work done on that page that you can read if you switch to the latest documentation: docs.openssl.org/master/man3/d…)

Writing code and writing documentation are separate skills that aren't always found in the same person. As far as I know, there haven't been contributions from technical writers. Personally I'm an advocate for bringing on (at least) one person dedicated to documentation.

This entry was edited (3 weeks ago)
in reply to Jon Ericson

@jericson I say those are just lame excuses. OpenSSL has soon existed for *thirty* years and there's clearly still no serious attempt to even try to do good documentation. Lots of the function calls even remain the same so there has been some time to do something.

I honestly cannot understand how a thriving project can claim to be for users and at the same time ignore their docs to this degree.

But that's just my personal opinion.

in reply to daniel:// stenberg://

They can only be lame excuses if they were excuses. ;-) I agree with you that documentation needs help. It's something that came up time and again in our survey in June. And, of course, I've consulted the documentation myself to try to understand the library. It's a problem.

You know the history of OpenSSL better than I do. Nothing anyone can do about the past. The question is how do we fix the situation? My answer is that we probably need a technical writer who knows how to structure useful documentation.

In my experience, documentation doesn't come naturally. Everyone wants it, but few people want to write it. (You can kinda see that in the OpenSSL forks which don't seem to be much interested in improving the documentation either.) You are absolutely correct that user-oriented projects make documentation a priority.

This entry was edited (3 weeks ago)
in reply to Jon Ericson

@jericson a modern engineer writes code, test cases and documentation. There are no "technical writers" in most of those projects out there with decent documentation. It is enough if engineers just add to the documentation every time a user asks about the functions for things not mentioned there. And undocumented functions would in most projects simply not be accepted. Stop what you do, add a few lines of docs for each one of them.
in reply to daniel:// stenberg://

To go back to your initial post, is this issue related? "Horrible d2i_TYPE*() reuse behavior leads to crashes on error" sounds pretty similar to what you are describing.

(I disagree with the idea that undocumented functions are worse than functions with "a few lines of docs", by the way. Better to have an obvious problem than paper over it.)

in reply to daniel:// stenberg://

I tend to encourage people interested in TLS/SSL coding to watch Bob Beck's "First 30 days of LibreSSL" to get some orientation - youtube.com/watch?v=GnBbhXBDmw…