Loading CHANGES +3 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,9 @@ Changes between 1.0.1 and 1.0.2 [xx XXX xxxx] *) New options -CRL and -CRLform for s_client and s_server for CRLs. [Steve Henson] *) New function X509_CRL_diff to generate a delta CRL from the difference of two full CRLs. Add support to "crl" utility. [Steve Henson] Loading apps/apps.c +49 −0 Original line number Diff line number Diff line Loading @@ -929,6 +929,55 @@ end: return(x); } X509_CRL *load_crl(char *infile, int format) { X509_CRL *x=NULL; BIO *in=NULL; if (format == FORMAT_HTTP) { load_cert_crl_http(infile, bio_err, NULL, &x); return x; } in=BIO_new(BIO_s_file()); if (in == NULL) { ERR_print_errors(bio_err); goto end; } if (infile == NULL) BIO_set_fp(in,stdin,BIO_NOCLOSE); else { if (BIO_read_filename(in,infile) <= 0) { perror(infile); goto end; } } if (format == FORMAT_ASN1) x=d2i_X509_CRL_bio(in,NULL); else if (format == FORMAT_PEM) x=PEM_read_bio_X509_CRL(in,NULL,NULL,NULL); else { BIO_printf(bio_err,"bad input format specified for input crl\n"); goto end; } if (x == NULL) { BIO_printf(bio_err,"unable to load CRL\n"); ERR_print_errors(bio_err); goto end; } end: BIO_free(in); return(x); } EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin, const char *pass, ENGINE *e, const char *key_descrip) { Loading apps/apps.h +1 −0 Original line number Diff line number Diff line Loading @@ -245,6 +245,7 @@ int app_passwd(BIO *err, char *arg1, char *arg2, char **pass1, char **pass2); int add_oid_section(BIO *err, CONF *conf); X509 *load_cert(BIO *err, const char *file, int format, const char *pass, ENGINE *e, const char *cert_descrip); X509_CRL *load_crl(char *infile, int format); int load_cert_crl_http(const char *url, BIO *err, X509 **pcert, X509_CRL **pcrl); EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin, Loading apps/crl.c +0 −50 Original line number Diff line number Diff line Loading @@ -93,7 +93,6 @@ static const char *crl_usage[]={ NULL }; static X509_CRL *load_crl(char *file, int format); static BIO *bio_out=NULL; int MAIN(int, char **); Loading Loading @@ -452,52 +451,3 @@ end: apps_shutdown(); OPENSSL_EXIT(ret); } static X509_CRL *load_crl(char *infile, int format) { X509_CRL *x=NULL; BIO *in=NULL; if (format == FORMAT_HTTP) { load_cert_crl_http(infile, bio_err, NULL, &x); return x; } in=BIO_new(BIO_s_file()); if (in == NULL) { ERR_print_errors(bio_err); goto end; } if (infile == NULL) BIO_set_fp(in,stdin,BIO_NOCLOSE); else { if (BIO_read_filename(in,infile) <= 0) { perror(infile); goto end; } } if (format == FORMAT_ASN1) x=d2i_X509_CRL_bio(in,NULL); else if (format == FORMAT_PEM) x=PEM_read_bio_X509_CRL(in,NULL,NULL,NULL); else { BIO_printf(bio_err,"bad input format specified for input crl\n"); goto end; } if (x == NULL) { BIO_printf(bio_err,"unable to load CRL\n"); ERR_print_errors(bio_err); goto end; } end: BIO_free(in); return(x); } apps/s_apps.h +4 −2 Original line number Diff line number Diff line Loading @@ -196,7 +196,9 @@ int args_ssl(char ***pargs, int *pargc, SSL_CONF_CTX *cctx, int *badarg, BIO *err, STACK_OF(OPENSSL_STRING) **pstr); int args_ssl_call(SSL_CTX *ctx, BIO *err, SSL_CONF_CTX *cctx, STACK_OF(OPENSSL_STRING) *str, int no_ecdhe, int no_jpake); int ssl_load_stores(SSL_CTX *sctx, int ssl_ctx_add_crls(SSL_CTX *ctx, STACK_OF(X509_CRL) *crls); int ssl_load_stores(SSL_CTX *ctx, const char *vfyCApath, const char *vfyCAfile, const char *chCApath, const char *chCAfile); const char *chCApath, const char *chCAfile, STACK_OF(X509_CRL) *crls); #endif Loading
CHANGES +3 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,9 @@ Changes between 1.0.1 and 1.0.2 [xx XXX xxxx] *) New options -CRL and -CRLform for s_client and s_server for CRLs. [Steve Henson] *) New function X509_CRL_diff to generate a delta CRL from the difference of two full CRLs. Add support to "crl" utility. [Steve Henson] Loading
apps/apps.c +49 −0 Original line number Diff line number Diff line Loading @@ -929,6 +929,55 @@ end: return(x); } X509_CRL *load_crl(char *infile, int format) { X509_CRL *x=NULL; BIO *in=NULL; if (format == FORMAT_HTTP) { load_cert_crl_http(infile, bio_err, NULL, &x); return x; } in=BIO_new(BIO_s_file()); if (in == NULL) { ERR_print_errors(bio_err); goto end; } if (infile == NULL) BIO_set_fp(in,stdin,BIO_NOCLOSE); else { if (BIO_read_filename(in,infile) <= 0) { perror(infile); goto end; } } if (format == FORMAT_ASN1) x=d2i_X509_CRL_bio(in,NULL); else if (format == FORMAT_PEM) x=PEM_read_bio_X509_CRL(in,NULL,NULL,NULL); else { BIO_printf(bio_err,"bad input format specified for input crl\n"); goto end; } if (x == NULL) { BIO_printf(bio_err,"unable to load CRL\n"); ERR_print_errors(bio_err); goto end; } end: BIO_free(in); return(x); } EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin, const char *pass, ENGINE *e, const char *key_descrip) { Loading
apps/apps.h +1 −0 Original line number Diff line number Diff line Loading @@ -245,6 +245,7 @@ int app_passwd(BIO *err, char *arg1, char *arg2, char **pass1, char **pass2); int add_oid_section(BIO *err, CONF *conf); X509 *load_cert(BIO *err, const char *file, int format, const char *pass, ENGINE *e, const char *cert_descrip); X509_CRL *load_crl(char *infile, int format); int load_cert_crl_http(const char *url, BIO *err, X509 **pcert, X509_CRL **pcrl); EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin, Loading
apps/crl.c +0 −50 Original line number Diff line number Diff line Loading @@ -93,7 +93,6 @@ static const char *crl_usage[]={ NULL }; static X509_CRL *load_crl(char *file, int format); static BIO *bio_out=NULL; int MAIN(int, char **); Loading Loading @@ -452,52 +451,3 @@ end: apps_shutdown(); OPENSSL_EXIT(ret); } static X509_CRL *load_crl(char *infile, int format) { X509_CRL *x=NULL; BIO *in=NULL; if (format == FORMAT_HTTP) { load_cert_crl_http(infile, bio_err, NULL, &x); return x; } in=BIO_new(BIO_s_file()); if (in == NULL) { ERR_print_errors(bio_err); goto end; } if (infile == NULL) BIO_set_fp(in,stdin,BIO_NOCLOSE); else { if (BIO_read_filename(in,infile) <= 0) { perror(infile); goto end; } } if (format == FORMAT_ASN1) x=d2i_X509_CRL_bio(in,NULL); else if (format == FORMAT_PEM) x=PEM_read_bio_X509_CRL(in,NULL,NULL,NULL); else { BIO_printf(bio_err,"bad input format specified for input crl\n"); goto end; } if (x == NULL) { BIO_printf(bio_err,"unable to load CRL\n"); ERR_print_errors(bio_err); goto end; } end: BIO_free(in); return(x); }
apps/s_apps.h +4 −2 Original line number Diff line number Diff line Loading @@ -196,7 +196,9 @@ int args_ssl(char ***pargs, int *pargc, SSL_CONF_CTX *cctx, int *badarg, BIO *err, STACK_OF(OPENSSL_STRING) **pstr); int args_ssl_call(SSL_CTX *ctx, BIO *err, SSL_CONF_CTX *cctx, STACK_OF(OPENSSL_STRING) *str, int no_ecdhe, int no_jpake); int ssl_load_stores(SSL_CTX *sctx, int ssl_ctx_add_crls(SSL_CTX *ctx, STACK_OF(X509_CRL) *crls); int ssl_load_stores(SSL_CTX *ctx, const char *vfyCApath, const char *vfyCAfile, const char *chCApath, const char *chCAfile); const char *chCApath, const char *chCAfile, STACK_OF(X509_CRL) *crls); #endif