#include <stdio.h>#include <stdlib.h>#include <string.h>#include "apps.h"#include <openssl/bio.h>#include <openssl/err.h>#include <openssl/x509.h>#include <openssl/x509v3.h>#include <openssl/pem.h>Go to the source code of this file.
Defines | |
| #define | PROG crl_main |
| #define | POSTFIX ".rvk" |
Functions | |
| static X509_CRL * | load_crl (char *file, int format) |
| int | MAIN (int, char **) |
Variables | |
| static const char * | crl_usage [] |
| static BIO * | bio_out = NULL |
|
|
Definition at line 73 of file crl.c. Referenced by x509_load_serial(). |
|
|
|
|
||||||||||||
|
Definition at line 388 of file crl.c. References bio_err, BIO_free(), BIO_new(), BIO_NOCLOSE, BIO_printf(), BIO_read_filename, BIO_s_file(), BIO_set_fp, d2i_X509_CRL_bio(), ERR_print_errors(), FORMAT_ASN1, FORMAT_PEM, and in. 00389 { 00390 X509_CRL *x=NULL; 00391 BIO *in=NULL; 00392 00393 in=BIO_new(BIO_s_file()); 00394 if (in == NULL) 00395 { 00396 ERR_print_errors(bio_err); 00397 goto end; 00398 } 00399 00400 if (infile == NULL) 00401 BIO_set_fp(in,stdin,BIO_NOCLOSE); 00402 else 00403 { 00404 if (BIO_read_filename(in,infile) <= 0) 00405 { 00406 perror(infile); 00407 goto end; 00408 } 00409 } 00410 if (format == FORMAT_ASN1) 00411 x=d2i_X509_CRL_bio(in,NULL); 00412 else if (format == FORMAT_PEM) 00413 x=PEM_read_bio_X509_CRL(in,NULL,NULL,NULL); 00414 else { 00415 BIO_printf(bio_err,"bad input format specified for input crl\n"); 00416 goto end; 00417 } 00418 if (x == NULL) 00419 { 00420 BIO_printf(bio_err,"unable to load CRL\n"); 00421 ERR_print_errors(bio_err); 00422 goto end; 00423 } 00424 00425 end: 00426 BIO_free(in); 00427 return(x); 00428 }
|
|
||||||||||||
|
|
|
|
|
|
|
Initial value: {
"usage: crl args\n",
"\n",
" -inform arg - input format - default PEM (DER or PEM)\n",
" -outform arg - output format - default PEM\n",
" -text - print out a text format version\n",
" -in arg - input file - default stdin\n",
" -out arg - output file - default stdout\n",
" -hash - print hash value\n",
" -fingerprint - print the crl fingerprint\n",
" -issuer - print issuer DN\n",
" -lastupdate - lastUpdate field\n",
" -nextupdate - nextUpdate field\n",
" -noout - no CRL output\n",
" -CAfile name - verify CRL using certificates in file \"name\"\n",
" -CApath dir - verify CRL using certificates in \"dir\"\n",
" -nameopt arg - various certificate name options\n",
NULL
}
|