Commit 5f10428
committed
ocsp: allocate OpenSSL objects in #initialize{,_copy}
Allocate the underlying OpenSSL object in #initialize{,_copy} instead
of .allocate. Allocating an empty OpenSSL object in .allocate is
wasteful because #initialize{,_copy} cannot always reuse an existing
object and have to allocate a new one.
Some ruby/openssl classes already follow this approach, such as
OpenSSL::PKey::PKey. Let's standardize on it.
Also expand New*() and Set*() macros, which are only used once or twice
and are not very helpful for readability in my opinion.1 parent 24f72a8 commit 5f10428
1 file changed
Lines changed: 83 additions & 160 deletions
0 commit comments