~ubuntu-branches/ubuntu/oneiric/opendkim/oneiric

« back to all changes in this revision

Viewing changes to libopendkim/dkim.c

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2011-08-06 09:49:16 UTC
  • mfrom: (1.2.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20110806094916-deqiuoq5kuwg0psz
Tags: 2.4.2+dfsg-0ubuntu1
* New upstream release
  - Repacked tarball to remove non-free IETF drafts and RFCs
  - Updated docs/Makefile.in/am, and README to remove references removed
    non-free documentation

Show diffs side-by-side

added added

removed removed

Lines of Context:
2711
2711
                if (p != NULL)
2712
2712
                        lpolicy = dkim_name_to_code(policies, (char *) p);
2713
2713
 
2714
 
#ifdef _FFR_ATPS
2715
 
                p = dkim_param_get(set, (u_char *) "atps");
2716
 
                if (p != NULL && *p == 'y')
2717
 
                        lpflags |= DKIM_PFLAG_ATPS;
2718
 
#endif /* _FFR_ATPS */
2719
 
 
2720
2714
                *policy = lpolicy;
2721
2715
                *pflags = lpflags;
2722
2716
        }
3881
3875
 
3882
3876
                status = RSA_sign(nid, digest, diglen,
3883
3877
                                  rsa->rsa_rsaout, &l, rsa->rsa_rsa);
3884
 
                if (status == 0 || l == 0)
 
3878
                if (status != 1 || l == 0)
3885
3879
                {
3886
3880
                        RSA_free(rsa->rsa_rsa);
3887
3881
                        rsa->rsa_rsa = NULL;
7548
7542
                                     vallen - 1);
7549
7543
 
7550
7544
                if (len == -1)
 
7545
                {
7551
7546
                        return DKIM_STAT_SYNTAX;
7552
 
                else if (len > vallen)
 
7547
                }
 
7548
                else if (len >= vallen)
 
7549
                {
7553
7550
                        return DKIM_STAT_NORESOURCE;
 
7551
                }
7554
7552
                else
 
7553
                {
 
7554
                        val[len] = '\0';
7555
7555
                        return DKIM_STAT_OK;
 
7556
                }
7556
7557
        }
7557
7558
}
7558
7559
 
8536
8537
 
8537
8538
        minlen = MIN(*buflen, dkim->dkim_minsiglen);
8538
8539
        strncpy(buf, b1, minlen);
 
8540
        if (minlen < *buflen)
 
8541
                buf[minlen] = '\0';
8539
8542
        *buflen = minlen;
8540
8543
 
8541
8544
        return DKIM_STAT_OK;