summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>1999-04-26 16:43:10 +0000
committerUlf Möller <ulf@openssl.org>1999-04-26 16:43:10 +0000
commita9be3af5ad4836f7e50f0546311ca90c717b861e (patch)
treef44f7f8c4497d85da4c5cbd08067479bb20ced95 /apps
parent47339f6179fbefafc793c10b0411ed0365497d65 (diff)
Remove NOPROTO definitions and error code comments.
Diffstat (limited to 'apps')
-rw-r--r--apps/apps.c5
-rw-r--r--apps/apps.h9
-rw-r--r--apps/ca.c22
-rw-r--r--apps/crl.c5
-rw-r--r--apps/crl2p7.c5
-rw-r--r--apps/dgst.c5
-rw-r--r--apps/dsaparam.c5
-rw-r--r--apps/enc.c5
-rw-r--r--apps/gendh.c6
-rw-r--r--apps/gendsa.c5
-rw-r--r--apps/genrsa.c6
-rw-r--r--apps/nseq.c4
-rw-r--r--apps/openssl.c8
-rw-r--r--apps/pkcs12.c12
-rw-r--r--apps/progs.h30
-rw-r--r--apps/progs.pl7
-rw-r--r--apps/req.c11
-rw-r--r--apps/s_apps.h23
-rw-r--r--apps/s_client.c6
-rw-r--r--apps/s_server.c16
-rw-r--r--apps/s_socket.c6
-rw-r--r--apps/s_time.c8
-rw-r--r--apps/sc.c6
-rw-r--r--apps/sess_id.c5
-rw-r--r--apps/speed.c12
-rw-r--r--apps/testdsa.h7
-rw-r--r--apps/verify.c6
-rw-r--r--apps/x509.c9
28 files changed, 0 insertions, 254 deletions
diff --git a/apps/apps.c b/apps/apps.c
index ba07016e83..d3d601d9ed 100644
--- a/apps/apps.c
+++ b/apps/apps.c
@@ -69,12 +69,7 @@
# include "bss_file.c"
#endif
-#ifndef NOPROTO
int app_init(long mesgwin);
-#else
-int app_init();
-#endif
-
#ifdef undef /* never finished - probably never will be :-) */
int args_from_file(char *file, int *argc, char **argv[])
{
diff --git a/apps/apps.h b/apps/apps.h
index 3ad21bb9a9..1b108ba8e0 100644
--- a/apps/apps.h
+++ b/apps/apps.h
@@ -127,20 +127,11 @@ typedef struct args_st
int count;
} ARGS;
-#ifndef NOPROTO
int should_retry(int i);
int args_from_file(char *file, int *argc, char **argv[]);
int str2fmt(char *s);
void program_name(char *in,char *out,int size);
int chopup_args(ARGS *arg,char *buf, int *argc, char **argv[]);
-#else
-int should_retry();
-int args_from_file();
-int str2fmt();
-void program_name();
-int chopup_args();
-#endif
-
#define FORMAT_UNDEF 0
#define FORMAT_ASN1 1
#define FORMAT_TEXT 2
diff --git a/apps/ca.c b/apps/ca.c
index 16afb8d7ee..2fe6300216 100644
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -156,7 +156,6 @@ extern int EF_PROTECT_BELOW;
extern int EF_ALIGNMENT;
#endif
-#ifndef NOPROTO
static int add_oid_section(LHASH *conf);
static void lookup_fail(char *name,char *tag);
static int MS_CALLBACK key_callback(char *buf,int len,int verify);
@@ -187,27 +186,6 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
LHASH *conf);
static int do_revoke(X509 *x509, TXT_DB *db);
static int check_time_format(char *str);
-#else
-static int add_oid_section();
-static void lookup_fail();
-static int MS_CALLBACK key_callback();
-static unsigned long index_serial_hash();
-static int index_serial_cmp();
-static unsigned long index_name_hash();
-static int index_name_qual();
-static int index_name_cmp();
-static int fix_data();
-static BIGNUM *load_serial();
-static int save_serial();
-static int certify();
-static int certify_cert();
-static int certify_spkac();
-static void write_new_certificate();
-static int do_body();
-static int do_revoke();
-static int check_time_format();
-#endif
-
static LHASH *conf;
static char *key=NULL;
static char *section=NULL;
diff --git a/apps/crl.c b/apps/crl.c
index cdbee4847d..1b04f68ecf 100644
--- a/apps/crl.c
+++ b/apps/crl.c
@@ -88,12 +88,7 @@ static char *crl_usage[]={
NULL
};
-#ifndef NOPROTO
static X509_CRL *load_crl(char *file, int format);
-#else
-static X509_CRL *load_crl();
-#endif
-
static BIO *bio_out=NULL;
int MAIN(int argc, char **argv)
diff --git a/apps/crl2p7.c b/apps/crl2p7.c
index 12e535a282..611046ecf5 100644
--- a/apps/crl2p7.c
+++ b/apps/crl2p7.c
@@ -72,12 +72,7 @@
#include <openssl/pem.h>
#include <openssl/objects.h>
-#ifndef NOPROTO
static int add_certs_from_file(STACK_OF(X509) *stack, char *certfile);
-#else
-static int add_certs_from_file();
-#endif
-
#undef PROG
#define PROG crl2pkcs7_main
diff --git a/apps/dgst.c b/apps/dgst.c
index 82bb20a8be..2f87147a81 100644
--- a/apps/dgst.c
+++ b/apps/dgst.c
@@ -73,12 +73,7 @@
#undef PROG
#define PROG dgst_main
-#ifndef NOPROTO
void do_fp(unsigned char *buf,BIO *f,int sep);
-#else
-void do_fp();
-#endif
-
int MAIN(int argc, char **argv)
{
unsigned char *buf=NULL;
diff --git a/apps/dsaparam.c b/apps/dsaparam.c
index e733b53db4..bd368a3a30 100644
--- a/apps/dsaparam.c
+++ b/apps/dsaparam.c
@@ -83,12 +83,7 @@
* -genkey
*/
-#ifndef NOPROTO
static void MS_CALLBACK dsa_cb(int p, int n, char *arg);
-#else
-static void MS_CALLBACK dsa_cb();
-#endif
-
int MAIN(int argc, char **argv)
{
DSA *dsa=NULL;
diff --git a/apps/enc.c b/apps/enc.c
index 84a81ffb23..ce5f7f0638 100644
--- a/apps/enc.c
+++ b/apps/enc.c
@@ -70,12 +70,7 @@
#endif
#include <openssl/pem.h>
-#ifndef NOPROTO
int set_hex(char *in,unsigned char *out,int size);
-#else
-int set_hex();
-#endif
-
#undef SIZE
#undef BSIZE
#undef PROG
diff --git a/apps/gendh.c b/apps/gendh.c
index c69147e370..e3be0827c1 100644
--- a/apps/gendh.c
+++ b/apps/gendh.c
@@ -73,14 +73,8 @@
#undef PROG
#define PROG gendh_main
-#ifndef NOPROTO
static void MS_CALLBACK dh_cb(int p, int n, char *arg);
static long dh_load_rand(char *names);
-#else
-static void MS_CALLBACK dh_cb();
-static long dh_load_rand();
-#endif
-
int MAIN(int argc, char **argv)
{
char buffer[200];
diff --git a/apps/gendsa.c b/apps/gendsa.c
index db641da503..e43fd6a3a2 100644
--- a/apps/gendsa.c
+++ b/apps/gendsa.c
@@ -73,12 +73,7 @@
#undef PROG
#define PROG gendsa_main
-#ifndef NOPROTO
static long dsa_load_rand(char *names);
-#else
-static long dsa_load_rand();
-#endif
-
int MAIN(int argc, char **argv)
{
char buffer[200];
diff --git a/apps/genrsa.c b/apps/genrsa.c
index 30f1618f18..2218fb06d2 100644
--- a/apps/genrsa.c
+++ b/apps/genrsa.c
@@ -74,14 +74,8 @@
#undef PROG
#define PROG genrsa_main
-#ifndef NOPROTO
static void MS_CALLBACK genrsa_cb(int p, int n, char *arg);
static long gr_load_rand(char *names);
-#else
-static void MS_CALLBACK genrsa_cb();
-static long gr_load_rand();
-#endif
-
int MAIN(int argc, char **argv)
{
int ret=1;
diff --git a/apps/nseq.c b/apps/nseq.c
index 9c84d93b81..5e74082cad 100644
--- a/apps/nseq.c
+++ b/apps/nseq.c
@@ -65,11 +65,7 @@
#undef PROG
#define PROG nseq_main
-#ifdef NOPROTO
static int dump_cert_text(BIO *out, X509 *x);
-#else
-static int dump_cert_text();
-#endif
int MAIN(int argc, char **argv)
{
diff --git a/apps/openssl.c b/apps/openssl.c
index bae0c4f004..ebc2885a3b 100644
--- a/apps/openssl.c
+++ b/apps/openssl.c
@@ -83,18 +83,10 @@
#endif
*/
-#ifndef NOPROTO
static unsigned long MS_CALLBACK hash(FUNCTION *a);
static int MS_CALLBACK cmp(FUNCTION *a,FUNCTION *b);
static LHASH *prog_init(void );
static int do_cmd(LHASH *prog,int argc,char *argv[]);
-#else
-static unsigned long MS_CALLBACK hash();
-static int MS_CALLBACK cmp();
-static LHASH *prog_init();
-static int do_cmd();
-#endif
-
LHASH *config=NULL;
char *default_config_file=NULL;
diff --git a/apps/pkcs12.c b/apps/pkcs12.c
index 79fd19a69f..95974f8917 100644
--- a/apps/pkcs12.c
+++ b/apps/pkcs12.c
@@ -76,7 +76,6 @@ EVP_CIPHER *enc;
#define CLCERTS 0x8
#define CACERTS 0x10
-#ifndef NOPROTO
int get_cert_chain(X509 *cert, STACK **chain);
int dump_certs_keys_p12(BIO *out, PKCS12 *p12, char *pass, int passlen, int options);
int dump_certs_pkeys_bags(BIO *out, STACK *bags, char *pass, int passlen, int options);
@@ -85,17 +84,6 @@ int print_attribs(BIO *out, STACK *attrlst, char *name);
void hex_prin(BIO *out, unsigned char *buf, int len);
int alg_print(BIO *x, X509_ALGOR *alg);
int cert_load(BIO *in, STACK *sk);
-#else
-int get_cert_chain();
-int dump_certs_keys_p12();
-int dump_certs_pkeys_bags();
-int dump_certs_pkeys_bag();
-int print_attribs();
-void hex_prin();
-int alg_print();
-int cert_load();
-#endif
-
int MAIN(int argc, char **argv)
{
char *infile=NULL, *outfile=NULL, *keyname = NULL;
diff --git a/apps/progs.h b/apps/progs.h
index 216c9d9f2a..f428998922 100644
--- a/apps/progs.h
+++ b/apps/progs.h
@@ -1,6 +1,5 @@
/* This file was generated by progs.pl. */
-#ifndef NOPROTO
extern int verify_main(int argc,char *argv[]);
extern int asn1parse_main(int argc,char *argv[]);
extern int req_main(int argc,char *argv[]);
@@ -28,35 +27,6 @@ extern int sess_id_main(int argc,char *argv[]);
extern int ciphers_main(int argc,char *argv[]);
extern int nseq_main(int argc,char *argv[]);
extern int pkcs12_main(int argc,char *argv[]);
-#else
-extern int verify_main();
-extern int asn1parse_main();
-extern int req_main();
-extern int dgst_main();
-extern int dh_main();
-extern int enc_main();
-extern int gendh_main();
-extern int errstr_main();
-extern int ca_main();
-extern int crl_main();
-extern int rsa_main();
-extern int dsa_main();
-extern int dsaparam_main();
-extern int x509_main();
-extern int genrsa_main();
-extern int gendsa_main();
-extern int s_server_main();
-extern int s_client_main();
-extern int speed_main();
-extern int s_time_main();
-extern int version_main();
-extern int pkcs7_main();
-extern int crl2pkcs7_main();
-extern int sess_id_main();
-extern int ciphers_main();
-extern int nseq_main();
-extern int pkcs12_main();
-#endif
#ifdef SSLEAY_SRC /* Defined only in openssl.c. */
diff --git a/apps/progs.pl b/apps/progs.pl
index 34dcac1681..16ce5ed562 100644
--- a/apps/progs.pl
+++ b/apps/progs.pl
@@ -2,17 +2,10 @@
print "/* This file was generated by progs.pl. */\n\n";
-print "#ifndef NOPROTO\n";
-
grep(s/^asn1pars$/asn1parse/,@ARGV);
foreach (@ARGV)
{ printf "extern int %s_main(int argc,char *argv[]);\n",$_; }
-print "#else\n";
-foreach (@ARGV)
- { printf "extern int %s_main();\n",$_; }
-print "#endif\n";
-
print <<'EOF';
diff --git a/apps/req.c b/apps/req.c
index 78a50a5525..5678b707f8 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -107,7 +107,6 @@
* require. This format is wrong
*/
-#ifndef NOPROTO
static int make_REQ(X509_REQ *req,EVP_PKEY *pkey,int attribs);
static int add_attribute_object(STACK *n, char *text, char *def,
char *value, int nid,int min,int max);
@@ -117,16 +116,6 @@ static void MS_CALLBACK req_cb(int p,int n,char *arg);
static int req_fix_data(int nid,int *type,int len,int min,int max);
static int check_end(char *str, char *end);
static int add_oid_section(LHASH *conf);
-#else
-static int make_REQ();
-static int add_attribute_object();
-static int add_DN_object();
-static void MS_CALLBACK req_cb();
-static int req_fix_data();
-static int check_end();
-static int add_oid_section();
-#endif
-
#ifndef MONOLITH
static char *default_config_file=NULL;
static LHASH *config=NULL;
diff --git a/apps/s_apps.h b/apps/s_apps.h
index 4ce6725d2b..68d6a73b9b 100644
--- a/apps/s_apps.h
+++ b/apps/s_apps.h
@@ -60,7 +60,6 @@
#define PORT_STR "4433"
#define PROTOCOL "tcp"
-#ifndef NOPROTO
int do_accept(int acc_sock, int *sock, char **host);
int do_server(int port, int *ret, int (*cb) (), char *context);
#ifdef HEADER_X509_H
@@ -95,25 +94,3 @@ void MS_CALLBACK apps_ssl_info_callback(SSL *s, int where, int ret);
void MS_CALLBACK apps_ssl_info_callback(char *s, int where, int ret);
#endif
-#else
-int do_accept();
-int do_server();
-int MS_CALLBACK verify_callback();
-int set_cert_stuff();
-int init_client();
-int init_client_ip();
-int nbio_init_client_ip();
-int nbio_sock_error();
-int spawn();
-int init_server();
-int should_retry();
-void sock_cleanup();
-int extract_port();
-int extract_host_port();
-int host_ip();
-
-long MS_CALLBACK bio_dump_cb();
-void MS_CALLBACK apps_ssl_info_callback();
-
-#endif
-
diff --git a/apps/s_client.c b/apps/s_client.c
index 9e90b483f2..ae3ce3e4e8 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -92,14 +92,8 @@ static int c_Pause=0;
static int c_debug=0;
static int c_showcerts=0;
-#ifndef NOPROTO
static void sc_usage(void);
static void print_stuff(BIO *berr,SSL *con,int full);
-#else
-static void sc_usage();
-static void print_stuff();
-#endif
-
static BIO *bio_c_out=NULL;
static int c_quiet=0;
diff --git a/apps/s_server.c b/apps/s_server.c
index 0198cb8a05..dc218db924 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -74,7 +74,6 @@
#include <openssl/ssl.h>
#include "s_apps.h"
-#ifndef NOPROTO
static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int export,int keylength);
static int sv_body(char *hostname, int s, unsigned char *context);
static int www_body(char *hostname, int s, unsigned char *context);
@@ -87,21 +86,6 @@ static DH *load_dh_param(void );
static DH *get_dh512(void);
#endif
/* static void s_server_init(void);*/
-#else
-static RSA MS_CALLBACK *tmp_rsa_cb();
-static int sv_body();
-static int www_body();
-static void close_accept_socket();
-static void sv_usage();
-static int init_ssl_connection();
-static void print_stats();
-#ifndef NO_DH
-static DH *load_dh_param();
-static DH *get_dh512();
-#endif
-/* static void s_server_init(); */
-#endif
-
#ifndef S_ISDIR
#define S_ISDIR(a) (((a) & _S_IFMT) == _S_IFDIR)
diff --git a/apps/s_socket.c b/apps/s_socket.c
index 9110234ed2..724d48a071 100644
--- a/apps/s_socket.c
+++ b/apps/s_socket.c
@@ -69,14 +69,8 @@
#include "s_apps.h"
#include <openssl/ssl.h>
-#ifndef NOPROTO
static struct hostent *GetHostByName(char *name);
int sock_init(void );
-#else
-static struct hostent *GetHostByName();
-int sock_init();
-#endif
-
#ifdef WIN16
#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
#else
diff --git a/apps/s_time.c b/apps/s_time.c
index 187c09d12e..ae16192f5e 100644
--- a/apps/s_time.c
+++ b/apps/s_time.c
@@ -151,18 +151,10 @@ struct tms {
extern int verify_depth;
extern int verify_error;
-#ifndef NOPROTO
static void s_time_usage(void);
static int parseArgs( int argc, char **argv );
static SSL *doConnection( SSL *scon );
static void s_time_init(void);
-#else
-static void s_time_usage();
-static int parseArgs();
-static SSL *doConnection();
-static void s_time_init();
-#endif
-
/***********************************************************************
* Static data declarations
diff --git a/apps/sc.c b/apps/sc.c
index e6da658f06..d1b6af6787 100644
--- a/apps/sc.c
+++ b/apps/sc.c
@@ -99,14 +99,8 @@ static int c_nbio=0;
static int c_Pause=0;
static int c_debug=0;
-#ifndef NOPROTO
static void sc_usage(void);
static void print_stuff(BIO *berr,SSL *con,int full);
-#else
-static void sc_usage();
-static void print_stuff();
-#endif
-
static BIO *bio_c_out=NULL;
static int c_quiet=0;
diff --git a/apps/sess_id.c b/apps/sess_id.c
index 11cf837267..eb84e2528d 100644
--- a/apps/sess_id.c
+++ b/apps/sess_id.c
@@ -83,12 +83,7 @@ static char *sess_id_usage[]={
NULL
};
-#ifndef NOPROTO
static SSL_SESSION *load_sess_id(char *file, int format);
-#else
-static SSL_SESSION *load_sess_id();
-#endif
-
int MAIN(int argc, char **argv)
{
SSL_SESSION *x=NULL;
diff --git a/apps/speed.c b/apps/speed.c
index d6ee53e9fe..ce489e6055 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -181,16 +181,9 @@ struct tms {
#define BUFSIZE ((long)1024*8+1)
int run=0;
-#ifndef NOPROTO
static double Time_F(int s);
static void print_message(char *s,long num,int length);
static void pkey_print_message(char *str,char *str2,long num,int bits,int sec);
-#else
-static double Time_F();
-static void print_message();
-static void pkey_print_message();
-#endif
-
#ifdef SIGALRM
#if defined(__STDC__) || defined(sgi) || defined(_AIX)
#define SIGRETTYPE void
@@ -198,12 +191,7 @@ static void pkey_print_message();
#define SIGRETTYPE int
#endif
-#ifndef NOPROTO
static SIGRETTYPE sig_done(int sig);
-#else
-static SIGRETTYPE sig_done();
-#endif
-
static SIGRETTYPE sig_done(int sig)
{
signal(SIGALRM,sig_done);
diff --git a/apps/testdsa.h b/apps/testdsa.h
index 8e8aea617a..a322978f8c 100644
--- a/apps/testdsa.h
+++ b/apps/testdsa.h
@@ -1,14 +1,7 @@
/* NOCW */
-#ifndef NOPROTO
DSA *get_dsa512(void );
DSA *get_dsa1024(void );
DSA *get_dsa2048(void );
-#else
-DSA *get_dsa512();
-DSA *get_dsa1024();
-DSA *get_dsa2048();
-#endif
-
static unsigned char dsa512_p[]={
0x9D,0x1B,0x69,0x8E,0x26,0xDB,0xF2,0x2B,0x11,0x70,0x19,0x86,
0xF6,0x19,0xC8,0xF8,0x19,0xF2,0x18,0x53,0x94,0x46,0x06,0xD0,
diff --git a/apps/verify.c b/apps/verify.c
index aa6ee03a1d..119709f5b4 100644
--- a/apps/verify.c
+++ b/apps/verify.c
@@ -68,14 +68,8 @@
#undef PROG
#define PROG verify_main
-#ifndef NOPROTO
static int MS_CALLBACK cb(int ok, X509_STORE_CTX *ctx);
static int check(X509_STORE *ctx,char *file);
-#else
-static int MS_CALLBACK cb();
-static int check();
-#endif
-
static int v_verbose=0;
int MAIN(int argc, char **argv)
diff --git a/apps/x509.c b/apps/x509.c
index f336f24077..01fabbb4bf 100644
--- a/apps/x509.c
+++ b/apps/x509.c
@@ -117,7 +117,6 @@ static char *x509_usage[]={
NULL
};
-#ifndef NOPROTO
static int MS_CALLBACK callb(int ok, X509_STORE_CTX *ctx);
static EVP_PKEY *load_key(char *file, int format);
static X509 *load_cert(char *file, int format);
@@ -125,14 +124,6 @@ static int sign (X509 *x, EVP_PKEY *pkey,int days,const EVP_MD *digest);
static int x509_certify (X509_STORE *ctx,char *CAfile,const EVP_MD *digest,
X509 *x,X509 *xca,EVP_PKEY *pkey,char *serial,
int create,int days);
-#else
-static int MS_CALLBACK callb();
-static EVP_PKEY *load_key();
-static X509 *load_cert();
-static int sign ();
-static int x509_certify ();
-#endif
-
static int reqfile=0;
int MAIN(int argc, char **argv)