I've updated to using the EVP_Digest.. as shown below, but I'm still
experiencing the same problem. Am I still doing something wrong?

void md5_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
{
   EVP_MD_CTX ctx;
//   MD5_CTX ctx;
   size_t i;
   unsigned int mac_len;
   int success1 = 22;
   int success2 = 22;
   int success3 = 22;

   success1 = EVP_DigestInit(&ctx, EVP_md5());
//   success1 = MD5_Init(&ctx);

   for(i = 0; i < num_elem; i++)
   {
      success2 = EVP_DigestUpdate(&ctx, addr[i], len[i]);
//      success2 = MD5_Update(&ctx, addr[i], len[i]);
   }

   success3 = EVP_DigestFinal(&ctx, mac, &mac_len);
//   success3 = MD5_Final(mac, &ctx);

   printf("MEK: md5_vector:EVP success=%d,%d,%d\n", success1,
success2, success3);
}

On Thu, May 28, 2009 at 11:09 AM, Dr. Stephen Henson <st...@openssl.org>wrote:

> On Thu, May 28, 2009, Victor Duchovni wrote:
>
> > On Thu, May 28, 2009 at 09:54:00AM -0500, Michael Kurecka wrote:
> >
> > > success1 = MD5_Init(&ctx);
> >
> > Where is the indirection through the EVP digest interface? I would expect
> > direct calls to raw cryptographic primitives to continue to succeed.
> > If so, don't call MD5_Init() in FIPS applications.
> >
>
> That is correct. Applications need to use the EVP interface to be
> compliant.
>
> Steve.
> --
> Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
> OpenSSL project core developer and freelance consultant.
> Homepage: http://www.drh-consultancy.demon.co.uk
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    openssl-users@openssl.org
> Automated List Manager                           majord...@openssl.org
>

Reply via email to