From: tedu Date: Fri, 18 Apr 2014 04:33:09 +0000 (+0000) Subject: whitespace normalization X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=485b78c29bfc5028002b4324f201cde5deafcc2d;p=openbsd whitespace normalization --- diff --git a/lib/libssl/src/apps/cms.c b/lib/libssl/src/apps/cms.c index b1ed9c392ea..d25b6782971 100644 --- a/lib/libssl/src/apps/cms.c +++ b/lib/libssl/src/apps/cms.c @@ -70,7 +70,7 @@ 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); 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); @@ -94,12 +94,12 @@ make_receipt_request(STACK_OF(OPENSSL_STRING) * rr_to, #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; @@ -1122,7 +1122,8 @@ receipt_request_print(BIO * out, CMS_ContentInfo * cms) } 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; diff --git a/lib/libssl/src/apps/ocsp.c b/lib/libssl/src/apps/ocsp.c index a16237c1f81..91e5b8cbd29 100644 --- a/lib/libssl/src/apps/ocsp.c +++ b/lib/libssl/src/apps/ocsp.c @@ -77,30 +77,31 @@ 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; diff --git a/lib/libssl/src/apps/pkcs12.c b/lib/libssl/src/apps/pkcs12.c index 58a7224c652..d08f92eae3c 100644 --- a/lib/libssl/src/apps/pkcs12.c +++ b/lib/libssl/src/apps/pkcs12.c @@ -79,20 +79,22 @@ const EVP_CIPHER *enc; #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; diff --git a/lib/libssl/src/apps/pkeyutl.c b/lib/libssl/src/apps/pkeyutl.c index 7bac41c3a88..622034292ac 100644 --- a/lib/libssl/src/apps/pkeyutl.c +++ b/lib/libssl/src/apps/pkeyutl.c @@ -70,17 +70,14 @@ static void usage(void); -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); diff --git a/lib/libssl/src/apps/req.c b/lib/libssl/src/apps/req.c index fc4dc790908..11ee3d2feac 100644 --- a/lib/libssl/src/apps/req.c +++ b/lib/libssl/src/apps/req.c @@ -123,37 +123,35 @@ * 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; diff --git a/lib/libssl/src/apps/ts.c b/lib/libssl/src/apps/ts.c index bac4b048f86..9d116ffac2f 100644 --- a/lib/libssl/src/apps/ts.c +++ b/lib/libssl/src/apps/ts.c @@ -80,31 +80,25 @@ static ASN1_OBJECT *txt2obj(const char *oid); 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); @@ -112,12 +106,10 @@ static ASN1_INTEGER *next_serial(const char *serialfile); 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); diff --git a/lib/libssl/src/apps/verify.c b/lib/libssl/src/apps/verify.c index 0bfc0f40381..79feec9a4b0 100644 --- a/lib/libssl/src/apps/verify.c +++ b/lib/libssl/src/apps/verify.c @@ -68,15 +68,15 @@ 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; diff --git a/lib/libssl/src/apps/x509.c b/lib/libssl/src/apps/x509.c index b9585da4e6d..84ca493a89a 100644 --- a/lib/libssl/src/apps/x509.c +++ b/lib/libssl/src/apps/x509.c @@ -152,21 +152,20 @@ static const char *x509_usage[] = { }; 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;