diff options
| author | jsing <> | 2014-05-19 12:34:53 +0000 |
|---|---|---|
| committer | jsing <> | 2014-05-19 12:34:53 +0000 |
| commit | c31c3892883088d706d5f4d261636c1b85f051a5 (patch) | |
| tree | 41f4fa0c82d49334a920463de6a3f32aaa6c7837 /src | |
| parent | f1127aae68b9eeaf7ade9b949ea67eb53863e42c (diff) | |
| download | openbsd-c31c3892883088d706d5f4d261636c1b85f051a5.tar.gz openbsd-c31c3892883088d706d5f4d261636c1b85f051a5.tar.bz2 openbsd-c31c3892883088d706d5f4d261636c1b85f051a5.zip | |
More KNF.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libssl/src/apps/apps.c | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/src/lib/libssl/src/apps/apps.c b/src/lib/libssl/src/apps/apps.c index 75f9fae77c..438af9f635 100644 --- a/src/lib/libssl/src/apps/apps.c +++ b/src/lib/libssl/src/apps/apps.c | |||
| @@ -148,13 +148,13 @@ typedef struct { | |||
| 148 | static UI_METHOD *ui_method = NULL; | 148 | static UI_METHOD *ui_method = NULL; |
| 149 | 149 | ||
| 150 | static int set_table_opts(unsigned long *flags, const char *arg, | 150 | static int set_table_opts(unsigned long *flags, const char *arg, |
| 151 | const NAME_EX_TBL * in_tbl); | 151 | const NAME_EX_TBL *in_tbl); |
| 152 | static int set_multi_opts(unsigned long *flags, const char *arg, | 152 | static int set_multi_opts(unsigned long *flags, const char *arg, |
| 153 | const NAME_EX_TBL * in_tbl); | 153 | const NAME_EX_TBL *in_tbl); |
| 154 | 154 | ||
| 155 | #if !defined(OPENSSL_NO_RC4) && !defined(OPENSSL_NO_RSA) | 155 | #if !defined(OPENSSL_NO_RC4) && !defined(OPENSSL_NO_RSA) |
| 156 | /* Looks like this stuff is worth moving into separate function */ | 156 | /* Looks like this stuff is worth moving into separate function */ |
| 157 | static EVP_PKEY *load_netscape_key(BIO * err, BIO * key, const char *file, | 157 | static EVP_PKEY *load_netscape_key(BIO *err, BIO *key, const char *file, |
| 158 | const char *key_descrip, int format); | 158 | const char *key_descrip, int format); |
| 159 | #endif | 159 | #endif |
| 160 | 160 | ||
| @@ -202,7 +202,7 @@ program_name(char *in, char *out, int size) | |||
| 202 | } | 202 | } |
| 203 | 203 | ||
| 204 | int | 204 | int |
| 205 | chopup_args(ARGS * arg, char *buf, int *argc, char **argv[]) | 205 | chopup_args(ARGS *arg, char *buf, int *argc, char **argv[]) |
| 206 | { | 206 | { |
| 207 | int num, i; | 207 | int num, i; |
| 208 | char *p; | 208 | char *p; |
| @@ -271,7 +271,7 @@ chopup_args(ARGS * arg, char *buf, int *argc, char **argv[]) | |||
| 271 | } | 271 | } |
| 272 | 272 | ||
| 273 | int | 273 | int |
| 274 | dump_cert_text(BIO * out, X509 * x) | 274 | dump_cert_text(BIO *out, X509 *x) |
| 275 | { | 275 | { |
| 276 | char *p; | 276 | char *p; |
| 277 | 277 | ||
| @@ -290,13 +290,13 @@ dump_cert_text(BIO * out, X509 * x) | |||
| 290 | } | 290 | } |
| 291 | 291 | ||
| 292 | static int | 292 | static int |
| 293 | ui_open(UI * ui) | 293 | ui_open(UI *ui) |
| 294 | { | 294 | { |
| 295 | return UI_method_get_opener(UI_OpenSSL()) (ui); | 295 | return UI_method_get_opener(UI_OpenSSL()) (ui); |
| 296 | } | 296 | } |
| 297 | 297 | ||
| 298 | static int | 298 | static int |
| 299 | ui_read(UI * ui, UI_STRING * uis) | 299 | ui_read(UI *ui, UI_STRING *uis) |
| 300 | { | 300 | { |
| 301 | if (UI_get_input_flags(uis) & UI_INPUT_FLAG_DEFAULT_PWD && | 301 | if (UI_get_input_flags(uis) & UI_INPUT_FLAG_DEFAULT_PWD && |
| 302 | UI_get0_user_data(ui)) { | 302 | UI_get0_user_data(ui)) { |
| @@ -320,7 +320,7 @@ ui_read(UI * ui, UI_STRING * uis) | |||
| 320 | } | 320 | } |
| 321 | 321 | ||
| 322 | static int | 322 | static int |
| 323 | ui_write(UI * ui, UI_STRING * uis) | 323 | ui_write(UI *ui, UI_STRING *uis) |
| 324 | { | 324 | { |
| 325 | if (UI_get_input_flags(uis) & UI_INPUT_FLAG_DEFAULT_PWD && | 325 | if (UI_get_input_flags(uis) & UI_INPUT_FLAG_DEFAULT_PWD && |
| 326 | UI_get0_user_data(ui)) { | 326 | UI_get0_user_data(ui)) { |
| @@ -342,7 +342,7 @@ ui_write(UI * ui, UI_STRING * uis) | |||
| 342 | } | 342 | } |
| 343 | 343 | ||
| 344 | static int | 344 | static int |
| 345 | ui_close(UI * ui) | 345 | ui_close(UI *ui) |
| 346 | { | 346 | { |
| 347 | return UI_method_get_closer(UI_OpenSSL()) (ui); | 347 | return UI_method_get_closer(UI_OpenSSL()) (ui); |
| 348 | } | 348 | } |
| @@ -368,7 +368,7 @@ destroy_ui_method(void) | |||
| 368 | } | 368 | } |
| 369 | 369 | ||
| 370 | int | 370 | int |
| 371 | password_callback(char *buf, int bufsiz, int verify, PW_CB_DATA * cb_tmp) | 371 | password_callback(char *buf, int bufsiz, int verify, PW_CB_DATA *cb_tmp) |
| 372 | { | 372 | { |
| 373 | UI *ui = NULL; | 373 | UI *ui = NULL; |
| 374 | int res = 0; | 374 | int res = 0; |
| @@ -438,10 +438,10 @@ password_callback(char *buf, int bufsiz, int verify, PW_CB_DATA * cb_tmp) | |||
| 438 | return res; | 438 | return res; |
| 439 | } | 439 | } |
| 440 | 440 | ||
| 441 | static char *app_get_pass(BIO * err, char *arg, int keepbio); | 441 | static char *app_get_pass(BIO *err, char *arg, int keepbio); |
| 442 | 442 | ||
| 443 | int | 443 | int |
| 444 | app_passwd(BIO * err, char *arg1, char *arg2, char **pass1, char **pass2) | 444 | app_passwd(BIO *err, char *arg1, char *arg2, char **pass1, char **pass2) |
| 445 | { | 445 | { |
| 446 | int same; | 446 | int same; |
| 447 | 447 | ||
| @@ -465,7 +465,7 @@ app_passwd(BIO * err, char *arg1, char *arg2, char **pass1, char **pass2) | |||
| 465 | } | 465 | } |
| 466 | 466 | ||
| 467 | static char * | 467 | static char * |
| 468 | app_get_pass(BIO * err, char *arg, int keepbio) | 468 | app_get_pass(BIO *err, char *arg, int keepbio) |
| 469 | { | 469 | { |
| 470 | char *tmp, tpass[APP_PASS_LEN]; | 470 | char *tmp, tpass[APP_PASS_LEN]; |
| 471 | static BIO *pwdbio = NULL; | 471 | static BIO *pwdbio = NULL; |
| @@ -535,10 +535,10 @@ app_get_pass(BIO * err, char *arg, int keepbio) | |||
| 535 | } | 535 | } |
| 536 | 536 | ||
| 537 | int | 537 | int |
| 538 | add_oid_section(BIO * err, CONF * conf) | 538 | add_oid_section(BIO *err, CONF *conf) |
| 539 | { | 539 | { |
| 540 | char *p; | 540 | char *p; |
| 541 | STACK_OF(CONF_VALUE) * sktmp; | 541 | STACK_OF(CONF_VALUE) *sktmp; |
| 542 | CONF_VALUE *cnf; | 542 | CONF_VALUE *cnf; |
| 543 | int i; | 543 | int i; |
| 544 | 544 | ||
| @@ -562,8 +562,8 @@ add_oid_section(BIO * err, CONF * conf) | |||
| 562 | } | 562 | } |
| 563 | 563 | ||
| 564 | static int | 564 | static int |
| 565 | load_pkcs12(BIO * err, BIO * in, const char *desc, pem_password_cb * pem_cb, | 565 | load_pkcs12(BIO *err, BIO *in, const char *desc, pem_password_cb *pem_cb, |
| 566 | void *cb_data, EVP_PKEY ** pkey, X509 ** cert, STACK_OF(X509) ** ca) | 566 | void *cb_data, EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca) |
| 567 | { | 567 | { |
| 568 | const char *pass; | 568 | const char *pass; |
| 569 | char tpass[PEM_BUFSIZE]; | 569 | char tpass[PEM_BUFSIZE]; |
| @@ -605,7 +605,7 @@ die: | |||
| 605 | } | 605 | } |
| 606 | 606 | ||
| 607 | X509 * | 607 | X509 * |
| 608 | load_cert(BIO * err, const char *file, int format, const char *pass, ENGINE * e, | 608 | load_cert(BIO *err, const char *file, int format, const char *pass, ENGINE *e, |
| 609 | const char *cert_descrip) | 609 | const char *cert_descrip) |
| 610 | { | 610 | { |
| 611 | X509 *x = NULL; | 611 | X509 *x = NULL; |
| @@ -670,8 +670,8 @@ end: | |||
| 670 | } | 670 | } |
| 671 | 671 | ||
| 672 | EVP_PKEY * | 672 | EVP_PKEY * |
| 673 | load_key(BIO * err, const char *file, int format, int maybe_stdin, | 673 | load_key(BIO *err, const char *file, int format, int maybe_stdin, |
| 674 | const char *pass, ENGINE * e, const char *key_descrip) | 674 | const char *pass, ENGINE *e, const char *key_descrip) |
| 675 | { | 675 | { |
| 676 | BIO *key = NULL; | 676 | BIO *key = NULL; |
| 677 | EVP_PKEY *pkey = NULL; | 677 | EVP_PKEY *pkey = NULL; |
| @@ -752,8 +752,8 @@ end: | |||
| 752 | } | 752 | } |
| 753 | 753 | ||
| 754 | EVP_PKEY * | 754 | EVP_PKEY * |
| 755 | load_pubkey(BIO * err, const char *file, int format, int maybe_stdin, | 755 | load_pubkey(BIO *err, const char *file, int format, int maybe_stdin, |
| 756 | const char *pass, ENGINE * e, const char *key_descrip) | 756 | const char *pass, ENGINE *e, const char *key_descrip) |
| 757 | { | 757 | { |
| 758 | BIO *key = NULL; | 758 | BIO *key = NULL; |
| 759 | EVP_PKEY *pkey = NULL; | 759 | EVP_PKEY *pkey = NULL; |
| @@ -843,7 +843,7 @@ end: | |||
| 843 | 843 | ||
| 844 | #if !defined(OPENSSL_NO_RC4) && !defined(OPENSSL_NO_RSA) | 844 | #if !defined(OPENSSL_NO_RC4) && !defined(OPENSSL_NO_RSA) |
| 845 | static EVP_PKEY * | 845 | static EVP_PKEY * |
| 846 | load_netscape_key(BIO * err, BIO * key, const char *file, | 846 | load_netscape_key(BIO *err, BIO *key, const char *file, |
| 847 | const char *key_descrip, int format) | 847 | const char *key_descrip, int format) |
| 848 | { | 848 | { |
| 849 | EVP_PKEY *pkey; | 849 | EVP_PKEY *pkey; |
| @@ -887,13 +887,13 @@ error: | |||
| 887 | #endif /* ndef OPENSSL_NO_RC4 */ | 887 | #endif /* ndef OPENSSL_NO_RC4 */ |
| 888 | 888 | ||
| 889 | static int | 889 | static int |
| 890 | load_certs_crls(BIO * err, const char *file, int format, const char *pass, | 890 | load_certs_crls(BIO *err, const char *file, int format, const char *pass, |
| 891 | ENGINE * e, const char *desc, STACK_OF(X509) ** pcerts, | 891 | ENGINE *e, const char *desc, STACK_OF(X509) **pcerts, |
| 892 | STACK_OF(X509_CRL) ** pcrls) | 892 | STACK_OF(X509_CRL) **pcrls) |
| 893 | { | 893 | { |
| 894 | int i; | 894 | int i; |
| 895 | BIO *bio; | 895 | BIO *bio; |
| 896 | STACK_OF(X509_INFO) * xis = NULL; | 896 | STACK_OF(X509_INFO) *xis = NULL; |
| 897 | X509_INFO *xi; | 897 | X509_INFO *xi; |
| 898 | PW_CB_DATA cb_data; | 898 | PW_CB_DATA cb_data; |
| 899 | int rv = 0; | 899 | int rv = 0; |
| @@ -972,10 +972,10 @@ end: | |||
| 972 | } | 972 | } |
| 973 | 973 | ||
| 974 | STACK_OF(X509) * | 974 | STACK_OF(X509) * |
| 975 | load_certs(BIO * err, const char *file, int format, const char *pass, | 975 | load_certs(BIO *err, const char *file, int format, const char *pass, |
| 976 | ENGINE * e, const char *desc) | 976 | ENGINE *e, const char *desc) |
| 977 | { | 977 | { |
| 978 | STACK_OF(X509) * certs; | 978 | STACK_OF(X509) *certs; |
| 979 | 979 | ||
| 980 | if (!load_certs_crls(err, file, format, pass, e, desc, &certs, NULL)) | 980 | if (!load_certs_crls(err, file, format, pass, e, desc, &certs, NULL)) |
| 981 | return NULL; | 981 | return NULL; |
| @@ -983,10 +983,10 @@ load_certs(BIO * err, const char *file, int format, const char *pass, | |||
| 983 | } | 983 | } |
| 984 | 984 | ||
| 985 | STACK_OF(X509_CRL) * | 985 | STACK_OF(X509_CRL) * |
| 986 | load_crls(BIO * err, const char *file, int format, const char *pass, ENGINE * e, | 986 | load_crls(BIO *err, const char *file, int format, const char *pass, ENGINE *e, |
| 987 | const char *desc) | 987 | const char *desc) |
| 988 | { | 988 | { |
| 989 | STACK_OF(X509_CRL) * crls; | 989 | STACK_OF(X509_CRL) *crls; |
| 990 | 990 | ||
| 991 | if (!load_certs_crls(err, file, format, pass, e, desc, NULL, &crls)) | 991 | if (!load_certs_crls(err, file, format, pass, e, desc, NULL, &crls)) |
| 992 | return NULL; | 992 | return NULL; |
| @@ -1084,9 +1084,9 @@ set_ext_copy(int *copy_type, const char *arg) | |||
| 1084 | } | 1084 | } |
| 1085 | 1085 | ||
| 1086 | int | 1086 | int |
| 1087 | copy_extensions(X509 * x, X509_REQ * req, int copy_type) | 1087 | copy_extensions(X509 *x, X509_REQ *req, int copy_type) |
| 1088 | { | 1088 | { |
| 1089 | STACK_OF(X509_EXTENSION) * exts = NULL; | 1089 | STACK_OF(X509_EXTENSION) *exts = NULL; |
| 1090 | X509_EXTENSION *ext, *tmpext; | 1090 | X509_EXTENSION *ext, *tmpext; |
| 1091 | ASN1_OBJECT *obj; | 1091 | ASN1_OBJECT *obj; |
| 1092 | int i, idx, ret = 0; | 1092 | int i, idx, ret = 0; |
| @@ -1126,9 +1126,9 @@ end: | |||
| 1126 | 1126 | ||
| 1127 | static int | 1127 | static int |
| 1128 | set_multi_opts(unsigned long *flags, const char *arg, | 1128 | set_multi_opts(unsigned long *flags, const char *arg, |
| 1129 | const NAME_EX_TBL * in_tbl) | 1129 | const NAME_EX_TBL *in_tbl) |
| 1130 | { | 1130 | { |
| 1131 | STACK_OF(CONF_VALUE) * vals; | 1131 | STACK_OF(CONF_VALUE) *vals; |
| 1132 | CONF_VALUE *val; | 1132 | CONF_VALUE *val; |
| 1133 | int i, ret = 1; | 1133 | int i, ret = 1; |
| 1134 | 1134 | ||
| @@ -1146,7 +1146,7 @@ set_multi_opts(unsigned long *flags, const char *arg, | |||
| 1146 | 1146 | ||
| 1147 | static int | 1147 | static int |
| 1148 | set_table_opts(unsigned long *flags, const char *arg, | 1148 | set_table_opts(unsigned long *flags, const char *arg, |
| 1149 | const NAME_EX_TBL * in_tbl) | 1149 | const NAME_EX_TBL *in_tbl) |
| 1150 | { | 1150 | { |
| 1151 | char c; | 1151 | char c; |
| 1152 | const NAME_EX_TBL *ptbl; | 1152 | const NAME_EX_TBL *ptbl; |
| @@ -1175,7 +1175,7 @@ set_table_opts(unsigned long *flags, const char *arg, | |||
| 1175 | } | 1175 | } |
| 1176 | 1176 | ||
| 1177 | void | 1177 | void |
| 1178 | print_name(BIO * out, const char *title, X509_NAME * nm, unsigned long lflags) | 1178 | print_name(BIO *out, const char *title, X509_NAME *nm, unsigned long lflags) |
| 1179 | { | 1179 | { |
| 1180 | char *buf; | 1180 | char *buf; |
| 1181 | char mline = 0; | 1181 | char mline = 0; |
| @@ -1201,7 +1201,7 @@ print_name(BIO * out, const char *title, X509_NAME * nm, unsigned long lflags) | |||
| 1201 | } | 1201 | } |
| 1202 | 1202 | ||
| 1203 | X509_STORE * | 1203 | X509_STORE * |
| 1204 | setup_verify(BIO * bp, char *CAfile, char *CApath) | 1204 | setup_verify(BIO *bp, char *CAfile, char *CApath) |
| 1205 | { | 1205 | { |
| 1206 | X509_STORE *store; | 1206 | X509_STORE *store; |
| 1207 | X509_LOOKUP *lookup; | 1207 | X509_LOOKUP *lookup; |
| @@ -1241,7 +1241,7 @@ end: | |||
| 1241 | #ifndef OPENSSL_NO_ENGINE | 1241 | #ifndef OPENSSL_NO_ENGINE |
| 1242 | /* Try to load an engine in a shareable library */ | 1242 | /* Try to load an engine in a shareable library */ |
| 1243 | static ENGINE * | 1243 | static ENGINE * |
| 1244 | try_load_engine(BIO * err, const char *engine, int debug) | 1244 | try_load_engine(BIO *err, const char *engine, int debug) |
| 1245 | { | 1245 | { |
| 1246 | ENGINE *e = ENGINE_by_id("dynamic"); | 1246 | ENGINE *e = ENGINE_by_id("dynamic"); |
| 1247 | 1247 | ||
| @@ -1256,7 +1256,7 @@ try_load_engine(BIO * err, const char *engine, int debug) | |||
| 1256 | } | 1256 | } |
| 1257 | 1257 | ||
| 1258 | ENGINE * | 1258 | ENGINE * |
| 1259 | setup_engine(BIO * err, const char *engine, int debug) | 1259 | setup_engine(BIO *err, const char *engine, int debug) |
| 1260 | { | 1260 | { |
| 1261 | ENGINE *e = NULL; | 1261 | ENGINE *e = NULL; |
| 1262 | 1262 | ||
| @@ -1293,7 +1293,7 @@ setup_engine(BIO * err, const char *engine, int debug) | |||
| 1293 | #endif | 1293 | #endif |
| 1294 | 1294 | ||
| 1295 | int | 1295 | int |
| 1296 | load_config(BIO * err, CONF * cnf) | 1296 | load_config(BIO *err, CONF *cnf) |
| 1297 | { | 1297 | { |
| 1298 | static int load_config_called = 0; | 1298 | static int load_config_called = 0; |
| 1299 | 1299 | ||
| @@ -1327,7 +1327,7 @@ make_config_name() | |||
| 1327 | } | 1327 | } |
| 1328 | 1328 | ||
| 1329 | static unsigned long | 1329 | static unsigned long |
| 1330 | index_serial_hash(const OPENSSL_CSTRING * a) | 1330 | index_serial_hash(const OPENSSL_CSTRING *a) |
| 1331 | { | 1331 | { |
| 1332 | const char *n; | 1332 | const char *n; |
| 1333 | 1333 | ||
| @@ -1338,7 +1338,7 @@ index_serial_hash(const OPENSSL_CSTRING * a) | |||
| 1338 | } | 1338 | } |
| 1339 | 1339 | ||
| 1340 | static int | 1340 | static int |
| 1341 | index_serial_cmp(const OPENSSL_CSTRING * a, const OPENSSL_CSTRING * b) | 1341 | index_serial_cmp(const OPENSSL_CSTRING *a, const OPENSSL_CSTRING *b) |
| 1342 | { | 1342 | { |
| 1343 | const char *aa, *bb; | 1343 | const char *aa, *bb; |
| 1344 | 1344 | ||
| @@ -1356,13 +1356,13 @@ index_name_qual(char **a) | |||
| 1356 | } | 1356 | } |
| 1357 | 1357 | ||
| 1358 | static unsigned long | 1358 | static unsigned long |
| 1359 | index_name_hash(const OPENSSL_CSTRING * a) | 1359 | index_name_hash(const OPENSSL_CSTRING *a) |
| 1360 | { | 1360 | { |
| 1361 | return (lh_strhash(a[DB_name])); | 1361 | return (lh_strhash(a[DB_name])); |
| 1362 | } | 1362 | } |
| 1363 | 1363 | ||
| 1364 | int | 1364 | int |
| 1365 | index_name_cmp(const OPENSSL_CSTRING * a, const OPENSSL_CSTRING * b) | 1365 | index_name_cmp(const OPENSSL_CSTRING *a, const OPENSSL_CSTRING *b) |
| 1366 | { | 1366 | { |
| 1367 | return (strcmp(a[DB_name], b[DB_name])); | 1367 | return (strcmp(a[DB_name], b[DB_name])); |
| 1368 | } | 1368 | } |
| @@ -1375,7 +1375,7 @@ static IMPLEMENT_LHASH_COMP_FN(index_name, OPENSSL_CSTRING) | |||
| 1375 | #define BSIZE 256 | 1375 | #define BSIZE 256 |
| 1376 | 1376 | ||
| 1377 | BIGNUM * | 1377 | BIGNUM * |
| 1378 | load_serial(char *serialfile, int create, ASN1_INTEGER ** retai) | 1378 | load_serial(char *serialfile, int create, ASN1_INTEGER **retai) |
| 1379 | { | 1379 | { |
| 1380 | BIO *in = NULL; | 1380 | BIO *in = NULL; |
| 1381 | BIGNUM *ret = NULL; | 1381 | BIGNUM *ret = NULL; |
| @@ -1427,8 +1427,8 @@ err: | |||
| 1427 | } | 1427 | } |
| 1428 | 1428 | ||
| 1429 | int | 1429 | int |
| 1430 | save_serial(char *serialfile, char *suffix, BIGNUM * serial, | 1430 | save_serial(char *serialfile, char *suffix, BIGNUM *serial, |
| 1431 | ASN1_INTEGER ** retai) | 1431 | ASN1_INTEGER **retai) |
| 1432 | { | 1432 | { |
| 1433 | char buf[1][BSIZE]; | 1433 | char buf[1][BSIZE]; |
| 1434 | BIO *out = NULL; | 1434 | BIO *out = NULL; |
| @@ -1535,7 +1535,7 @@ err: | |||
| 1535 | } | 1535 | } |
| 1536 | 1536 | ||
| 1537 | int | 1537 | int |
| 1538 | rand_serial(BIGNUM * b, ASN1_INTEGER * ai) | 1538 | rand_serial(BIGNUM *b, ASN1_INTEGER *ai) |
| 1539 | { | 1539 | { |
| 1540 | BIGNUM *btmp; | 1540 | BIGNUM *btmp; |
| 1541 | int ret = 0; | 1541 | int ret = 0; |
| @@ -1563,7 +1563,7 @@ error: | |||
| 1563 | } | 1563 | } |
| 1564 | 1564 | ||
| 1565 | CA_DB * | 1565 | CA_DB * |
| 1566 | load_index(char *dbfile, DB_ATTR * db_attr) | 1566 | load_index(char *dbfile, DB_ATTR *db_attr) |
| 1567 | { | 1567 | { |
| 1568 | CA_DB *retdb = NULL; | 1568 | CA_DB *retdb = NULL; |
| 1569 | TXT_DB *tmpdb = NULL; | 1569 | TXT_DB *tmpdb = NULL; |
| @@ -1631,7 +1631,7 @@ err: | |||
| 1631 | } | 1631 | } |
| 1632 | 1632 | ||
| 1633 | int | 1633 | int |
| 1634 | index_index(CA_DB * db) | 1634 | index_index(CA_DB *db) |
| 1635 | { | 1635 | { |
| 1636 | if (!TXT_DB_create_index(db->db, DB_serial, NULL, | 1636 | if (!TXT_DB_create_index(db->db, DB_serial, NULL, |
| 1637 | LHASH_HASH_FN(index_serial), LHASH_COMP_FN(index_serial))) { | 1637 | LHASH_HASH_FN(index_serial), LHASH_COMP_FN(index_serial))) { |
| @@ -1651,7 +1651,7 @@ index_index(CA_DB * db) | |||
| 1651 | } | 1651 | } |
| 1652 | 1652 | ||
| 1653 | int | 1653 | int |
| 1654 | save_index(const char *dbfile, const char *suffix, CA_DB * db) | 1654 | save_index(const char *dbfile, const char *suffix, CA_DB *db) |
| 1655 | { | 1655 | { |
| 1656 | char buf[3][BSIZE]; | 1656 | char buf[3][BSIZE]; |
| 1657 | BIO *out = BIO_new(BIO_s_file()); | 1657 | BIO *out = BIO_new(BIO_s_file()); |
| @@ -1786,7 +1786,7 @@ err: | |||
| 1786 | } | 1786 | } |
| 1787 | 1787 | ||
| 1788 | void | 1788 | void |
| 1789 | free_index(CA_DB * db) | 1789 | free_index(CA_DB *db) |
| 1790 | { | 1790 | { |
| 1791 | if (db) { | 1791 | if (db) { |
| 1792 | if (db->db) | 1792 | if (db->db) |
| @@ -1946,8 +1946,8 @@ error: | |||
| 1946 | } | 1946 | } |
| 1947 | 1947 | ||
| 1948 | int | 1948 | int |
| 1949 | args_verify(char ***pargs, int *pargc, int *badarg, BIO * err, | 1949 | args_verify(char ***pargs, int *pargc, int *badarg, BIO *err, |
| 1950 | X509_VERIFY_PARAM ** pm) | 1950 | X509_VERIFY_PARAM **pm) |
| 1951 | { | 1951 | { |
| 1952 | ASN1_OBJECT *otmp = NULL; | 1952 | ASN1_OBJECT *otmp = NULL; |
| 1953 | unsigned long flags = 0; | 1953 | unsigned long flags = 0; |
| @@ -2081,7 +2081,7 @@ end: | |||
| 2081 | */ | 2081 | */ |
| 2082 | 2082 | ||
| 2083 | int | 2083 | int |
| 2084 | bio_to_mem(unsigned char **out, int maxlen, BIO * in) | 2084 | bio_to_mem(unsigned char **out, int maxlen, BIO *in) |
| 2085 | { | 2085 | { |
| 2086 | BIO *mem; | 2086 | BIO *mem; |
| 2087 | int len, ret; | 2087 | int len, ret; |
| @@ -2114,7 +2114,7 @@ bio_to_mem(unsigned char **out, int maxlen, BIO * in) | |||
| 2114 | } | 2114 | } |
| 2115 | 2115 | ||
| 2116 | int | 2116 | int |
| 2117 | pkey_ctrl_string(EVP_PKEY_CTX * ctx, char *value) | 2117 | pkey_ctrl_string(EVP_PKEY_CTX *ctx, char *value) |
| 2118 | { | 2118 | { |
| 2119 | int rv; | 2119 | int rv; |
| 2120 | char *stmp, *vtmp = NULL; | 2120 | char *stmp, *vtmp = NULL; |
| @@ -2134,7 +2134,7 @@ pkey_ctrl_string(EVP_PKEY_CTX * ctx, char *value) | |||
| 2134 | } | 2134 | } |
| 2135 | 2135 | ||
| 2136 | static void | 2136 | static void |
| 2137 | nodes_print(BIO * out, const char *name, STACK_OF(X509_POLICY_NODE) * nodes) | 2137 | nodes_print(BIO *out, const char *name, STACK_OF(X509_POLICY_NODE) *nodes) |
| 2138 | { | 2138 | { |
| 2139 | X509_POLICY_NODE *node; | 2139 | X509_POLICY_NODE *node; |
| 2140 | int i; | 2140 | int i; |
| @@ -2151,7 +2151,7 @@ nodes_print(BIO * out, const char *name, STACK_OF(X509_POLICY_NODE) * nodes) | |||
| 2151 | } | 2151 | } |
| 2152 | 2152 | ||
| 2153 | void | 2153 | void |
| 2154 | policies_print(BIO * out, X509_STORE_CTX * ctx) | 2154 | policies_print(BIO *out, X509_STORE_CTX *ctx) |
| 2155 | { | 2155 | { |
| 2156 | X509_POLICY_TREE *tree; | 2156 | X509_POLICY_TREE *tree; |
| 2157 | int explicit_policy; | 2157 | int explicit_policy; |
