NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/42881: openssl sha384 broken. Returns 64 bytes instead of 48



The following reply was made to PR bin/42881; it has been noted by GNATS.

From: Joerg Sonnenberger <joerg%britannica.bec.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/42881: openssl sha384 broken. Returns 64 bytes instead of
 48
Date: Wed, 24 Feb 2010 20:45:44 +0100

 --YiEDa0DAkWCtVeE4
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 Please try the attached patch.
 
 Joerg
 
 --YiEDa0DAkWCtVeE4
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="m_sha1.c.diff"
 
 Index: crypto/dist/openssl/crypto/evp/m_sha1.c
 ===================================================================
 RCS file: 
/home/joerg/repo/netbsd/src/crypto/dist/openssl/crypto/evp/Attic/m_sha1.c,v
 retrieving revision 1.1.1.5.4.1
 diff -u -p -r1.1.1.5.4.1 m_sha1.c
 --- crypto/dist/openssl/crypto/evp/m_sha1.c    14 Jul 2009 19:48:03 -0000      
1.1.1.5.4.1
 +++ crypto/dist/openssl/crypto/evp/m_sha1.c    24 Feb 2010 19:45:21 -0000
 @@ -158,8 +158,12 @@ static int init384(EVP_MD_CTX *ctx)
  static int init512(EVP_MD_CTX *ctx)
        { return SHA512_Init(ctx->md_data); }
  /* See comment in SHA224/256 section */
 +static int update384(EVP_MD_CTX *ctx,const void *data,size_t count)
 +      { return SHA384_Update(ctx->md_data,data,count); }
  static int update512(EVP_MD_CTX *ctx,const void *data,size_t count)
        { return SHA512_Update(ctx->md_data,data,count); }
 +static int final384(EVP_MD_CTX *ctx,unsigned char *md)
 +      { return SHA384_Final(md,ctx->md_data); }
  static int final512(EVP_MD_CTX *ctx,unsigned char *md)
        { return SHA512_Final(md,ctx->md_data); }
  
 @@ -170,8 +174,8 @@ static const EVP_MD sha384_md=
        SHA384_DIGEST_LENGTH,
        EVP_MD_FLAG_PKEY_METHOD_SIGNATURE|EVP_MD_FLAG_DIGALGID_ABSENT,
        init384,
 -      update512,
 -      final512,
 +      update384,
 +      final384,
        NULL,
        NULL,
        EVP_PKEY_RSA_method,
 
 --YiEDa0DAkWCtVeE4--
 


Home | Main Index | Thread Index | Old Index