[Rpm-maint] [rpm-software-management/rpm] Add OpenSSL crypto backend (#129)
notifications at github.com
Wed Jan 18 16:05:36 UTC 2017
ignatenkobrain 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;
shouldn't comparison be `if (!ret)`? I have not found much docs about return values, but I guess it is supposed to be used in such manner)
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