[Rpm-maint] [rpm-software-management/rpm] Begin decoupling rpm's crypto API's from PGP (PR #1937)

Demi Marie Obenour notifications at github.com
Thu Feb 24 15:43:11 UTC 2022


@DemiMarie commented on this pull request.

Looks good, though see comment for a potential improvement.

> +
+typedef rpmFlags rpmDigestFlags;
+
+/** \ingroup rpmcrypto
+ * Perform cryptography initialization.
+ * It must be called before any cryptography can be used within rpm.
+ * It's not normally necessary to call it directly as it's called in
+ * general rpm initialization routines.
+ * @return		0 on success, -1 on failure
+ */
+int rpmInitCrypto(void);
+
+/** \ingroup rpmcrypto
+ * Shutdown cryptography
+ */
+int rpmFreeCrypto(void);

Is there a reason to ever actually call this function?  The only reason I can think of is to avoid false positives from ASAN or Valgrind.  It seems to clean up resources that the OS will clean up anyway when the program exits.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1937#pullrequestreview-892624363
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/1937/review/892624363 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220224/2831136c/attachment-0001.html>


More information about the Rpm-maint mailing list