At Wed, 23 Jul 2014 17:15:55 +0000 openssl-users@openssl.org wrote:

> 
> On Wed, Jul 23, 2014 at 11:10:28AM -0400, Robert Heller wrote:
> 
> > What am I doing wrong?
> > 
> > [...]
> >         EVP_DigestInit_ex(&mdctx,(const EVP_MD *)EVP_sha256,NULL);
> > [...]
> >     HMAC_Init_ex(ctx,paddedkey,KEYLEN,(const EVP_MD *)EVP_sha256,NULL);
> > [...]
> 
> The cast to (const EVP_MD *) hides the bug from the compiler.
> EVP_sha256 is a function!  The correct code is:
> 
>     HMAC_Init_ex(ctx, paddedkey, KEYLEN, EVP_sha256(), NULL);

Yeah, I figured that out, eventually...

> 

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
hel...@deepsoft.com       -- Webhosting Services
            
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to