Loading CHANGES +3 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,9 @@ Changes between 0.9.4 and 0.9.5 [xx XXX 2000] *) Add a new -notext option to 'ca' and a -pubkey option to 'spkac'. [Steve Henson] *) Use a less unusual form of the Miller-Rabin primality test (it used a binary algorithm for exponentiation integrated into the Miller-Rabin loop, our standard modexp algorithms are faster). Loading apps/ca.c +11 −10 Original line number Diff line number Diff line Loading @@ -200,7 +200,7 @@ static int certify_spkac(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509, char *enddate, int days, char *ext_sect,LHASH *conf, int verbose); static int fix_data(int nid, int *type); static void write_new_certificate(BIO *bp, X509 *x, int output_der); static void write_new_certificate(BIO *bp, X509 *x, int output_der, int notext); static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst, STACK_OF(CONF_VALUE) *policy, TXT_DB *db, BIGNUM *serial, char *startdate, char *enddate, int days, int batch, int verbose, Loading Loading @@ -247,6 +247,7 @@ int MAIN(int argc, char **argv) char *enddate=NULL; int days=0; int batch=0; int notext=0; X509 *x509=NULL; X509 *x=NULL; BIO *in=NULL,*out=NULL,*Sout=NULL,*Cout=NULL; Loading Loading @@ -357,6 +358,8 @@ EF_ALIGNMENT=0; if (--argc < 1) goto bad; outdir= *(++argv); } else if (strcmp(*argv,"-notext") == 0) notext=1; else if (strcmp(*argv,"-batch") == 0) batch=1; else if (strcmp(*argv,"-preserveDN") == 0) Loading Loading @@ -984,8 +987,8 @@ bad: perror(buf[2]); goto err; } write_new_certificate(Cout,x, 0); write_new_certificate(Sout,x, output_der); write_new_certificate(Cout,x, 0, notext); write_new_certificate(Sout,x, output_der, notext); } if (sk_num(cert_sk)) Loading Loading @@ -1893,17 +1896,16 @@ err: return(ok); } static void write_new_certificate(BIO *bp, X509 *x, int output_der) static void write_new_certificate(BIO *bp, X509 *x, int output_der, int notext) { char *f; char buf[256]; if (output_der) { (void)i2d_X509_bio(bp,x); return; } #if 0 /* ??? Not needed since X509_print prints all this stuff anyway */ f=X509_NAME_oneline(X509_get_issuer_name(x),buf,256); BIO_printf(bp,"issuer :%s\n",f); Loading @@ -1913,10 +1915,9 @@ static void write_new_certificate(BIO *bp, X509 *x, int output_der) BIO_puts(bp,"serial :"); i2a_ASN1_INTEGER(bp,x->cert_info->serialNumber); BIO_puts(bp,"\n\n"); X509_print(bp,x); BIO_puts(bp,"\n"); #endif if(!notext)X509_print(bp,x); PEM_write_bio_X509(bp,x); BIO_puts(bp,"\n"); } static int certify_spkac(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509, Loading apps/dsaparam.c +5 −6 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ * -genkey */ static void MS_CALLBACK dsa_cb(int p, int n, char *arg); static void MS_CALLBACK dsa_cb(int p, int n, void *arg); int MAIN(int argc, char **argv) { DSA *dsa=NULL; Loading Loading @@ -225,8 +225,7 @@ bad: assert(need_rand); BIO_printf(bio_err,"Generating DSA parameters, %d bit long prime\n",num); BIO_printf(bio_err,"This could take some time\n"); dsa=DSA_generate_parameters(num,NULL,0,NULL,NULL, dsa_cb,(char *)bio_err); dsa=DSA_generate_parameters(num,NULL,0,NULL,NULL, dsa_cb,bio_err); } else if (informat == FORMAT_ASN1) dsa=d2i_DSAparams_bio(in,NULL); Loading Loading @@ -350,7 +349,7 @@ end: EXIT(ret); } static void MS_CALLBACK dsa_cb(int p, int n, char *arg) static void MS_CALLBACK dsa_cb(int p, int n, void *arg) { char c='*'; Loading @@ -358,8 +357,8 @@ static void MS_CALLBACK dsa_cb(int p, int n, char *arg) if (p == 1) c='+'; if (p == 2) c='*'; if (p == 3) c='\n'; BIO_write((BIO *)arg,&c,1); (void)BIO_flush((BIO *)arg); BIO_write(arg,&c,1); (void)BIO_flush(arg); #ifdef LINT p=n; #endif Loading apps/rsa.c +1 −1 Original line number Diff line number Diff line Loading @@ -271,7 +271,7 @@ bad: } } p=(unsigned char *)buf->data; rsa=(RSA *)d2i_Netscape_RSA(NULL,&p,(long)size,NULL); rsa=d2i_Netscape_RSA(NULL,&p,(long)size,NULL); BUF_MEM_free(buf); } #endif Loading apps/s_client.c +1 −1 Original line number Diff line number Diff line Loading @@ -376,7 +376,7 @@ bad: } con=(SSL *)SSL_new(ctx); con=SSL_new(ctx); /* SSL_set_cipher_list(con,"RC4-MD5"); */ re_start: Loading Loading
CHANGES +3 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,9 @@ Changes between 0.9.4 and 0.9.5 [xx XXX 2000] *) Add a new -notext option to 'ca' and a -pubkey option to 'spkac'. [Steve Henson] *) Use a less unusual form of the Miller-Rabin primality test (it used a binary algorithm for exponentiation integrated into the Miller-Rabin loop, our standard modexp algorithms are faster). Loading
apps/ca.c +11 −10 Original line number Diff line number Diff line Loading @@ -200,7 +200,7 @@ static int certify_spkac(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509, char *enddate, int days, char *ext_sect,LHASH *conf, int verbose); static int fix_data(int nid, int *type); static void write_new_certificate(BIO *bp, X509 *x, int output_der); static void write_new_certificate(BIO *bp, X509 *x, int output_der, int notext); static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst, STACK_OF(CONF_VALUE) *policy, TXT_DB *db, BIGNUM *serial, char *startdate, char *enddate, int days, int batch, int verbose, Loading Loading @@ -247,6 +247,7 @@ int MAIN(int argc, char **argv) char *enddate=NULL; int days=0; int batch=0; int notext=0; X509 *x509=NULL; X509 *x=NULL; BIO *in=NULL,*out=NULL,*Sout=NULL,*Cout=NULL; Loading Loading @@ -357,6 +358,8 @@ EF_ALIGNMENT=0; if (--argc < 1) goto bad; outdir= *(++argv); } else if (strcmp(*argv,"-notext") == 0) notext=1; else if (strcmp(*argv,"-batch") == 0) batch=1; else if (strcmp(*argv,"-preserveDN") == 0) Loading Loading @@ -984,8 +987,8 @@ bad: perror(buf[2]); goto err; } write_new_certificate(Cout,x, 0); write_new_certificate(Sout,x, output_der); write_new_certificate(Cout,x, 0, notext); write_new_certificate(Sout,x, output_der, notext); } if (sk_num(cert_sk)) Loading Loading @@ -1893,17 +1896,16 @@ err: return(ok); } static void write_new_certificate(BIO *bp, X509 *x, int output_der) static void write_new_certificate(BIO *bp, X509 *x, int output_der, int notext) { char *f; char buf[256]; if (output_der) { (void)i2d_X509_bio(bp,x); return; } #if 0 /* ??? Not needed since X509_print prints all this stuff anyway */ f=X509_NAME_oneline(X509_get_issuer_name(x),buf,256); BIO_printf(bp,"issuer :%s\n",f); Loading @@ -1913,10 +1915,9 @@ static void write_new_certificate(BIO *bp, X509 *x, int output_der) BIO_puts(bp,"serial :"); i2a_ASN1_INTEGER(bp,x->cert_info->serialNumber); BIO_puts(bp,"\n\n"); X509_print(bp,x); BIO_puts(bp,"\n"); #endif if(!notext)X509_print(bp,x); PEM_write_bio_X509(bp,x); BIO_puts(bp,"\n"); } static int certify_spkac(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509, Loading
apps/dsaparam.c +5 −6 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ * -genkey */ static void MS_CALLBACK dsa_cb(int p, int n, char *arg); static void MS_CALLBACK dsa_cb(int p, int n, void *arg); int MAIN(int argc, char **argv) { DSA *dsa=NULL; Loading Loading @@ -225,8 +225,7 @@ bad: assert(need_rand); BIO_printf(bio_err,"Generating DSA parameters, %d bit long prime\n",num); BIO_printf(bio_err,"This could take some time\n"); dsa=DSA_generate_parameters(num,NULL,0,NULL,NULL, dsa_cb,(char *)bio_err); dsa=DSA_generate_parameters(num,NULL,0,NULL,NULL, dsa_cb,bio_err); } else if (informat == FORMAT_ASN1) dsa=d2i_DSAparams_bio(in,NULL); Loading Loading @@ -350,7 +349,7 @@ end: EXIT(ret); } static void MS_CALLBACK dsa_cb(int p, int n, char *arg) static void MS_CALLBACK dsa_cb(int p, int n, void *arg) { char c='*'; Loading @@ -358,8 +357,8 @@ static void MS_CALLBACK dsa_cb(int p, int n, char *arg) if (p == 1) c='+'; if (p == 2) c='*'; if (p == 3) c='\n'; BIO_write((BIO *)arg,&c,1); (void)BIO_flush((BIO *)arg); BIO_write(arg,&c,1); (void)BIO_flush(arg); #ifdef LINT p=n; #endif Loading
apps/rsa.c +1 −1 Original line number Diff line number Diff line Loading @@ -271,7 +271,7 @@ bad: } } p=(unsigned char *)buf->data; rsa=(RSA *)d2i_Netscape_RSA(NULL,&p,(long)size,NULL); rsa=d2i_Netscape_RSA(NULL,&p,(long)size,NULL); BUF_MEM_free(buf); } #endif Loading
apps/s_client.c +1 −1 Original line number Diff line number Diff line Loading @@ -376,7 +376,7 @@ bad: } con=(SSL *)SSL_new(ctx); con=SSL_new(ctx); /* SSL_set_cipher_list(con,"RC4-MD5"); */ re_start: Loading