~ubuntu-branches/ubuntu/intrepid/net-snmp/intrepid-updates

« back to all changes in this revision

Viewing changes to snmplib/scapi.c

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2006-11-28 12:29:34 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20061128122934-82xxzy2zcvypnvy7
Tags: 5.2.3-4ubuntu1
* Merge from debian unstable, remaining changes:
  - remove stop links from rc0 and rc6

Show diffs side-by-side

added added

removed removed

Lines of Context:
403
403
#if defined(USE_INTERNAL_MD5) || defined(USE_OPENSSL) || defined(USE_PKCS)
404
404
{
405
405
#if defined(USE_OPENSSL) || defined(USE_PKCS)
406
 
    int             rval = SNMPERR_SUCCESS;
 
406
    int            rval = SNMPERR_SUCCESS;
407
407
#endif
 
408
    int            ret;
408
409
 
409
410
#ifdef USE_OPENSSL
410
 
    const EVP_MD         *hashfn;
 
411
    const EVP_MD   *hashfn;
411
412
    EVP_MD_CTX     ctx, *cptr;
412
413
    unsigned int   tmp_len;
413
414
#endif
415
416
    DEBUGTRACE;
416
417
 
417
418
    if (hashtype == NULL || hashtypelen < 0 || buf == NULL ||
418
 
        buf_len < 0 || MAC == NULL || MAC_len == NULL ||
419
 
        (int) (*MAC_len) < sc_get_properlength(hashtype, hashtypelen))
 
419
        buf_len <= 0 || MAC == NULL || MAC_len == NULL )
 
420
        return (SNMPERR_GENERR);
 
421
    ret = sc_get_properlength(hashtype, hashtypelen);
 
422
    if (( ret < 0 ) || (*MAC_len < ret ))
420
423
        return (SNMPERR_GENERR);
421
424
 
422
425
#ifdef USE_OPENSSL