[Rpm-maint] [rpm-software-management/rpm] Add OpenSSL crypto backend (#129)

Panu Matilainen notifications at github.com
Wed Feb 8 09:14:20 UTC 2017


Right, padding seems to be working now too and not seeing anything weird in brief testing (throw a big pile of both good and fuzzed packages at it, testsuite passes).

I'm getting this (apparently harmless) warning on F25 (so openssl-1.0.2j):
```
digest_openssl.c:26:0: warning: "OPENSSL_free" redefined
 # define OPENSSL_free free
 
In file included from /usr/include/openssl/bio.h:69:0,
                 from /usr/include/openssl/evp.h:75,
                 from digest_openssl.c:3:
/usr/include/openssl/crypto.h:390:0: note: this is the location of the previous definition
 # define OPENSSL_free(addr)      CRYPTO_free(addr)
```

Some other random notes, more on the stylistic side:
- You don't need to check for NULL from the rpm allocators xcalloc() and xmalloc() aka rcalloc() and rmalloc() and the like, they exit() on OOM so NULL is not a possible return value. Checking nevertheless is mostly harmless but then it may give somebody the idea that it CAN fail. Regular malloc() etc where used are different of course.
- Generally a single point of exit is preferred in functions, in particular those where resources are allocated and need to be freed on errors, pgpVerifySigRSA() is a good example of doing just that. There are some functions - at least rpmDigestDup() and rpmDigestInit() - that would probably be cleaner and simpler if they followed that "goto err" idiom.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/129#issuecomment-278272825
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20170208/bad64633/attachment.html>


More information about the Rpm-maint mailing list