aboutsummaryrefslogtreecommitdiff
path: root/openssl/crypto/x509/x509_cmp.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-02-13 09:48:21 +0100
committermarha <marha@users.sourceforge.net>2013-02-13 09:51:39 +0100
commitaaf21968deb85b635cb6aa6544df233ea5981346 (patch)
tree450a73e83a174325e6a69ad69eb4011c2eb7df8c /openssl/crypto/x509/x509_cmp.c
parent8add148a4cf71b8bdab05a6b7e14824b5062da5e (diff)
downloadvcxsrv-aaf21968deb85b635cb6aa6544df233ea5981346.tar.gz
vcxsrv-aaf21968deb85b635cb6aa6544df233ea5981346.tar.bz2
vcxsrv-aaf21968deb85b635cb6aa6544df233ea5981346.zip
Update to following packages:
openssl-1.0.1e freetype-2.4.11
Diffstat (limited to 'openssl/crypto/x509/x509_cmp.c')
-rw-r--r--openssl/crypto/x509/x509_cmp.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/openssl/crypto/x509/x509_cmp.c b/openssl/crypto/x509/x509_cmp.c
index 7c2aaee2e..352aa3743 100644
--- a/openssl/crypto/x509/x509_cmp.c
+++ b/openssl/crypto/x509/x509_cmp.c
@@ -86,10 +86,9 @@ unsigned long X509_issuer_and_serial_hash(X509 *a)
EVP_MD_CTX_init(&ctx);
f=X509_NAME_oneline(a->cert_info->issuer,NULL,0);
- ret=strlen(f);
if (!EVP_DigestInit_ex(&ctx, EVP_md5(), NULL))
goto err;
- if (!EVP_DigestUpdate(&ctx,(unsigned char *)f,ret))
+ if (!EVP_DigestUpdate(&ctx,(unsigned char *)f,strlen(f)))
goto err;
OPENSSL_free(f);
if(!EVP_DigestUpdate(&ctx,(unsigned char *)a->cert_info->serialNumber->data,
@@ -249,14 +248,14 @@ unsigned long X509_NAME_hash_old(X509_NAME *x)
i2d_X509_NAME(x,NULL);
EVP_MD_CTX_init(&md_ctx);
EVP_MD_CTX_set_flags(&md_ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW);
- EVP_DigestInit_ex(&md_ctx, EVP_md5(), NULL);
- EVP_DigestUpdate(&md_ctx, x->bytes->data, x->bytes->length);
- EVP_DigestFinal_ex(&md_ctx,md,NULL);
+ if (EVP_DigestInit_ex(&md_ctx, EVP_md5(), NULL)
+ && EVP_DigestUpdate(&md_ctx, x->bytes->data, x->bytes->length)
+ && EVP_DigestFinal_ex(&md_ctx,md,NULL))
+ ret=(((unsigned long)md[0] )|((unsigned long)md[1]<<8L)|
+ ((unsigned long)md[2]<<16L)|((unsigned long)md[3]<<24L)
+ )&0xffffffffL;
EVP_MD_CTX_cleanup(&md_ctx);
- ret=( ((unsigned long)md[0] )|((unsigned long)md[1]<<8L)|
- ((unsigned long)md[2]<<16L)|((unsigned long)md[3]<<24L)
- )&0xffffffffL;
return(ret);
}
#endif