Project

General

Profile

Actions

Backport #7551

closed

Incorrect suggested usage in OpenSSL::X509::ExtensionFactory documentation

Added by richard.bradley (Richard Bradley) over 11 years ago. Updated about 11 years ago.


Description

The OpenSSL::X509::ExtensionFactory class doesn't have any documentation of its own:

The examples show calling "extension_factory.create_extension" and not saving the return value.
If you do not pass the returned value to "cert.add_extension", then the requested extension value will not be added to the certificate.
The attached patch fixes this problem.

The examples on the Certificate documentation are already correct:

Aside about further documentation:

I would be happy to add a bit of documentation to the Ruby OpenSSL lib, but:

  1. I would like to add cites to the underlying OpenSSL lib, but that appears to me to be sparsely documented, if at all (for example, the "see objects.h" cite I added in the attached patch is literally the best documentation I could find for the underlying implementation)
  2. It's not clear to me which .c comments in which files will get compiled into the rubydoc
    .. so perhaps someone else would be better placed to add this documentation. (Although given how long the Ruby OpenSSL lib has existed in its current woefully underdocumented state, perhaps no-one else will?)

If anyone has any suggestions for how I can fix 1 / 2 above, I would be happy to submit further documentation patches.
For now, this is all I have :-)

(If the attached patch is in the wrong format, sorry. Please let me know if so, and what format you prefer, and I can resubmit.)


Files

fix-etension-factory-docs.diff (4.24 KB) fix-etension-factory-docs.diff richard.bradley (Richard Bradley), 12/13/2012 01:04 AM
fix-etension-factory-docs.diff (4.24 KB) fix-etension-factory-docs.diff Patch v2 (fix some missing brackets) richard.bradley (Richard Bradley), 12/13/2012 01:06 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0