* (see e_os.h). The string is
* destroyed! */
-#define MAIN(a,v) PROG(a,v)
extern CONF *config;
extern char *default_config_file;
extern BIO *bio_err;
* -oid file - extra oid description file
*/
-#undef PROG
-#define PROG asn1parse_main
-int MAIN(int, char **);
+int asn1parse_main(int, char **);
static int do_generate(BIO * bio, char *genstr, char *genconf, BUF_MEM * buf);
int
-MAIN(int argc, char **argv)
+asn1parse_main(int argc, char **argv)
{
int i, badops = 0, offset = 0, ret = 1, j;
unsigned int length = 0;
#define R_OK 4
#endif
-#undef PROG
-#define PROG ca_main
#define BASE_SECTION "ca"
#define CONFIG_FILE "openssl.cnf"
static int msie_hack = 0;
- int MAIN(int, char **);
+ int ca_main(int, char **);
int
- MAIN(int argc, char **argv)
+ ca_main(int argc, char **argv)
{
ENGINE *e = NULL;
char *key = NULL, *passargin = NULL;
#include <openssl/err.h>
#include <openssl/ssl.h>
-#undef PROG
-#define PROG ciphers_main
static const char *ciphers_usage[] = {
"usage: ciphers args\n",
NULL
};
-int MAIN(int, char **);
+int ciphers_main(int, char **);
int
-MAIN(int argc, char **argv)
+ciphers_main(int argc, char **argv)
{
int ret = 1, i;
int verbose = 0, Verbose = 0;
#include <openssl/x509v3.h>
#include <openssl/cms.h>
-#undef PROG
-#define PROG cms_main
static int save_certs(char *signerfile, STACK_OF(X509) * signers);
static int cms_cb(int ok, X509_STORE_CTX * ctx);
static void receipt_request_print(BIO * out, CMS_ContentInfo * cms);
int verify_err = 0;
- int MAIN(int, char **);
+ int cms_main(int, char **);
int
- MAIN(int argc, char **argv)
+ cms_main(int argc, char **argv)
{
ENGINE *e = NULL;
int operation = 0;
#include <openssl/x509v3.h>
#include <openssl/pem.h>
-#undef PROG
-#define PROG crl_main
#undef POSTFIX
#define POSTFIX ".rvk"
static X509_CRL *load_crl(char *file, int format);
static BIO *bio_out = NULL;
-int MAIN(int, char **);
+int crl_main(int, char **);
int
-MAIN(int argc, char **argv)
+crl_main(int argc, char **argv)
{
unsigned long nmflag = 0;
X509_CRL *x = NULL;
#include <openssl/objects.h>
static int add_certs_from_file(STACK_OF(X509) * stack, char *certfile);
-#undef PROG
-#define PROG crl2pkcs7_main
/* -inform arg - input format - default PEM (DER or PEM)
* -outform arg - output format - default PEM
* -out arg - output file - default stdout
*/
-int MAIN(int, char **);
+int crl2pkcs7_main(int, char **);
int
-MAIN(int argc, char **argv)
+crl2pkcs7_main(int argc, char **argv)
{
int i, badops = 0;
BIO *in = NULL, *out = NULL;
#undef BUFSIZE
#define BUFSIZE 1024*8
-#undef PROG
-#define PROG dgst_main
int
do_fp(BIO * out, unsigned char *buf, BIO * bp, int sep, int binout,
mname, mname);
}
-int MAIN(int, char **);
+int dgst_main(int, char **);
int
-MAIN(int argc, char **argv)
+dgst_main(int argc, char **argv)
{
ENGINE *e = NULL;
unsigned char *buf = NULL;
#include <openssl/x509.h>
#include <openssl/pem.h>
-#undef PROG
-#define PROG dh_main
/* -inform arg - input format - default PEM (DER or PEM)
* -outform arg - output format - default PEM
* -C
*/
-int MAIN(int, char **);
+int dh_main(int, char **);
int
-MAIN(int argc, char **argv)
+dh_main(int argc, char **argv)
{
DH *dh = NULL;
int i, badops = 0, text = 0;
#include <openssl/dsa.h>
#endif
-#undef PROG
-#define PROG dhparam_main
#define DEFBITS 512
static int dh_cb(int p, int n, BN_GENCB * cb);
-int MAIN(int, char **);
+int dhparam_main(int, char **);
int
-MAIN(int argc, char **argv)
+dhparam_main(int argc, char **argv)
{
DH *dh = NULL;
int i, badops = 0, text = 0;
#include <openssl/pem.h>
#include <openssl/bn.h>
-#undef PROG
-#define PROG dsa_main
/* -inform arg - input format - default PEM (one of DER, NET or PEM)
* -outform arg - output format - default PEM
* -modulus - print the DSA public key
*/
-int MAIN(int, char **);
+int dsa_main(int, char **);
int
-MAIN(int argc, char **argv)
+dsa_main(int argc, char **argv)
{
ENGINE *e = NULL;
int ret = 1;
#include <openssl/x509.h>
#include <openssl/pem.h>
-#undef PROG
-#define PROG dsaparam_main
/* -inform arg - input format - default PEM (DER or PEM)
* -outform arg - output format - default PEM
static int dsa_cb(int p, int n, BN_GENCB * cb);
-int MAIN(int, char **);
+int dsaparam_main(int, char **);
int
-MAIN(int argc, char **argv)
+dsaparam_main(int argc, char **argv)
{
DSA *dsa = NULL;
int i, badops = 0, text = 0;
#include <openssl/evp.h>
#include <openssl/pem.h>
-#undef PROG
-#define PROG ec_main
/* -inform arg - input format - default PEM (one of DER, NET or PEM)
* -outform arg - output format - default PEM
* -param_enc arg - specifies the parameter encoding
*/
-int MAIN(int, char **);
+int ec_main(int, char **);
int
-MAIN(int argc, char **argv)
+ec_main(int argc, char **argv)
{
int ret = 1;
EC_KEY *eckey = NULL;
#include <openssl/x509.h>
#include <openssl/pem.h>
-#undef PROG
-#define PROG ecparam_main
/* -inform arg - input format - default PEM (DER or PEM)
* -outform arg - output format - default PEM
static int ecparam_print_var(BIO *, BIGNUM *, const char *, int, unsigned char *);
-int MAIN(int, char **);
+int ecparam_main(int, char **);
int
-MAIN(int argc, char **argv)
+ecparam_main(int argc, char **argv)
{
EC_GROUP *group = NULL;
point_conversion_form_t form = POINT_CONVERSION_UNCOMPRESSED;
int set_hex(char *in, unsigned char *out, int size);
#undef SIZE
#undef BSIZE
-#undef PROG
#define SIZE (512)
#define BSIZE (8*1024)
BIO_printf(bio, " ");
}
-int MAIN(int, char **);
+int enc_main(int, char **);
int
-MAIN(int argc, char **argv)
+enc_main(int argc, char **argv)
{
static const char magic[] = "Salted__";
char mbuf[sizeof magic - 1];
#include <openssl/engine.h>
#include <openssl/ssl.h>
-#undef PROG
-#define PROG engine_main
static const char *engine_usage[] = {
"usage: engine opts [engine ...]\n",
}
}
-int MAIN(int, char **);
+int engine_main(int, char **);
int
-MAIN(int argc, char **argv)
+engine_main(int argc, char **argv)
{
int ret = 1, i;
const char **pp;
#include <openssl/err.h>
#include <openssl/ssl.h>
-#undef PROG
-#define PROG errstr_main
-int MAIN(int, char **);
+int errstr_main(int, char **);
int
-MAIN(int argc, char **argv)
+errstr_main(int argc, char **argv)
{
int i, ret = 0;
char buf[256];
#include <openssl/pem.h>
#define DEFBITS 512
-#undef PROG
-#define PROG gendh_main
static int dh_cb(int p, int n, BN_GENCB * cb);
-int MAIN(int, char **);
+int gendh_main(int, char **);
int
-MAIN(int argc, char **argv)
+gendh_main(int argc, char **argv)
{
BN_GENCB cb;
DH *dh = NULL;
#include <openssl/pem.h>
#define DEFBITS 512
-#undef PROG
-#define PROG gendsa_main
-int MAIN(int, char **);
+int gendsa_main(int, char **);
int
-MAIN(int argc, char **argv)
+gendsa_main(int argc, char **argv)
{
DSA *dsa = NULL;
int ret = 1;
ENGINE * e);
static int genpkey_cb(EVP_PKEY_CTX * ctx);
-#define PROG genpkey_main
-int MAIN(int, char **);
+int genpkey_main(int, char **);
int
-MAIN(int argc, char **argv)
+genpkey_main(int argc, char **argv)
{
ENGINE *e = NULL;
char **args, *outfile = NULL;
#include <openssl/rand.h>
#define DEFBITS 1024
-#undef PROG
-#define PROG genrsa_main
static int genrsa_cb(int p, int n, BN_GENCB * cb);
-int MAIN(int, char **);
+int genrsa_main(int, char **);
int
-MAIN(int argc, char **argv)
+genrsa_main(int argc, char **argv)
{
BN_GENCB cb;
#ifndef OPENSSL_NO_ENGINE
#include <openssl/pem.h>
#include <openssl/err.h>
-#undef PROG
-#define PROG nseq_main
-int MAIN(int, char **);
+int nseq_main(int, char **);
int
-MAIN(int argc, char **argv)
+nseq_main(int argc, char **argv)
{
char **args, *infile = NULL, *outfile = NULL;
BIO *in = NULL, *out = NULL;
STACK_OF(CONF_VALUE) * headers,
OCSP_REQUEST * req, int req_timeout);
-#undef PROG
-#define PROG ocsp_main
- int MAIN(int, char **);
+ int ocsp_main(int, char **);
- int MAIN(int argc, char **argv)
+ int ocsp_main(int argc, char **argv)
{
ENGINE *e = NULL;
char **args;
#endif
-#undef PROG
-#define PROG passwd_main
static unsigned const char cov_2char[64] = {
* -reverse - switch table columns
*/
-int MAIN(int, char **);
+int passwd_main(int, char **);
int
-MAIN(int argc, char **argv)
+passwd_main(int argc, char **argv)
{
int ret = 1;
char *infile = NULL;
#else
int
-MAIN(int argc, char **argv)
+passwd_main(int argc, char **argv)
{
fputs("Program not available.\n", stderr)
return (1);
#include <openssl/pem.h>
#include <openssl/pkcs12.h>
-#define PROG pkcs12_main
const EVP_CIPHER *enc;
int cert_load(BIO * in, STACK_OF(X509) * sk);
static int set_pbe(BIO * err, int *ppbe, const char *str);
- int MAIN(int, char **);
+ int pkcs12_main(int, char **);
- int MAIN(int argc, char **argv)
+ int pkcs12_main(int argc, char **argv)
{
ENGINE *e = NULL;
char *infile = NULL, *outfile = NULL, *keyname = NULL;
#include <openssl/pkcs7.h>
#include <openssl/pem.h>
-#undef PROG
-#define PROG pkcs7_main
/* -inform arg - input format - default PEM (DER or PEM)
* -outform arg - output format - default PEM
* -print_certs
*/
-int MAIN(int, char **);
+int pkcs7_main(int, char **);
int
-MAIN(int argc, char **argv)
+pkcs7_main(int argc, char **argv)
{
PKCS7 *p7 = NULL;
int i, badops = 0;
#include <openssl/evp.h>
#include <openssl/pkcs12.h>
-#define PROG pkcs8_main
-int MAIN(int, char **);
+int pkcs8_main(int, char **);
int
-MAIN(int argc, char **argv)
+pkcs8_main(int argc, char **argv)
{
ENGINE *e = NULL;
char **args, *infile = NULL, *outfile = NULL;
#include <openssl/err.h>
#include <openssl/evp.h>
-#define PROG pkey_main
-int MAIN(int, char **);
+int pkey_main(int, char **);
int
-MAIN(int argc, char **argv)
+pkey_main(int argc, char **argv)
{
ENGINE *e = NULL;
char **args, *infile = NULL, *outfile = NULL;
#include <openssl/err.h>
#include <openssl/evp.h>
-#define PROG pkeyparam_main
-int MAIN(int, char **);
+int pkeyparam_main(int, char **);
int
-MAIN(int argc, char **argv)
+pkeyparam_main(int argc, char **argv)
{
char **args, *infile = NULL, *outfile = NULL;
BIO *in = NULL, *out = NULL;
static void usage(void);
-#undef PROG
-#define PROG pkeyutl_main
static EVP_PKEY_CTX *
init_ctx(int *pkeysize,
unsigned char *out, size_t * poutlen,
unsigned char *in, size_t inlen);
-int MAIN(int argc, char **);
+int pkeyutl_main(int argc, char **);
int
-MAIN(int argc, char **argv)
+pkeyutl_main(int argc, char **argv)
{
BIO *in = NULL, *out = NULL;
char *infile = NULL, *outfile = NULL, *sigfile = NULL;
#include <openssl/bn.h>
-#undef PROG
-#define PROG prime_main
-int MAIN(int, char **);
+int prime_main(int, char **);
int
-MAIN(int argc, char **argv)
+prime_main(int argc, char **argv)
{
int hex = 0;
int checks = 20;
#include <openssl/err.h>
#include <openssl/rand.h>
-#undef PROG
-#define PROG rand_main
/* -out file - write to file
* -rand file:file - PRNG seed files
* num - write 'num' bytes
*/
-int MAIN(int, char **);
+int rand_main(int, char **);
int
-MAIN(int argc, char **argv)
+rand_main(int argc, char **argv)
{
int i, r, ret = 1;
int badopt;
#define DEFAULT_KEY_LENGTH 512
#define MIN_KEY_LENGTH 384
-#undef PROG
-#define PROG req_main
/* -inform arg - input format - default PEM (DER or PEM)
* -outform arg - output format - default PEM
static CONF *req_conf = NULL;
static int batch = 0;
- int MAIN(int, char **);
+ int req_main(int, char **);
- int MAIN(int argc, char **argv)
+ int req_main(int argc, char **argv)
{
ENGINE *e = NULL, *gen_eng = NULL;
unsigned long nmflag = 0, reqflag = 0;
#include <openssl/pem.h>
#include <openssl/bn.h>
-#undef PROG
-#define PROG rsa_main
/* -inform arg - input format - default PEM (one of DER, NET or PEM)
* -outform arg - output format - default PEM
* -pubout - Output a public key.
*/
-int MAIN(int, char **);
+int rsa_main(int, char **);
int
-MAIN(int argc, char **argv)
+rsa_main(int argc, char **argv)
{
ENGINE *e = NULL;
int ret = 1;
static void usage(void);
-#undef PROG
-#define PROG rsautl_main
-int MAIN(int argc, char **);
+int rsautl_main(int argc, char **);
int
-MAIN(int argc, char **argv)
+rsautl_main(int argc, char **argv)
{
ENGINE *e = NULL;
BIO *in = NULL, *out = NULL;
#include "timeouts.h"
-#undef PROG
-#define PROG s_client_main
/*#define SSL_HOST_NAME "www.netscape.com" */
/*#define SSL_HOST_NAME "193.118.187.102" */
PROTO_XMPP
};
-int MAIN(int, char **);
+int s_client_main(int, char **);
int
-MAIN(int argc, char **argv)
+s_client_main(int argc, char **argv)
{
unsigned int off = 0, clr = 0;
SSL *con = NULL;
#ifndef OPENSSL_NO_TLSEXT
#define TEST_CERT2 "server2.pem"
#endif
-#undef PROG
-#define PROG s_server_main
extern int verify_depth, verify_return_error;
#endif
-int MAIN(int, char **);
+int s_server_main(int, char **);
#ifndef OPENSSL_NO_JPAKE
static char *jpake_secret = NULL;
#endif
int
-MAIN(int argc, char *argv[])
+s_server_main(int argc, char *argv[])
{
X509_VERIFY_PARAM *vpm = NULL;
int badarg = 0;
#endif
#include <unistd.h>
-#undef PROG
-#define PROG s_time_main
#define SSL_CONNECT_NAME "localhost:4433"
* MAIN - main processing area for client
* real name depends on MONOLITH
*/
-int MAIN(int, char **);
+int s_time_main(int, char **);
int
-MAIN(int argc, char **argv)
+s_time_main(int argc, char **argv)
{
double totalTime = 0.0;
int nConn = 0;
#include <openssl/pem.h>
#include <openssl/ssl.h>
-#undef PROG
-#define PROG sess_id_main
static const char *sess_id_usage[] = {
"usage: sess_id args\n",
static SSL_SESSION *load_sess_id(char *file, int format);
-int MAIN(int, char **);
+int sess_id_main(int, char **);
int
-MAIN(int argc, char **argv)
+sess_id_main(int argc, char **argv)
{
SSL_SESSION *x = NULL;
X509 *peer = NULL;
#include <openssl/x509_vfy.h>
#include <openssl/x509v3.h>
-#undef PROG
-#define PROG smime_main
static int save_certs(char *signerfile, STACK_OF(X509) * signers);
static int smime_cb(int ok, X509_STORE_CTX * ctx);
#define SMIME_PK7OUT (5 | SMIME_IP | SMIME_OP)
#define SMIME_RESIGN (6 | SMIME_IP | SMIME_OP | SMIME_SIGNERS)
-int MAIN(int, char **);
+int smime_main(int, char **);
int
-MAIN(int argc, char **argv)
+smime_main(int argc, char **argv)
{
ENGINE *e = NULL;
int operation = 0;
/* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */
/* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */
-#undef PROG
-#define PROG speed_main
#include <stdio.h>
#include <stdlib.h>
#endif /* OPENSSL_NO_ECDH */
-int MAIN(int, char **);
+int speed_main(int, char **);
int
-MAIN(int argc, char **argv)
+speed_main(int argc, char **argv)
{
unsigned char *buf = NULL, *buf2 = NULL;
int mret = 1;
#include <openssl/x509.h>
#include <openssl/pem.h>
-#undef PROG
-#define PROG spkac_main
/* -in arg - input file - default stdin
* -out arg - output file - default stdout
*/
-int MAIN(int, char **);
+int spkac_main(int, char **);
int
-MAIN(int argc, char **argv)
+spkac_main(int argc, char **argv)
{
ENGINE *e = NULL;
int i, badops = 0, ret = 1;
#include "apps.h"
-#undef PROG
-#define PROG srp_main
#define BASE_SECTION "srp"
#define CONFIG_FILE "openssl.cnf"
#define VVERBOSE if (verbose>1)
-int MAIN(int, char **);
+int srp_main(int, char **);
static int
get_index(CA_DB * db, char *id, char type)
}
int
-MAIN(int argc, char **argv)
+srp_main(int argc, char **argv)
{
int add_user = 0;
int list_user = 0;
#include <openssl/ts.h>
#include <openssl/bn.h>
-#undef PROG
-#define PROG ts_main
/* Length of the nonce of the request in bits (must be a multiple of 8). */
#define NONCE_LENGTH 64
static int verify_cb(int ok, X509_STORE_CTX * ctx);
/* Main function definition. */
-int MAIN(int, char **);
+int ts_main(int, char **);
int
-MAIN(int argc, char **argv)
+ts_main(int argc, char **argv)
{
int ret = 1;
char *configfile = NULL;
#include <openssl/x509v3.h>
#include <openssl/pem.h>
-#undef PROG
-#define PROG verify_main
static int cb(int ok, X509_STORE_CTX * ctx);
static int
STACK_OF(X509_CRL) * crls, ENGINE * e);
static int v_verbose = 0, vflags = 0;
- int MAIN(int, char **);
+ int verify_main(int, char **);
- int MAIN(int argc, char **argv)
+ int verify_main(int argc, char **argv)
{
ENGINE *e = NULL;
int i, ret = 1, badarg = 0;
#include <openssl/blowfish.h>
#endif
-#undef PROG
-#define PROG version_main
-int MAIN(int, char **);
+int version_main(int, char **);
int
-MAIN(int argc, char **argv)
+version_main(int argc, char **argv)
{
int i, ret = 0;
int cflags = 0, version = 0, date = 0, options = 0, platform = 0,
#include <openssl/dsa.h>
#endif
-#undef PROG
-#define PROG x509_main
#undef POSTFIX
#define POSTFIX ".srl"
static int purpose_print(BIO * bio, X509 * cert, X509_PURPOSE * pt);
static int reqfile = 0;
- int MAIN(int, char **);
+ int x509_main(int, char **);
- int MAIN(int argc, char **argv)
+ int x509_main(int argc, char **argv)
{
ENGINE *e = NULL;
int ret = 1;