[Rpm-maint] [rpm-software-management/rpm] Add OpenSSL crypto backend (#129)
notifications at github.com
Wed Jan 18 16:14:05 UTC 2017
sgallagher commented on this pull request.
+int rpmDigestFinal(DIGEST_CTX ctx, void ** datap, size_t *lenp, int asAscii)
+ int ret;
+ unsigned char *digest = NULL;
+ unsigned int digestlen;
+ if (ctx == NULL) return -1;
+ digestlen = EVP_MD_CTX_size(ctx->md_ctx);
+ digest = xcalloc(digestlen, sizeof(*digest));
+ if (digest == NULL) return -1;
+ ret = EVP_DigestFinal_ex(ctx->md_ctx, digest, &digestlen);
+ if (ret != 1) goto done;
In this case, that would work, but there are many places in OpenSSL where success == 1 and any other value indicates an error. I kept it the same here for consistency.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rpm-maint