~andersk/ubuntu/oneiric/openssl/spurious-reboot

« back to all changes in this revision

Viewing changes to crypto/asn1/asn1_par.c

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2010-12-12 15:37:21 UTC
  • mto: (1.2.1 upstream) (11.2.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 55.
  • Revision ID: james.westby@ubuntu.com-20101212153721-mfw51stum5hwztpd
Tags: upstream-1.0.0c
ImportĀ upstreamĀ versionĀ 1.0.0c

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
             int indent)
71
71
        {
72
72
        static const char fmt[]="%-18s";
73
 
        static const char fmt2[]="%2d %-15s";
74
73
        char str[128];
75
 
        const char *p,*p2=NULL;
 
74
        const char *p;
76
75
 
77
76
        if (constructed & V_ASN1_CONSTRUCTED)
78
77
                p="cons: ";
93
92
        else
94
93
                p = ASN1_tag2str(tag);
95
94
 
96
 
        if (p2 != NULL)
97
 
                {
98
 
                if (BIO_printf(bp,fmt2,tag,p2) <= 0) goto err;
99
 
                }
100
 
        else
101
 
                {
102
 
                if (BIO_printf(bp,fmt,p) <= 0) goto err;
103
 
                }
 
95
        if (BIO_printf(bp,fmt,p) <= 0)
 
96
                goto err;
104
97
        return(1);
105
98
err:
106
99
        return(0);
424
417
 
425
418
const char *ASN1_tag2str(int tag)
426
419
{
427
 
        static const char *tag2str[] = {
 
420
        static const char * const tag2str[] = {
428
421
         "EOC", "BOOLEAN", "INTEGER", "BIT STRING", "OCTET STRING", /* 0-4 */
429
422
         "NULL", "OBJECT", "OBJECT DESCRIPTOR", "EXTERNAL", "REAL", /* 5-9 */
430
423
         "ENUMERATED", "<ASN1 11>", "UTF8STRING", "<ASN1 13>",      /* 10-13 */