Bug #4944 ยป snapshot-digestfail.patch
snapshot-digestfail/ext/openssl/ossl_digest.c 2011-06-29 08:57:46.000000000 -0500 | ||
---|---|---|
ret = ossl_digest_alloc(cDigest);
|
||
GetDigest(ret, ctx);
|
||
EVP_DigestInit_ex(ctx, md, NULL);
|
||
if(!EVP_DigestInit_ex(ctx, md, NULL)) {
|
||
rb_raise(rb_eArgError, "digest algorithm init failed");
|
||
}
|
||
return ret;
|
||
}
|
||
... | ... | |
if (!NIL_P(data)) StringValue(data);
|
||
GetDigest(self, ctx);
|
||
EVP_DigestInit_ex(ctx, md, NULL);
|
||
if(!EVP_DigestInit_ex(ctx, md, NULL)) {
|
||
rb_raise(rb_eArgError, "digest algorithm init failed");
|
||
}
|
||
if (!NIL_P(data)) return ossl_digest_update(self, data);
|
||
return self;
|
||
}
|
||
... | ... | |
EVP_MD_CTX *ctx;
|
||
GetDigest(self, ctx);
|
||
EVP_DigestInit_ex(ctx, EVP_MD_CTX_md(ctx), NULL);
|
||
if(!EVP_DigestInit_ex(ctx, EVP_MD_CTX_md(ctx), NULL)) {
|
||
rb_raise(rb_eArgError, "digest algorithm init failed");
|
||
}
|
||
return self;
|
||
}
|