static int cms_cb(int ok, X509_STORE_CTX * ctx);
static void receipt_request_print(BIO * out, CMS_ContentInfo * cms);
static CMS_ReceiptRequest *
-make_receipt_request(STACK_OF(OPENSSL_STRING) * rr_to,
+ make_receipt_request(STACK_OF(OPENSSL_STRING) * rr_to,
int rr_allorfirst,
STACK_OF(OPENSSL_STRING) * rr_from);
#define SMIME_SIGN_RECEIPT (15 | SMIME_IP | SMIME_OP)
#define SMIME_VERIFY_RECEIPT (16 | SMIME_IP)
- int verify_err = 0;
+int verify_err = 0;
- int cms_main(int, char **);
+int cms_main(int, char **);
- int
- cms_main(int argc, char **argv)
+int
+cms_main(int argc, char **argv)
{
ENGINE *e = NULL;
int operation = 0;
}
static
-STACK_OF(GENERAL_NAMES) * make_names_stack(STACK_OF(OPENSSL_STRING) * ns)
+STACK_OF(GENERAL_NAMES) *
+make_names_stack(STACK_OF(OPENSSL_STRING) * ns)
{
int i;
STACK_OF(GENERAL_NAMES) * ret;
static int
add_ocsp_cert(OCSP_REQUEST ** req, X509 * cert, const EVP_MD * cert_id_md, X509 * issuer,
STACK_OF(OCSP_CERTID) * ids);
- static int add_ocsp_serial(OCSP_REQUEST ** req, char *serial, const EVP_MD * cert_id_md, X509 * issuer,
- STACK_OF(OCSP_CERTID) * ids);
- static int print_ocsp_summary(BIO * out, OCSP_BASICRESP * bs, OCSP_REQUEST * req,
+static int add_ocsp_serial(OCSP_REQUEST ** req, char *serial, const EVP_MD * cert_id_md, X509 * issuer,
+ STACK_OF(OCSP_CERTID) * ids);
+static int print_ocsp_summary(BIO * out, OCSP_BASICRESP * bs, OCSP_REQUEST * req,
STACK_OF(OPENSSL_STRING) * names,
STACK_OF(OCSP_CERTID) * ids, long nsec,
long maxage);
- static int make_ocsp_response(OCSP_RESPONSE ** resp, OCSP_REQUEST * req, CA_DB * db,
- X509 * ca, X509 * rcert, EVP_PKEY * rkey,
+static int make_ocsp_response(OCSP_RESPONSE ** resp, OCSP_REQUEST * req, CA_DB * db,
+ X509 * ca, X509 * rcert, EVP_PKEY * rkey,
STACK_OF(X509) * rother, unsigned long flags,
int nmin, int ndays);
- static char **lookup_serial(CA_DB * db, ASN1_INTEGER * ser);
- static BIO *init_responder(char *port);
- static int do_responder(OCSP_REQUEST ** preq, BIO ** pcbio, BIO * acbio, char *port);
- static int send_ocsp_response(BIO * cbio, OCSP_RESPONSE * resp);
- static OCSP_RESPONSE *query_responder(BIO * err, BIO * cbio, char *path,
+static char **lookup_serial(CA_DB * db, ASN1_INTEGER * ser);
+static BIO *init_responder(char *port);
+static int do_responder(OCSP_REQUEST ** preq, BIO ** pcbio, BIO * acbio, char *port);
+static int send_ocsp_response(BIO * cbio, OCSP_RESPONSE * resp);
+static OCSP_RESPONSE *query_responder(BIO * err, BIO * cbio, char *path,
STACK_OF(CONF_VALUE) * headers,
OCSP_REQUEST * req, int req_timeout);
- int ocsp_main(int, char **);
+int ocsp_main(int, char **);
- int ocsp_main(int argc, char **argv)
+int
+ocsp_main(int argc, char **argv)
{
ENGINE *e = NULL;
char **args;
#define CACERTS 0x10
int get_cert_chain(X509 * cert, X509_STORE * store, STACK_OF(X509) ** chain);
-int dump_certs_keys_p12(BIO * out, PKCS12 * p12, char *pass, int passlen, int options, char *pempass);
-int
-dump_certs_pkeys_bags(BIO * out, STACK_OF(PKCS12_SAFEBAG) * bags, char *pass,
+int dump_certs_keys_p12(BIO * out, PKCS12 * p12, char *pass, int passlen,
+ int options, char *pempass);
+int dump_certs_pkeys_bags(BIO * out, STACK_OF(PKCS12_SAFEBAG) * bags, char *pass,
int passlen, int options, char *pempass);
- int dump_certs_pkeys_bag(BIO * out, PKCS12_SAFEBAG * bags, char *pass, int passlen, int options, char *pempass);
- int print_attribs(BIO * out, STACK_OF(X509_ATTRIBUTE) * attrlst, const 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_OF(X509) * sk);
- static int set_pbe(BIO * err, int *ppbe, const char *str);
-
- int pkcs12_main(int, char **);
-
- int pkcs12_main(int argc, char **argv)
+int dump_certs_pkeys_bag(BIO * out, PKCS12_SAFEBAG * bags, char *pass, int passlen,
+ int options, char *pempass);
+int print_attribs(BIO * out, STACK_OF(X509_ATTRIBUTE) * attrlst, const 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_OF(X509) * sk);
+static int set_pbe(BIO * err, int *ppbe, const char *str);
+
+int pkcs12_main(int, char **);
+
+int
+pkcs12_main(int argc, char **argv)
{
ENGINE *e = NULL;
char *infile = NULL, *outfile = NULL, *keyname = NULL;
-static EVP_PKEY_CTX *
-init_ctx(int *pkeysize,
+static EVP_PKEY_CTX *init_ctx(int *pkeysize,
char *keyfile, int keyform, int key_type,
char *passargin, int pkey_op, ENGINE * e);
-static int
-setup_peer(BIO * err, EVP_PKEY_CTX * ctx, int peerform,
+static int setup_peer(BIO * err, EVP_PKEY_CTX * ctx, int peerform,
const char *file);
-static int
-do_keyop(EVP_PKEY_CTX * ctx, int pkey_op,
+static int do_keyop(EVP_PKEY_CTX * ctx, int pkey_op,
unsigned char *out, size_t * poutlen,
unsigned char *in, size_t inlen);
* require. This format is wrong
*/
-static int
-make_REQ(X509_REQ * req, EVP_PKEY * pkey, char *dn, int mutlirdn,
+static int make_REQ(X509_REQ * req, EVP_PKEY * pkey, char *dn, int mutlirdn,
int attribs, unsigned long chtype);
-static int
-build_subject(X509_REQ * req, char *subj, unsigned long chtype,
+static int build_subject(X509_REQ * req, char *subj, unsigned long chtype,
int multirdn);
-static int
-prompt_info(X509_REQ * req,
+static int prompt_info(X509_REQ * req,
STACK_OF(CONF_VALUE) * dn_sk, char *dn_sect,
STACK_OF(CONF_VALUE) * attr_sk, char *attr_sect, int attribs,
unsigned long chtype);
- static int auto_info(X509_REQ * req, STACK_OF(CONF_VALUE) * sk,
+static int auto_info(X509_REQ * req, STACK_OF(CONF_VALUE) * sk,
STACK_OF(CONF_VALUE) * attr, int attribs,
unsigned long chtype);
- static int add_attribute_object(X509_REQ * req, char *text, const char *def,
- char *value, int nid, int n_min,
- int n_max, unsigned long chtype);
- static int add_DN_object(X509_NAME * n, char *text, const char *def, char *value,
- int nid, int n_min, int n_max, unsigned long chtype, int mval);
- static int genpkey_cb(EVP_PKEY_CTX * ctx);
- static int req_check_len(int len, int n_min, int n_max);
- static int check_end(const char *str, const char *end);
- static EVP_PKEY_CTX *set_keygen_ctx(BIO * err, const char *gstr, int *pkey_type,
- long *pkeylen, char **palgnam,
- ENGINE * keygen_engine);
- static CONF *req_conf = NULL;
- static int batch = 0;
-
- int req_main(int, char **);
-
- int req_main(int argc, char **argv)
+static int add_attribute_object(X509_REQ * req, char *text, const char *def,
+ char *value, int nid, int n_min,
+ int n_max, unsigned long chtype);
+static int add_DN_object(X509_NAME * n, char *text, const char *def, char *value,
+ int nid, int n_min, int n_max, unsigned long chtype, int mval);
+static int genpkey_cb(EVP_PKEY_CTX * ctx);
+static int req_check_len(int len, int n_min, int n_max);
+static int check_end(const char *str, const char *end);
+static EVP_PKEY_CTX *set_keygen_ctx(BIO * err, const char *gstr, int *pkey_type,
+ long *pkeylen, char **palgnam,
+ ENGINE * keygen_engine);
+static CONF *req_conf = NULL;
+static int batch = 0;
+
+int req_main(int, char **);
+
+int
+req_main(int argc, char **argv)
{
ENGINE *e = NULL, *gen_eng = NULL;
unsigned long nmflag = 0, reqflag = 0;
static CONF *load_config_file(const char *configfile);
/* Query related functions. */
-static int
-query_command(const char *data, char *digest,
+static int query_command(const char *data, char *digest,
const EVP_MD * md, const char *policy, int no_nonce,
int cert, const char *in, const char *out, int text);
-static BIO *
-BIO_open_with_default(const char *file, const char *mode,
+static BIO *BIO_open_with_default(const char *file, const char *mode,
FILE * default_fp);
-static TS_REQ *
-create_query(BIO * data_bio, char *digest, const EVP_MD * md,
+static TS_REQ *create_query(BIO * data_bio, char *digest, const EVP_MD * md,
const char *policy, int no_nonce, int cert);
-static int
-create_digest(BIO * input, char *digest,
+static int create_digest(BIO * input, char *digest,
const EVP_MD * md, unsigned char **md_value);
static ASN1_INTEGER *create_nonce(int bits);
/* Reply related functions. */
-static int
-reply_command(CONF * conf, char *section, char *engine,
+static int reply_command(CONF * conf, char *section, char *engine,
char *queryfile, char *passin, char *inkey,
char *signer, char *chain, const char *policy,
char *in, int token_in, char *out, int token_out,
int text);
static TS_RESP *read_PKCS7(BIO * in_bio);
-static TS_RESP *
-create_response(CONF * conf, const char *section, char *engine,
+static TS_RESP *create_response(CONF * conf, const char *section, char *engine,
char *queryfile, char *passin, char *inkey,
char *signer, char *chain, const char *policy);
static ASN1_INTEGER *serial_cb(TS_RESP_CTX * ctx, void *data);
static int save_ts_serial(const char *serialfile, ASN1_INTEGER * serial);
/* Verify related functions. */
-static int
-verify_command(char *data, char *digest, char *queryfile,
+static int verify_command(char *data, char *digest, char *queryfile,
char *in, int token_in,
char *ca_path, char *ca_file, char *untrusted);
-static TS_VERIFY_CTX *
-create_verify_ctx(char *data, char *digest,
+static TS_VERIFY_CTX *create_verify_ctx(char *data, char *digest,
char *queryfile,
char *ca_path, char *ca_file,
char *untrusted);
static int cb(int ok, X509_STORE_CTX * ctx);
-static int
-check(X509_STORE * ctx, char *file,
+static int check(X509_STORE * ctx, char *file,
STACK_OF(X509) * uchain, STACK_OF(X509) * tchain,
STACK_OF(X509_CRL) * crls, ENGINE * e);
- static int v_verbose = 0, vflags = 0;
+static int v_verbose = 0, vflags = 0;
- int verify_main(int, char **);
+int verify_main(int, char **);
- int verify_main(int argc, char **argv)
+int
+verify_main(int argc, char **argv)
{
ENGINE *e = NULL;
int i, ret = 1, badarg = 0;
};
static int callb(int ok, X509_STORE_CTX * ctx);
-static int
-sign(X509 * x, EVP_PKEY * pkey, int days, int clrext, const EVP_MD * digest,
- CONF * conf, char *section);
-static int
-x509_certify(X509_STORE * ctx, char *CAfile, const EVP_MD * digest,
+static int sign(X509 * x, EVP_PKEY * pkey, int days, int clrext,
+ const EVP_MD * digest, CONF * conf, char *section);
+static int x509_certify(X509_STORE * ctx, char *CAfile, const EVP_MD * digest,
X509 * x, X509 * xca, EVP_PKEY * pkey,
STACK_OF(OPENSSL_STRING) * sigopts,
char *serial, int create, int days, int clrext,
CONF * conf, char *section, ASN1_INTEGER * sno);
- static int purpose_print(BIO * bio, X509 * cert, X509_PURPOSE * pt);
- static int reqfile = 0;
+static int purpose_print(BIO * bio, X509 * cert, X509_PURPOSE * pt);
+static int reqfile = 0;
- int x509_main(int, char **);
+int x509_main(int, char **);
- int x509_main(int argc, char **argv)
+int
+x509_main(int argc, char **argv)
{
ENGINE *e = NULL;
int ret = 1;