~ubuntu-branches/ubuntu/maverick/openssl/maverick

« back to all changes in this revision

Viewing changes to crypto/asn1/a_int.c

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Martin
  • Date: 2004-12-16 18:41:29 UTC
  • mto: (11.1.1 lenny)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20041216184129-z7xjkul57mh1jiha
Tags: upstream-0.9.7e
ImportĀ upstreamĀ versionĀ 0.9.7e

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
{ return M_ASN1_INTEGER_dup(x);}
65
65
 
66
66
int ASN1_INTEGER_cmp(ASN1_INTEGER *x, ASN1_INTEGER *y)
67
 
{ return M_ASN1_INTEGER_cmp(x,y);}
 
67
        { 
 
68
        int neg, ret;
 
69
        /* Compare signs */
 
70
        neg = x->type & V_ASN1_NEG;
 
71
        if (neg != (y->type & V_ASN1_NEG))
 
72
                {
 
73
                if (neg)
 
74
                        return -1;
 
75
                else
 
76
                        return 1;
 
77
                }
 
78
 
 
79
        ret = ASN1_STRING_cmp(x, y);
 
80
 
 
81
        if (neg)
 
82
                return -ret;
 
83
        else
 
84
                return ret;
 
85
        }
 
86
        
68
87
 
69
88
/* 
70
89
 * This converts an ASN1 INTEGER into its content encoding.