help-libtasn1
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] cleanup _asn1_copy_structure3


From: Tim Ruehsen
Subject: Re: [PATCH] cleanup _asn1_copy_structure3
Date: Wed, 5 Sep 2012 11:11:42 +0200
User-agent: KMail/1.13.7 (Linux/3.2.0-3-amd64; KDE/4.8.4; x86_64; ; )

> > Well the clang analyser is mentioned... since the last check, some time
> > may have been passed ... using it, you will at least find one serious
> > memory error.
> 
> If you could explain more, that would help.

You could just do
        make clean
        scan-build ./configure
        scan-build make
        scan-view <whatever it says>

At least the memory leak(s) in coding.c/_asn1_ordering_set() is obvious.
I did not research the other ones.

I append the clang compiler output at the end of the mail.

> > Hey Nikos.
> > This mentioned tool could use libtasn1. Impact doesn't matter since the
> > certificates seldom change.
> > The X509 certificate format is well defined in RFC 5280 and it should be
> > easy to output these values into a text format like:
> > --------
> > tbsCertificate.version 2
> > tbsCertificate.serialNumber
> > 85:bd:4b:f3:d8:da:e3:69:f6:94:d7:5f:c3:a5:44:23 tbsCertificate.signature
> > sha1WithRSAEncryption
> > tbsCertificate.issuer C=US, O=America Online Inc., CN=America Online Root
> > Certification Authority 1
> > ...
> > signatureAlgorithm sha1WithRSAEncryption
> > signatureValue 7c:8a:d1:1f:18:37:82:e0:b8:b0:a3:ed:56:95:c8:62:61:9c: ...
> > --------
> > 
> > OpenSSL already has a tool to convert .PEM into a (human readable) text:
> > openssl x509 -text -noout -in <filename>
> > 
> > Maybe there already is a similar GnuTLS tool which we can extend a bit to
> > produce machine readable text.
> 
> The risk is that some information is lost when doing this conversion.
> 
> If you want to work on it, you could add a new
> gnutls_certificate_print_formats_t symbol that would make
> gnutls_x509_crt_print print new certificate in a machine readable
> format.  I think that would be quite useful, and not too difficult to
> do.  Just make sure you output opaque blobs for things that haven't yet
> been given a machine readable format -- I'm thinking primarily
> extensions.

Thanks for the hints. First of all i need some time...

Regards, Tim

clang output:
make[3]: Entering directory `/usr/oms/src/libtasn1/lib'
  CC     ASN1.lo
ASN1.c:1473:3: warning: Value stored to 'yytoken' is never read
  yytoken = 0;
  ^         ~
ASN1.c:1365:5: warning: Value stored to 'yymsg' is never read
    yymsg = "Deleting";
    ^       ~~~~~~~~~~
2 warnings generated.
  CC     coding.lo
coding.c:820:33: warning: Call to 'malloc' has an allocation size of 0 bytes
              temp = (unsigned char *) _asn1_malloc (p_vet->end - counter);
                                       ^             ~~~~~~~~~~~~~~~~~~~~
./int.h:60:22: note: expanded from macro '_asn1_malloc'
#define _asn1_malloc malloc
                     ^
coding.c:643:2: warning: Memory is never released; potential leak of memory 
pointed to by 'last'
        return;
        ^
2 warnings generated.
  CC     decoding.lo
decoding.c:731:4: warning: Value stored to 'tot_len' is never read
          tot_len += len2;
          ^          ~~~~
1 warning generated.
  CC     element.lo
  CC     errors.lo
  CC     gstr.lo
  CC     parser_aux.lo
parser_aux.c:1028:12: warning: Access to field 'right' results in a 
dereference of a null pointer (loaded from variable 'p')
              if (p->right)
                  ^
1 warning generated.
  CC     structure.lo
  CC     version.lo
  CCLD   libtasn1.la
make[3]: Leaving directory `/usr/oms/src/libtasn1/lib'
make[2]: Leaving directory `/usr/oms/src/libtasn1/lib'
Making all in src
make[2]: Entering directory `/usr/oms/src/libtasn1/src'
  CC     asn1Parser.o
asn1Parser.c:124:38: warning: Null pointer passed as an argument to a 
'nonnull' parameter
          outputFileName = (char *) malloc (strlen (optarg) + 1);
                                            ^       ~~~~~~
asn1Parser.c:128:34: warning: Null pointer passed as an argument to a 
'nonnull' parameter
          vectorName = (char *) malloc (strlen (optarg) + 1);
                                        ^       ~~~~~~
2 warnings generated.
  CCLD   asn1Parser
  CC     asn1Coding.o
asn1Coding.c:305:22: warning: Array access (from variable 'der') results in a 
null pointer dereference
    printf ("%02x ", der[k]);
                     ^~~
1 warning generated.
  CCLD   asn1Coding
  CC     asn1Decoding.o
  CCLD   asn1Decoding
make[2]: Leaving directory `/usr/oms/src/libtasn1/src'
Making all in examples
make[2]: Entering directory `/usr/oms/src/libtasn1/examples'
make  all-am
make[3]: Entering directory `/usr/oms/src/libtasn1/examples'
  CC     CertificateExample.o
CertificateExample.c:612:7: warning: Value stored to 'result' is never read
      result = asn1_read_value (cert2, "signature", str, &len);
      ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:600:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:597:3: warning: Value stored to 'result' is never read
  result = asn1_read_value (cert2, "signatureAlgorithm.algorithm", str, &len);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:606:7: warning: Value stored to 'result' is never read
      result = asn1_der_decoding_startEnd (cert2, der, der_len,
      ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:384:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:296:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (value, "", "printableString", 1);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:271:3: warning: Value stored to 'result' is never read
  result = asn1_der_coding (value, "", der, der_len, errorDescription);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:242:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:493:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:500:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:236:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (cert1, "tbsCertificate.serialNumber", "17", 0);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:329:3: warning: Value stored to 'result' is never read
  result = asn1_der_coding (value, "", der, der_len, errorDescription);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:422:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:355:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:467:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:255:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:301:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:327:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (value, "printableString", "nist", 4);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:404:3: warning: Value stored to 'result' is never read
  result = asn1_der_coding (value, "", der, der_len, errorDescription);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:286:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:433:3: warning: Value stored to 'result' is never read
  result = asn1_der_coding (value, "", der, der_len, errorDescription);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:435:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:289:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:338:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:472:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (cert1, "tbsCertificate.issuerUniqueID", NULL, 0);  
/* NO OPTION */
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:482:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:365:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:341:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:348:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:455:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (param, "g", str2, 128);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:517:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (cert1, "signatureAlgorithm.algorithm", str, 1);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:402:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (value, "printableString", "gov", 3);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:394:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:485:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:318:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:386:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:430:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (value, "", "printableString", 1);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:478:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:492:3: warning: Value stored to 'result' is never read
  result = asn1_delete_structure (&constr);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:233:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (cert1, "tbsCertificate.version", "v3", 0);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:267:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:297:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (value, "printableString", "gov", 3);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:331:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:431:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (value, "printableString", "nist", 4);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:250:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:326:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (value, "", "printableString", 1);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:281:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:503:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (cert1, "tbsCertificate.extensions.?LAST.extnID", 
str, 1);  /* subjectKeyIdentifier */
  ^        
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:401:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (value, "", "printableString", 1);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:322:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:515:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:459:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:307:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:263:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:309:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:358:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:498:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (cert1, "tbsCertificate.extensions", "NEW", 1);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:398:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:451:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (param, "p", str2, 128);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:491:3: warning: Value stored to 'result' is never read
  result = asn1_der_coding (constr, "", der, der_len, errorDescription);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:518:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (cert1, "signatureAlgorithm.parameters", NULL, 0);  
/* NO OPTION */
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:253:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:457:3: warning: Value stored to 'result' is never read
  result = asn1_der_coding (param, "", der, der_len, errorDescription);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:372:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:299:3: warning: Value stored to 'result' is never read
  result = asn1_der_coding (value, "", der, der_len, errorDescription);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:473:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (cert1, "tbsCertificate.subjectUniqueID", NULL, 
0); /* NO OPTION */
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:508:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:530:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (cert1, "signature", str2, 368);    /* dsa-with-
sha */
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:444:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:240:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:453:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (param, "q", str2, 20);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:273:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:414:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:488:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (constr, "cA", "TRUE", 1);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:489:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (constr, "pathLenConstraint", NULL, 0);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:260:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:360:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:315:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:481:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (cert1, "tbsCertificate.extensions.?LAST.extnID", 
str, 1);  /*   basicConstraints */
  ^        
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:224:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:391:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:426:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:376:3: warning: Value stored to 'result' is never read
  result = asn1_der_coding (value, "", der, der_len, errorDescription);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:412:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:504:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:293:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:443:3: warning: Value stored to 'result' is never read
  result = asn1_read_value (cert_def, "PKIX1Implicit88.id-dsa", str, &len);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:406:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:419:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:476:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (cert1, "tbsCertificate.extensions", "NEW", 1);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:269:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (value, "", "US", 2);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:374:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (value, "", "US", 2);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:279:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:345:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:368:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:378:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:448:3: warning: Value stored to 'result' is never read
  result =
  ^
CertificateExample.c:245:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (cert1, "tbsCertificate.signature.parameters",
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CertificateExample.c:115:8: warning: Value stored to 'result' is never read
              result =
              ^
CertificateExample.c:140:5: warning: Value stored to 'result' is never read
                  result =
                  ^
CertificateExample.c:165:9: warning: Value stored to 'result' is never read
                      result =
                      ^
101 warnings generated.
  CC     pkix_asn1_tab.o
  CCLD   CertificateExample
  CC     CrlExample.o
CrlExample.c:314:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:297:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (value, "printableString", "gov", 3);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:368:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:373:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:259:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (crl, "tbsCertList.issuer.rdnSequence", "NEW", 1);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:351:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:274:3: warning: Value stored to 'result' is never read
  result = asn1_der_coding (value, "", der, der_len, errorDescription);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:234:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:277:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:385:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:344:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:293:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:260:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:332:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (crl, "tbsCertList.thisUpdate", "utcTime", 1);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:251:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (crl, "tbsCertList.signature.algorithm", str, 1);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:324:3: warning: Value stored to 'result' is never read
  result = asn1_der_coding (value, "", der, der_len, errorDescription);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:355:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:249:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:365:3: warning: Value stored to 'result' is never read
  result = asn1_read_value (cert_def, "PKIX1Implicit88.id-ce-cRLReasons",
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:264:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:257:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (crl, "tbsCertList.issuer", "rdnSequence", 1);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:333:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:322:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (value, "printableString", "nist", 4);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:387:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (crl, "signatureAlgorithm.algorithm", str, 1);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:252:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:287:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:299:3: warning: Value stored to 'result' is never read
  result = asn1_der_coding (value, "", der, der_len, errorDescription);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:401:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (crl, "signature", str2, 46 * 8);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:326:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:321:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (value, "", "printableString", 1);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:347:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:360:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:267:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:270:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:283:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:301:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:307:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:338:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:272:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (value, "", "US", 2);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:296:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (value, "", "printableString", 1);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:337:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (crl, "tbsCertList.nextUpdate", "utcTime", 1);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:290:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:244:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (crl, "tbsCertList.version", "v2", 0);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:311:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:380:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (crl, "tbsCertList.crlExtensions", NULL, 0);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:367:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (crl, 
"tbsCertList.revokedCertificates.?LAST.crlEntryExtensions.?LAST.extnID", str, 
1);     /* reasonCode */
  ^        
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:306:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (crl, "tbsCertList.issuer.rdnSequence", "NEW", 1);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:317:3: warning: Value stored to 'result' is never read
  result =
  ^
CrlExample.c:388:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (crl, "signatureAlgorithm.parameters", NULL, 0);    
/* NO OPTION */
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:282:3: warning: Value stored to 'result' is never read
  result = asn1_write_value (crl, "tbsCertList.issuer.rdnSequence", "NEW", 4);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:132:5: warning: Value stored to 'result' is never read
                  result =
                  ^
CrlExample.c:151:5: warning: Value stored to 'result' is never read
                  result =
                  ^
CrlExample.c:121:8: warning: Value stored to 'result' is never read
              result =
              ^
CrlExample.c:177:9: warning: Value stored to 'result' is never read
                      result =
                      ^
CrlExample.c:466:3: warning: Value stored to 'result' is never read
  result = asn1_read_value (crl2, "signatureAlgorithm.algorithm", str, &len);
  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:479:7: warning: Value stored to 'result' is never read
      result = asn1_read_value (crl2, "signature", str, &len);
      ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:474:7: warning: Value stored to 'result' is never read
      result = asn1_der_decoding_startEnd (crl2, der, der_len,
      ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CrlExample.c:468:3: warning: Value stored to 'result' is never read
  result =
  ^
58 warnings generated.
  CCLD   CrlExample
make[3]: Leaving directory `/usr/oms/src/libtasn1/examples'
make[2]: Leaving directory `/usr/oms/src/libtasn1/examples'
Making all in tests
make[2]: Entering directory `/usr/oms/src/libtasn1/tests'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/oms/src/libtasn1/tests'
Making all in doc
make[2]: Entering directory `/usr/oms/src/libtasn1/doc'
Making all in cyclo
make[3]: Entering directory `/usr/oms/src/libtasn1/doc/cyclo'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/usr/oms/src/libtasn1/doc/cyclo'
make[3]: Entering directory `/usr/oms/src/libtasn1/doc'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/usr/oms/src/libtasn1/doc'
make[2]: Leaving directory `/usr/oms/src/libtasn1/doc'
make[2]: Entering directory `/usr/oms/src/libtasn1'
make[2]: Leaving directory `/usr/oms/src/libtasn1'
make[1]: Leaving directory `/usr/oms/src/libtasn1'
scan-build: 169 bugs found.
scan-build: Run 'scan-view /tmp/scan-build-2012-09-05-1' to examine bug 
reports.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]