Update from 1.0.0-stable
authorDr. Stephen Henson <steve@openssl.org>
Wed, 1 Jul 2009 11:40:19 +0000 (11:40 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 1 Jul 2009 11:40:19 +0000 (11:40 +0000)
crypto/engine/eng_cryptodev.c
crypto/evp/c_alld.c

index 2259916..16afaf7 100644 (file)
@@ -625,7 +625,7 @@ static int
 bn2crparam(const BIGNUM *a, struct crparam *crp)
 {
        int i, j, k;
 bn2crparam(const BIGNUM *a, struct crparam *crp)
 {
        int i, j, k;
-       ssize_t words, bytes, bits;
+       ssize_t bytes, bits;
        u_char *b;
 
        crp->crp_p = NULL;
        u_char *b;
 
        crp->crp_p = NULL;
@@ -637,6 +637,7 @@ bn2crparam(const BIGNUM *a, struct crparam *crp)
        b = malloc(bytes);
        if (b == NULL)
                return (1);
        b = malloc(bytes);
        if (b == NULL)
                return (1);
+       memset(b, 0, bytes);
 
        crp->crp_p = b;
        crp->crp_nbits = bits;
 
        crp->crp_p = b;
        crp->crp_nbits = bits;
index 5032e7c..aa565a6 100644 (file)
@@ -81,7 +81,7 @@ void OpenSSL_add_all_digests(void)
        EVP_add_digest(EVP_dss());
 #endif
 #endif
        EVP_add_digest(EVP_dss());
 #endif
 #endif
-#ifndef OPENSSL_NO_SHA
+#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA1)
        EVP_add_digest(EVP_sha1());
        EVP_add_digest_alias(SN_sha1,"ssl3-sha1");
        EVP_add_digest_alias(SN_sha1WithRSAEncryption,SN_sha1WithRSA);
        EVP_add_digest(EVP_sha1());
        EVP_add_digest_alias(SN_sha1,"ssl3-sha1");
        EVP_add_digest_alias(SN_sha1WithRSAEncryption,SN_sha1WithRSA);