[Rpm-maint] [rpm-software-management/rpm] Add OpenSSL crypto backend (#129)
Stephen Gallagher
notifications at github.com
Mon Feb 6 20:55:33 UTC 2017
sgallagher commented on this pull request.
> + EVP_PKEY_free(key->evp_pkey);
+ key->evp_pkey = NULL;
+ RSA_free(rsa);
+ }
+
+ return 1;
+}
+
+static int pgpSetKeyMpiRSA(pgpDigAlg pgpkey, int num, const uint8_t *p)
+{
+ size_t mlen = pgpMpiLen(p) - 2;
+ struct pgpDigKeyRSA_s *key = pgpkey->data;
+
+ if(!key) {
+ key = pgpkey->data = OPENSSL_secure_zalloc(sizeof(*key));
+ if (!key) return 1;
I figured that, given that RPM interaction is a computationally-rare event, it was easier on me to just assume everything should be secure-allocated rather than trying to figure out when it was appropriate and when it was safe to skip it.
If you are telling me that I should just not use it at all in this code, I'll drop it.
--
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20170206/39f9df05/attachment-0001.html>
More information about the Rpm-maint
mailing list