diff options
author | inoguchi <> | 2021-07-15 10:26:43 +0000 |
---|---|---|
committer | inoguchi <> | 2021-07-15 10:26:43 +0000 |
commit | 7082601d66bf7916704713a802c1c7ef8ef452a3 (patch) | |
tree | f80eebf600134f61f8bd8535af17ed235360e161 /src | |
parent | 726f5c0bc40668607a34efc5f6ba365baecc53b2 (diff) | |
download | openbsd-7082601d66bf7916704713a802c1c7ef8ef452a3.tar.gz openbsd-7082601d66bf7916704713a802c1c7ef8ef452a3.tar.bz2 openbsd-7082601d66bf7916704713a802c1c7ef8ef452a3.zip |
Remove space between '*' and pointer variable in ca.c
Diffstat (limited to 'src')
-rw-r--r-- | src/usr.bin/openssl/ca.c | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/src/usr.bin/openssl/ca.c b/src/usr.bin/openssl/ca.c index 038fe86be9..7bda3ab55b 100644 --- a/src/usr.bin/openssl/ca.c +++ b/src/usr.bin/openssl/ca.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ca.c,v 1.30 2021/07/15 10:15:22 inoguchi Exp $ */ | 1 | /* $OpenBSD: ca.c,v 1.31 2021/07/15 10:26:43 inoguchi Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -121,43 +121,43 @@ | |||
121 | #define REV_CA_COMPROMISE 4 /* Value is CA key compromise time */ | 121 | #define REV_CA_COMPROMISE 4 /* Value is CA key compromise time */ |
122 | 122 | ||
123 | static void lookup_fail(const char *name, const char *tag); | 123 | static void lookup_fail(const char *name, const char *tag); |
124 | static int certify(X509 ** xret, char *infile, EVP_PKEY * pkey, X509 * x509, | 124 | static int certify(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509, |
125 | const EVP_MD * dgst, STACK_OF(OPENSSL_STRING) * sigopts, | 125 | const EVP_MD *dgst, STACK_OF(OPENSSL_STRING) *sigopts, |
126 | STACK_OF(CONF_VALUE) * policy, CA_DB * db, BIGNUM * serial, char *subj, | 126 | STACK_OF(CONF_VALUE) *policy, CA_DB *db, BIGNUM *serial, char *subj, |
127 | unsigned long chtype, int multirdn, int email_dn, char *startdate, | 127 | unsigned long chtype, int multirdn, int email_dn, char *startdate, |
128 | char *enddate, long days, int batch, char *ext_sect, CONF * conf, | 128 | char *enddate, long days, int batch, char *ext_sect, CONF *conf, |
129 | int verbose, unsigned long certopt, unsigned long nameopt, | 129 | int verbose, unsigned long certopt, unsigned long nameopt, |
130 | int default_op, int ext_copy, int selfsign); | 130 | int default_op, int ext_copy, int selfsign); |
131 | static int certify_cert(X509 ** xret, char *infile, EVP_PKEY * pkey, | 131 | static int certify_cert(X509 **xret, char *infile, EVP_PKEY *pkey, |
132 | X509 * x509, const EVP_MD * dgst, STACK_OF(OPENSSL_STRING) * sigopts, | 132 | X509 *x509, const EVP_MD *dgst, STACK_OF(OPENSSL_STRING) *sigopts, |
133 | STACK_OF(CONF_VALUE) * policy, CA_DB * db, BIGNUM * serial, char *subj, | 133 | STACK_OF(CONF_VALUE) *policy, CA_DB *db, BIGNUM *serial, char *subj, |
134 | unsigned long chtype, int multirdn, int email_dn, char *startdate, | 134 | unsigned long chtype, int multirdn, int email_dn, char *startdate, |
135 | char *enddate, long days, int batch, char *ext_sect, CONF * conf, | 135 | char *enddate, long days, int batch, char *ext_sect, CONF *conf, |
136 | int verbose, unsigned long certopt, unsigned long nameopt, int default_op, | 136 | int verbose, unsigned long certopt, unsigned long nameopt, int default_op, |
137 | int ext_copy); | 137 | int ext_copy); |
138 | static int certify_spkac(X509 ** xret, char *infile, EVP_PKEY * pkey, | 138 | static int certify_spkac(X509 **xret, char *infile, EVP_PKEY *pkey, |
139 | X509 * x509, const EVP_MD * dgst, STACK_OF(OPENSSL_STRING) * sigopts, | 139 | X509 *x509, const EVP_MD *dgst, STACK_OF(OPENSSL_STRING) *sigopts, |
140 | STACK_OF(CONF_VALUE) * policy, CA_DB * db, BIGNUM * serial, char *subj, | 140 | STACK_OF(CONF_VALUE) *policy, CA_DB *db, BIGNUM *serial, char *subj, |
141 | unsigned long chtype, int multirdn, int email_dn, char *startdate, | 141 | unsigned long chtype, int multirdn, int email_dn, char *startdate, |
142 | char *enddate, long days, char *ext_sect, CONF * conf, int verbose, | 142 | char *enddate, long days, char *ext_sect, CONF *conf, int verbose, |
143 | unsigned long certopt, unsigned long nameopt, int default_op, int ext_copy); | 143 | unsigned long certopt, unsigned long nameopt, int default_op, int ext_copy); |
144 | static void write_new_certificate(BIO * bp, X509 * x, int output_der, | 144 | static void write_new_certificate(BIO *bp, X509 *x, int output_der, |
145 | int notext); | 145 | int notext); |
146 | static int do_body(X509 ** xret, EVP_PKEY * pkey, X509 * x509, | 146 | static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, |
147 | const EVP_MD * dgst, STACK_OF(OPENSSL_STRING) * sigopts, | 147 | const EVP_MD *dgst, STACK_OF(OPENSSL_STRING) *sigopts, |
148 | STACK_OF(CONF_VALUE) * policy, CA_DB * db, BIGNUM * serial, char *subj, | 148 | STACK_OF(CONF_VALUE) *policy, CA_DB *db, BIGNUM *serial, char *subj, |
149 | unsigned long chtype, int multirdn, int email_dn, char *startdate, | 149 | unsigned long chtype, int multirdn, int email_dn, char *startdate, |
150 | char *enddate, long days, int batch, int verbose, X509_REQ * req, | 150 | char *enddate, long days, int batch, int verbose, X509_REQ *req, |
151 | char *ext_sect, CONF * conf, unsigned long certopt, unsigned long nameopt, | 151 | char *ext_sect, CONF *conf, unsigned long certopt, unsigned long nameopt, |
152 | int default_op, int ext_copy, int selfsign); | 152 | int default_op, int ext_copy, int selfsign); |
153 | static int do_revoke(X509 * x509, CA_DB * db, int ext, char *extval); | 153 | static int do_revoke(X509 *x509, CA_DB *db, int ext, char *extval); |
154 | static int get_certificate_status(const char *serial, CA_DB * db); | 154 | static int get_certificate_status(const char *serial, CA_DB *db); |
155 | static int do_updatedb(CA_DB * db); | 155 | static int do_updatedb(CA_DB *db); |
156 | static int check_time_format(const char *str); | 156 | static int check_time_format(const char *str); |
157 | static char * bin2hex(unsigned char *, size_t); | 157 | static char *bin2hex(unsigned char *, size_t); |
158 | char *make_revocation_str(int rev_type, char *rev_arg); | 158 | char *make_revocation_str(int rev_type, char *rev_arg); |
159 | int make_revoked(X509_REVOKED * rev, const char *str); | 159 | int make_revoked(X509_REVOKED *rev, const char *str); |
160 | int old_entry_print(BIO * bp, ASN1_OBJECT * obj, ASN1_STRING * str); | 160 | int old_entry_print(BIO *bp, ASN1_OBJECT *obj, ASN1_STRING *str); |
161 | 161 | ||
162 | static CONF *conf = NULL; | 162 | static CONF *conf = NULL; |
163 | static CONF *extconf = NULL; | 163 | static CONF *extconf = NULL; |
@@ -201,7 +201,7 @@ static struct { | |||
201 | char *serial_status; | 201 | char *serial_status; |
202 | char *section; | 202 | char *section; |
203 | int selfsign; | 203 | int selfsign; |
204 | STACK_OF(OPENSSL_STRING) * sigopts; | 204 | STACK_OF(OPENSSL_STRING) *sigopts; |
205 | char *spkac_file; | 205 | char *spkac_file; |
206 | char *ss_cert_file; | 206 | char *ss_cert_file; |
207 | char *startdate; | 207 | char *startdate; |
@@ -677,11 +677,11 @@ ca_main(int argc, char **argv) | |||
677 | ASN1_INTEGER *tmpserial; | 677 | ASN1_INTEGER *tmpserial; |
678 | char *f; | 678 | char *f; |
679 | const char *p; | 679 | const char *p; |
680 | char *const * pp; | 680 | char *const *pp; |
681 | int i, j; | 681 | int i, j; |
682 | const EVP_MD *dgst = NULL; | 682 | const EVP_MD *dgst = NULL; |
683 | STACK_OF(CONF_VALUE) * attribs = NULL; | 683 | STACK_OF(CONF_VALUE) *attribs = NULL; |
684 | STACK_OF(X509) * cert_sk = NULL; | 684 | STACK_OF(X509) *cert_sk = NULL; |
685 | char *tofree = NULL; | 685 | char *tofree = NULL; |
686 | DB_ATTR db_attr; | 686 | DB_ATTR db_attr; |
687 | 687 | ||
@@ -1535,11 +1535,11 @@ lookup_fail(const char *name, const char *tag) | |||
1535 | } | 1535 | } |
1536 | 1536 | ||
1537 | static int | 1537 | static int |
1538 | certify(X509 ** xret, char *infile, EVP_PKEY * pkey, X509 * x509, | 1538 | certify(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509, |
1539 | const EVP_MD * dgst, STACK_OF(OPENSSL_STRING) * sigopts, | 1539 | const EVP_MD *dgst, STACK_OF(OPENSSL_STRING) *sigopts, |
1540 | STACK_OF(CONF_VALUE) * policy, CA_DB * db, BIGNUM * serial, char *subj, | 1540 | STACK_OF(CONF_VALUE) *policy, CA_DB *db, BIGNUM *serial, char *subj, |
1541 | unsigned long chtype, int multirdn, int email_dn, char *startdate, | 1541 | unsigned long chtype, int multirdn, int email_dn, char *startdate, |
1542 | char *enddate, long days, int batch, char *ext_sect, CONF * lconf, | 1542 | char *enddate, long days, int batch, char *ext_sect, CONF *lconf, |
1543 | int verbose, unsigned long certopt, unsigned long nameopt, int default_op, | 1543 | int verbose, unsigned long certopt, unsigned long nameopt, int default_op, |
1544 | int ext_copy, int selfsign) | 1544 | int ext_copy, int selfsign) |
1545 | { | 1545 | { |
@@ -1603,11 +1603,11 @@ certify(X509 ** xret, char *infile, EVP_PKEY * pkey, X509 * x509, | |||
1603 | } | 1603 | } |
1604 | 1604 | ||
1605 | static int | 1605 | static int |
1606 | certify_cert(X509 ** xret, char *infile, EVP_PKEY * pkey, X509 * x509, | 1606 | certify_cert(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509, |
1607 | const EVP_MD * dgst, STACK_OF(OPENSSL_STRING) * sigopts, | 1607 | const EVP_MD *dgst, STACK_OF(OPENSSL_STRING) *sigopts, |
1608 | STACK_OF(CONF_VALUE) * policy, CA_DB * db, BIGNUM * serial, char *subj, | 1608 | STACK_OF(CONF_VALUE) *policy, CA_DB *db, BIGNUM *serial, char *subj, |
1609 | unsigned long chtype, int multirdn, int email_dn, char *startdate, | 1609 | unsigned long chtype, int multirdn, int email_dn, char *startdate, |
1610 | char *enddate, long days, int batch, char *ext_sect, CONF * lconf, | 1610 | char *enddate, long days, int batch, char *ext_sect, CONF *lconf, |
1611 | int verbose, unsigned long certopt, unsigned long nameopt, int default_op, | 1611 | int verbose, unsigned long certopt, unsigned long nameopt, int default_op, |
1612 | int ext_copy) | 1612 | int ext_copy) |
1613 | { | 1613 | { |
@@ -1660,11 +1660,11 @@ certify_cert(X509 ** xret, char *infile, EVP_PKEY * pkey, X509 * x509, | |||
1660 | } | 1660 | } |
1661 | 1661 | ||
1662 | static int | 1662 | static int |
1663 | do_body(X509 ** xret, EVP_PKEY * pkey, X509 * x509, const EVP_MD * dgst, | 1663 | do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst, |
1664 | STACK_OF(OPENSSL_STRING) * sigopts, STACK_OF(CONF_VALUE) * policy, | 1664 | STACK_OF(OPENSSL_STRING) *sigopts, STACK_OF(CONF_VALUE) *policy, |
1665 | CA_DB * db, BIGNUM * serial, char *subj, unsigned long chtype, int multirdn, | 1665 | CA_DB *db, BIGNUM *serial, char *subj, unsigned long chtype, int multirdn, |
1666 | int email_dn, char *startdate, char *enddate, long days, int batch, | 1666 | int email_dn, char *startdate, char *enddate, long days, int batch, |
1667 | int verbose, X509_REQ * req, char *ext_sect, CONF * lconf, | 1667 | int verbose, X509_REQ *req, char *ext_sect, CONF *lconf, |
1668 | unsigned long certopt, unsigned long nameopt, int default_op, | 1668 | unsigned long certopt, unsigned long nameopt, int default_op, |
1669 | int ext_copy, int selfsign) | 1669 | int ext_copy, int selfsign) |
1670 | { | 1670 | { |
@@ -2178,7 +2178,7 @@ again2: | |||
2178 | } | 2178 | } |
2179 | 2179 | ||
2180 | static void | 2180 | static void |
2181 | write_new_certificate(BIO * bp, X509 * x, int output_der, int notext) | 2181 | write_new_certificate(BIO *bp, X509 *x, int output_der, int notext) |
2182 | { | 2182 | { |
2183 | if (output_der) { | 2183 | if (output_der) { |
2184 | (void) i2d_X509_bio(bp, x); | 2184 | (void) i2d_X509_bio(bp, x); |
@@ -2190,15 +2190,15 @@ write_new_certificate(BIO * bp, X509 * x, int output_der, int notext) | |||
2190 | } | 2190 | } |
2191 | 2191 | ||
2192 | static int | 2192 | static int |
2193 | certify_spkac(X509 ** xret, char *infile, EVP_PKEY * pkey, X509 * x509, | 2193 | certify_spkac(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509, |
2194 | const EVP_MD * dgst, STACK_OF(OPENSSL_STRING) * sigopts, | 2194 | const EVP_MD *dgst, STACK_OF(OPENSSL_STRING) *sigopts, |
2195 | STACK_OF(CONF_VALUE) * policy, CA_DB * db, BIGNUM * serial, char *subj, | 2195 | STACK_OF(CONF_VALUE) *policy, CA_DB *db, BIGNUM *serial, char *subj, |
2196 | unsigned long chtype, int multirdn, int email_dn, char *startdate, | 2196 | unsigned long chtype, int multirdn, int email_dn, char *startdate, |
2197 | char *enddate, long days, char *ext_sect, CONF * lconf, int verbose, | 2197 | char *enddate, long days, char *ext_sect, CONF *lconf, int verbose, |
2198 | unsigned long certopt, unsigned long nameopt, int default_op, int ext_copy) | 2198 | unsigned long certopt, unsigned long nameopt, int default_op, int ext_copy) |
2199 | { | 2199 | { |
2200 | STACK_OF(CONF_VALUE) * sk = NULL; | 2200 | STACK_OF(CONF_VALUE) *sk = NULL; |
2201 | LHASH_OF(CONF_VALUE) * parms = NULL; | 2201 | LHASH_OF(CONF_VALUE) *parms = NULL; |
2202 | X509_REQ *req = NULL; | 2202 | X509_REQ *req = NULL; |
2203 | CONF_VALUE *cv = NULL; | 2203 | CONF_VALUE *cv = NULL; |
2204 | NETSCAPE_SPKI *spki = NULL; | 2204 | NETSCAPE_SPKI *spki = NULL; |
@@ -2331,7 +2331,7 @@ check_time_format(const char *str) | |||
2331 | } | 2331 | } |
2332 | 2332 | ||
2333 | static int | 2333 | static int |
2334 | do_revoke(X509 * x509, CA_DB * db, int type, char *value) | 2334 | do_revoke(X509 *x509, CA_DB *db, int type, char *value) |
2335 | { | 2335 | { |
2336 | ASN1_UTCTIME *tm = NULL; | 2336 | ASN1_UTCTIME *tm = NULL; |
2337 | char *row[DB_NUMBER], **rrow, **irow; | 2337 | char *row[DB_NUMBER], **rrow, **irow; |
@@ -2443,7 +2443,7 @@ do_revoke(X509 * x509, CA_DB * db, int type, char *value) | |||
2443 | } | 2443 | } |
2444 | 2444 | ||
2445 | static int | 2445 | static int |
2446 | get_certificate_status(const char *serial, CA_DB * db) | 2446 | get_certificate_status(const char *serial, CA_DB *db) |
2447 | { | 2447 | { |
2448 | char *row[DB_NUMBER], **rrow; | 2448 | char *row[DB_NUMBER], **rrow; |
2449 | int ok = -1, i; | 2449 | int ok = -1, i; |
@@ -2515,7 +2515,7 @@ get_certificate_status(const char *serial, CA_DB * db) | |||
2515 | } | 2515 | } |
2516 | 2516 | ||
2517 | static int | 2517 | static int |
2518 | do_updatedb(CA_DB * db) | 2518 | do_updatedb(CA_DB *db) |
2519 | { | 2519 | { |
2520 | ASN1_UTCTIME *a_tm = NULL; | 2520 | ASN1_UTCTIME *a_tm = NULL; |
2521 | int i, cnt = 0; | 2521 | int i, cnt = 0; |
@@ -2680,7 +2680,7 @@ make_revocation_str(int rev_type, char *rev_arg) | |||
2680 | */ | 2680 | */ |
2681 | 2681 | ||
2682 | int | 2682 | int |
2683 | make_revoked(X509_REVOKED * rev, const char *str) | 2683 | make_revoked(X509_REVOKED *rev, const char *str) |
2684 | { | 2684 | { |
2685 | char *tmp = NULL; | 2685 | char *tmp = NULL; |
2686 | int reason_code = -1; | 2686 | int reason_code = -1; |
@@ -2733,7 +2733,7 @@ make_revoked(X509_REVOKED * rev, const char *str) | |||
2733 | } | 2733 | } |
2734 | 2734 | ||
2735 | int | 2735 | int |
2736 | old_entry_print(BIO * bp, ASN1_OBJECT * obj, ASN1_STRING * str) | 2736 | old_entry_print(BIO *bp, ASN1_OBJECT *obj, ASN1_STRING *str) |
2737 | { | 2737 | { |
2738 | char buf[25], *pbuf, *p; | 2738 | char buf[25], *pbuf, *p; |
2739 | int j; | 2739 | int j; |
@@ -2774,8 +2774,8 @@ old_entry_print(BIO * bp, ASN1_OBJECT * obj, ASN1_STRING * str) | |||
2774 | } | 2774 | } |
2775 | 2775 | ||
2776 | int | 2776 | int |
2777 | unpack_revinfo(ASN1_TIME ** prevtm, int *preason, ASN1_OBJECT ** phold, | 2777 | unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold, |
2778 | ASN1_GENERALIZEDTIME ** pinvtm, const char *str) | 2778 | ASN1_GENERALIZEDTIME **pinvtm, const char *str) |
2779 | { | 2779 | { |
2780 | char *tmp = NULL; | 2780 | char *tmp = NULL; |
2781 | char *rtime_str, *reason_str = NULL, *arg_str = NULL, *p; | 2781 | char *rtime_str, *reason_str = NULL, *arg_str = NULL, *p; |
@@ -2880,7 +2880,7 @@ unpack_revinfo(ASN1_TIME ** prevtm, int *preason, ASN1_OBJECT ** phold, | |||
2880 | } | 2880 | } |
2881 | 2881 | ||
2882 | static char * | 2882 | static char * |
2883 | bin2hex(unsigned char * data, size_t len) | 2883 | bin2hex(unsigned char *data, size_t len) |
2884 | { | 2884 | { |
2885 | char *ret = NULL; | 2885 | char *ret = NULL; |
2886 | char hex[] = "0123456789ABCDEF"; | 2886 | char hex[] = "0123456789ABCDEF"; |