~ubuntu-branches/ubuntu/lucid/openssl/lucid-proposed

« back to all changes in this revision

Viewing changes to apps/crl.c

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2009-06-13 18:15:46 UTC
  • mto: (11.1.5 squeeze)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090613181546-vbfntai3b009dl1u
Tags: upstream-0.9.8k
ImportĀ upstreamĀ versionĀ 0.9.8k

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
" -issuer         - print issuer DN\n",
86
86
" -lastupdate     - lastUpdate field\n",
87
87
" -nextupdate     - nextUpdate field\n",
 
88
" -crlnumber      - print CRL number\n",
88
89
" -noout          - no CRL output\n",
89
90
" -CAfile  name   - verify CRL using certificates in file \"name\"\n",
90
91
" -CApath  dir    - verify CRL using certificates in \"dir\"\n",
107
108
        int informat,outformat;
108
109
        char *infile=NULL,*outfile=NULL;
109
110
        int hash=0,issuer=0,lastupdate=0,nextupdate=0,noout=0,text=0;
110
 
        int fingerprint = 0;
 
111
        int fingerprint = 0, crlnumber = 0;
111
112
        const char **pp;
112
113
        X509_STORE *store = NULL;
113
114
        X509_STORE_CTX ctx;
206
207
                        noout= ++num;
207
208
                else if (strcmp(*argv,"-fingerprint") == 0)
208
209
                        fingerprint= ++num;
 
210
                else if (strcmp(*argv,"-crlnumber") == 0)
 
211
                        crlnumber= ++num;
209
212
                else if ((md_alg=EVP_get_digestbyname(*argv + 1)))
210
213
                        {
211
214
                        /* ok */
281
284
                                {
282
285
                                print_name(bio_out, "issuer=", X509_CRL_get_issuer(x), nmflag);
283
286
                                }
284
 
 
 
287
                        if (crlnumber == i)
 
288
                                {
 
289
                                ASN1_INTEGER *crlnum;
 
290
                                crlnum = X509_CRL_get_ext_d2i(x, NID_crl_number,
 
291
                                                              NULL, NULL);
 
292
                                BIO_printf(bio_out,"crlNumber=");
 
293
                                if (crlnum)
 
294
                                        {
 
295
                                        i2a_ASN1_INTEGER(bio_out, crlnum);
 
296
                                        ASN1_INTEGER_free(crlnum);
 
297
                                        }
 
298
                                else
 
299
                                        BIO_puts(bio_out, "<NONE>");
 
300
                                BIO_printf(bio_out,"\n");
 
301
                                }
285
302
                        if (hash == i)
286
303
                                {
287
304
                                BIO_printf(bio_out,"%08lx\n",