diff options
author | deraadt <> | 2014-04-13 20:37:12 +0000 |
---|---|---|
committer | deraadt <> | 2014-04-13 20:37:12 +0000 |
commit | 055493ad24265ed26872a3a87865dd61fa3b713f (patch) | |
tree | 526e4a52c465ca5d0107849ce38aa20fe23ad8e4 /src | |
parent | 5a9459278c02e9167c3cf08369b67bc609c3865b (diff) | |
download | openbsd-055493ad24265ed26872a3a87865dd61fa3b713f.tar.gz openbsd-055493ad24265ed26872a3a87865dd61fa3b713f.tar.bz2 openbsd-055493ad24265ed26872a3a87865dd61fa3b713f.zip |
remove more cases of MS_STATIC, MS_CALLBACK, and MS_FAR. Did you
know that MS_STATIC doesn't mean it is static? How far can lies
and half-truths be layered? I wonder if anyone got fooled, and
actually returned a pointer..
ok beck
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libssl/s3_lib.c | 2 | ||||
-rw-r--r-- | src/lib/libssl/src/apps/apps.c | 2 | ||||
-rw-r--r-- | src/lib/libssl/src/apps/ca.c | 2 | ||||
-rw-r--r-- | src/lib/libssl/src/apps/dhparam.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/apps/dsaparam.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/apps/gendh.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/apps/genrsa.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/apps/openssl.c | 8 | ||||
-rw-r--r-- | src/lib/libssl/src/apps/req.c | 2 | ||||
-rw-r--r-- | src/lib/libssl/src/apps/s_apps.h | 14 | ||||
-rw-r--r-- | src/lib/libssl/src/apps/s_cb.c | 14 | ||||
-rw-r--r-- | src/lib/libssl/src/apps/s_client.c | 6 | ||||
-rw-r--r-- | src/lib/libssl/src/apps/s_server.c | 10 | ||||
-rw-r--r-- | src/lib/libssl/src/apps/s_time.c | 2 | ||||
-rw-r--r-- | src/lib/libssl/src/apps/ts.c | 8 | ||||
-rw-r--r-- | src/lib/libssl/src/apps/verify.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/apps/x509.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/demos/selfsign.c | 10 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/s3_lib.c | 2 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/ssl_task.c | 2 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/ssltest.c | 22 |
21 files changed, 61 insertions, 69 deletions
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c index c4ef2738d7..6b2739161d 100644 --- a/src/lib/libssl/s3_lib.c +++ b/src/lib/libssl/s3_lib.c | |||
@@ -3082,7 +3082,7 @@ void ssl3_clear(SSL *s) | |||
3082 | } | 3082 | } |
3083 | 3083 | ||
3084 | #ifndef OPENSSL_NO_SRP | 3084 | #ifndef OPENSSL_NO_SRP |
3085 | static char * MS_CALLBACK srp_password_from_info_cb(SSL *s, void *arg) | 3085 | static char * srp_password_from_info_cb(SSL *s, void *arg) |
3086 | { | 3086 | { |
3087 | return BUF_strdup(s->srp_ctx.info) ; | 3087 | return BUF_strdup(s->srp_ctx.info) ; |
3088 | } | 3088 | } |
diff --git a/src/lib/libssl/src/apps/apps.c b/src/lib/libssl/src/apps/apps.c index b76db10a5e..b517c47692 100644 --- a/src/lib/libssl/src/apps/apps.c +++ b/src/lib/libssl/src/apps/apps.c | |||
@@ -1590,7 +1590,7 @@ BIGNUM *load_serial(char *serialfile, int create, ASN1_INTEGER **retai) | |||
1590 | { | 1590 | { |
1591 | BIO *in=NULL; | 1591 | BIO *in=NULL; |
1592 | BIGNUM *ret=NULL; | 1592 | BIGNUM *ret=NULL; |
1593 | MS_STATIC char buf[1024]; | 1593 | char buf[1024]; |
1594 | ASN1_INTEGER *ai=NULL; | 1594 | ASN1_INTEGER *ai=NULL; |
1595 | 1595 | ||
1596 | ai=ASN1_INTEGER_new(); | 1596 | ai=ASN1_INTEGER_new(); |
diff --git a/src/lib/libssl/src/apps/ca.c b/src/lib/libssl/src/apps/ca.c index 55dea95ac1..b07cf97256 100644 --- a/src/lib/libssl/src/apps/ca.c +++ b/src/lib/libssl/src/apps/ca.c | |||
@@ -318,7 +318,7 @@ int MAIN(int argc, char **argv) | |||
318 | STACK_OF(OPENSSL_STRING) *sigopts = NULL; | 318 | STACK_OF(OPENSSL_STRING) *sigopts = NULL; |
319 | #undef BSIZE | 319 | #undef BSIZE |
320 | #define BSIZE 256 | 320 | #define BSIZE 256 |
321 | MS_STATIC char buf[3][BSIZE]; | 321 | char buf[3][BSIZE]; |
322 | char *randfile=NULL; | 322 | char *randfile=NULL; |
323 | #ifndef OPENSSL_NO_ENGINE | 323 | #ifndef OPENSSL_NO_ENGINE |
324 | char *engine = NULL; | 324 | char *engine = NULL; |
diff --git a/src/lib/libssl/src/apps/dhparam.c b/src/lib/libssl/src/apps/dhparam.c index 1297d6fb5e..93bab90b72 100644 --- a/src/lib/libssl/src/apps/dhparam.c +++ b/src/lib/libssl/src/apps/dhparam.c | |||
@@ -143,7 +143,7 @@ | |||
143 | * -C | 143 | * -C |
144 | */ | 144 | */ |
145 | 145 | ||
146 | static int MS_CALLBACK dh_cb(int p, int n, BN_GENCB *cb); | 146 | static int dh_cb(int p, int n, BN_GENCB *cb); |
147 | 147 | ||
148 | int MAIN(int, char **); | 148 | int MAIN(int, char **); |
149 | 149 | ||
@@ -534,7 +534,7 @@ end: | |||
534 | } | 534 | } |
535 | 535 | ||
536 | /* dh_cb is identical to dsa_cb in apps/dsaparam.c */ | 536 | /* dh_cb is identical to dsa_cb in apps/dsaparam.c */ |
537 | static int MS_CALLBACK dh_cb(int p, int n, BN_GENCB *cb) | 537 | static int dh_cb(int p, int n, BN_GENCB *cb) |
538 | { | 538 | { |
539 | char c='*'; | 539 | char c='*'; |
540 | 540 | ||
diff --git a/src/lib/libssl/src/apps/dsaparam.c b/src/lib/libssl/src/apps/dsaparam.c index 683d51391b..ad609fd6c0 100644 --- a/src/lib/libssl/src/apps/dsaparam.c +++ b/src/lib/libssl/src/apps/dsaparam.c | |||
@@ -105,7 +105,7 @@ static void timebomb_sigalarm(int foo) | |||
105 | 105 | ||
106 | #endif | 106 | #endif |
107 | 107 | ||
108 | static int MS_CALLBACK dsa_cb(int p, int n, BN_GENCB *cb); | 108 | static int dsa_cb(int p, int n, BN_GENCB *cb); |
109 | 109 | ||
110 | int MAIN(int, char **); | 110 | int MAIN(int, char **); |
111 | 111 | ||
@@ -458,7 +458,7 @@ end: | |||
458 | OPENSSL_EXIT(ret); | 458 | OPENSSL_EXIT(ret); |
459 | } | 459 | } |
460 | 460 | ||
461 | static int MS_CALLBACK dsa_cb(int p, int n, BN_GENCB *cb) | 461 | static int dsa_cb(int p, int n, BN_GENCB *cb) |
462 | { | 462 | { |
463 | char c='*'; | 463 | char c='*'; |
464 | 464 | ||
diff --git a/src/lib/libssl/src/apps/gendh.c b/src/lib/libssl/src/apps/gendh.c index 4ec776ba93..6ef7eb9493 100644 --- a/src/lib/libssl/src/apps/gendh.c +++ b/src/lib/libssl/src/apps/gendh.c | |||
@@ -82,7 +82,7 @@ | |||
82 | #undef PROG | 82 | #undef PROG |
83 | #define PROG gendh_main | 83 | #define PROG gendh_main |
84 | 84 | ||
85 | static int MS_CALLBACK dh_cb(int p, int n, BN_GENCB *cb); | 85 | static int dh_cb(int p, int n, BN_GENCB *cb); |
86 | 86 | ||
87 | int MAIN(int, char **); | 87 | int MAIN(int, char **); |
88 | 88 | ||
@@ -217,7 +217,7 @@ end: | |||
217 | OPENSSL_EXIT(ret); | 217 | OPENSSL_EXIT(ret); |
218 | } | 218 | } |
219 | 219 | ||
220 | static int MS_CALLBACK dh_cb(int p, int n, BN_GENCB *cb) | 220 | static int dh_cb(int p, int n, BN_GENCB *cb) |
221 | { | 221 | { |
222 | char c='*'; | 222 | char c='*'; |
223 | 223 | ||
diff --git a/src/lib/libssl/src/apps/genrsa.c b/src/lib/libssl/src/apps/genrsa.c index ece114c876..d3064b663a 100644 --- a/src/lib/libssl/src/apps/genrsa.c +++ b/src/lib/libssl/src/apps/genrsa.c | |||
@@ -82,7 +82,7 @@ | |||
82 | #undef PROG | 82 | #undef PROG |
83 | #define PROG genrsa_main | 83 | #define PROG genrsa_main |
84 | 84 | ||
85 | static int MS_CALLBACK genrsa_cb(int p, int n, BN_GENCB *cb); | 85 | static int genrsa_cb(int p, int n, BN_GENCB *cb); |
86 | 86 | ||
87 | int MAIN(int, char **); | 87 | int MAIN(int, char **); |
88 | 88 | ||
@@ -311,7 +311,7 @@ err: | |||
311 | OPENSSL_EXIT(ret); | 311 | OPENSSL_EXIT(ret); |
312 | } | 312 | } |
313 | 313 | ||
314 | static int MS_CALLBACK genrsa_cb(int p, int n, BN_GENCB *cb) | 314 | static int genrsa_cb(int p, int n, BN_GENCB *cb) |
315 | { | 315 | { |
316 | char c='*'; | 316 | char c='*'; |
317 | 317 | ||
diff --git a/src/lib/libssl/src/apps/openssl.c b/src/lib/libssl/src/apps/openssl.c index 71e1e48ece..e40be80db3 100644 --- a/src/lib/libssl/src/apps/openssl.c +++ b/src/lib/libssl/src/apps/openssl.c | |||
@@ -228,8 +228,8 @@ int main(int Argc, char *ARGV[]) | |||
228 | #define PROG_NAME_SIZE 39 | 228 | #define PROG_NAME_SIZE 39 |
229 | char pname[PROG_NAME_SIZE+1]; | 229 | char pname[PROG_NAME_SIZE+1]; |
230 | FUNCTION f,*fp; | 230 | FUNCTION f,*fp; |
231 | MS_STATIC const char *prompt; | 231 | const char *prompt; |
232 | MS_STATIC char buf[1024]; | 232 | char buf[1024]; |
233 | char *to_free=NULL; | 233 | char *to_free=NULL; |
234 | int n,i,ret=0; | 234 | int n,i,ret=0; |
235 | int argc; | 235 | int argc; |
@@ -696,13 +696,13 @@ static void list_md(BIO *out) | |||
696 | EVP_MD_do_all_sorted(list_md_fn, out); | 696 | EVP_MD_do_all_sorted(list_md_fn, out); |
697 | } | 697 | } |
698 | 698 | ||
699 | static int MS_CALLBACK function_cmp(const FUNCTION *a, const FUNCTION *b) | 699 | static int function_cmp(const FUNCTION *a, const FUNCTION *b) |
700 | { | 700 | { |
701 | return strncmp(a->name,b->name,8); | 701 | return strncmp(a->name,b->name,8); |
702 | } | 702 | } |
703 | static IMPLEMENT_LHASH_COMP_FN(function, FUNCTION) | 703 | static IMPLEMENT_LHASH_COMP_FN(function, FUNCTION) |
704 | 704 | ||
705 | static unsigned long MS_CALLBACK function_hash(const FUNCTION *a) | 705 | static unsigned long function_hash(const FUNCTION *a) |
706 | { | 706 | { |
707 | return lh_strhash(a->name); | 707 | return lh_strhash(a->name); |
708 | } | 708 | } |
diff --git a/src/lib/libssl/src/apps/req.c b/src/lib/libssl/src/apps/req.c index 5e034a85e8..8e2cc4d196 100644 --- a/src/lib/libssl/src/apps/req.c +++ b/src/lib/libssl/src/apps/req.c | |||
@@ -1444,7 +1444,7 @@ static int add_DN_object(X509_NAME *n, char *text, const char *def, char *value, | |||
1444 | int nid, int n_min, int n_max, unsigned long chtype, int mval) | 1444 | int nid, int n_min, int n_max, unsigned long chtype, int mval) |
1445 | { | 1445 | { |
1446 | int i,ret=0; | 1446 | int i,ret=0; |
1447 | MS_STATIC char buf[1024]; | 1447 | char buf[1024]; |
1448 | start: | 1448 | start: |
1449 | if (!batch) BIO_printf(bio_err,"%s [%s]:",text,def); | 1449 | if (!batch) BIO_printf(bio_err,"%s [%s]:",text,def); |
1450 | (void)BIO_flush(bio_err); | 1450 | (void)BIO_flush(bio_err); |
diff --git a/src/lib/libssl/src/apps/s_apps.h b/src/lib/libssl/src/apps/s_apps.h index 757d3f3d9e..08f55d53d3 100644 --- a/src/lib/libssl/src/apps/s_apps.h +++ b/src/lib/libssl/src/apps/s_apps.h | |||
@@ -150,7 +150,7 @@ typedef fd_mask fd_set; | |||
150 | 150 | ||
151 | int do_server(int port, int type, int *ret, int (*cb) (char *hostname, int s, unsigned char *context), unsigned char *context); | 151 | int do_server(int port, int type, int *ret, int (*cb) (char *hostname, int s, unsigned char *context), unsigned char *context); |
152 | #ifdef HEADER_X509_H | 152 | #ifdef HEADER_X509_H |
153 | int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx); | 153 | int verify_callback(int ok, X509_STORE_CTX *ctx); |
154 | #endif | 154 | #endif |
155 | #ifdef HEADER_SSL_H | 155 | #ifdef HEADER_SSL_H |
156 | int set_cert_stuff(SSL_CTX *ctx, char *cert_file, char *key_file); | 156 | int set_cert_stuff(SSL_CTX *ctx, char *cert_file, char *key_file); |
@@ -161,16 +161,16 @@ int should_retry(int i); | |||
161 | int extract_port(char *str, short *port_ptr); | 161 | int extract_port(char *str, short *port_ptr); |
162 | int extract_host_port(char *str,char **host_ptr,unsigned char *ip,char **p); | 162 | int extract_host_port(char *str,char **host_ptr,unsigned char *ip,char **p); |
163 | 163 | ||
164 | long MS_CALLBACK bio_dump_callback(BIO *bio, int cmd, const char *argp, | 164 | long bio_dump_callback(BIO *bio, int cmd, const char *argp, |
165 | int argi, long argl, long ret); | 165 | int argi, long argl, long ret); |
166 | 166 | ||
167 | #ifdef HEADER_SSL_H | 167 | #ifdef HEADER_SSL_H |
168 | void MS_CALLBACK apps_ssl_info_callback(const SSL *s, int where, int ret); | 168 | void apps_ssl_info_callback(const SSL *s, int where, int ret); |
169 | void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg); | 169 | void msg_cb(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg); |
170 | void MS_CALLBACK tlsext_cb(SSL *s, int client_server, int type, | 170 | void tlsext_cb(SSL *s, int client_server, int type, |
171 | unsigned char *data, int len, | 171 | unsigned char *data, int len, |
172 | void *arg); | 172 | void *arg); |
173 | #endif | 173 | #endif |
174 | 174 | ||
175 | int MS_CALLBACK generate_cookie_callback(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len); | 175 | int generate_cookie_callback(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len); |
176 | int MS_CALLBACK verify_cookie_callback(SSL *ssl, unsigned char *cookie, unsigned int cookie_len); | 176 | int verify_cookie_callback(SSL *ssl, unsigned char *cookie, unsigned int cookie_len); |
diff --git a/src/lib/libssl/src/apps/s_cb.c b/src/lib/libssl/src/apps/s_cb.c index 84c3b447c2..4e9b733543 100644 --- a/src/lib/libssl/src/apps/s_cb.c +++ b/src/lib/libssl/src/apps/s_cb.c | |||
@@ -130,7 +130,7 @@ int verify_return_error=0; | |||
130 | unsigned char cookie_secret[COOKIE_SECRET_LENGTH]; | 130 | unsigned char cookie_secret[COOKIE_SECRET_LENGTH]; |
131 | int cookie_initialized=0; | 131 | int cookie_initialized=0; |
132 | 132 | ||
133 | int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx) | 133 | int verify_callback(int ok, X509_STORE_CTX *ctx) |
134 | { | 134 | { |
135 | X509 *err_cert; | 135 | X509 *err_cert; |
136 | int err,depth; | 136 | int err,depth; |
@@ -278,7 +278,7 @@ int set_cert_key_stuff(SSL_CTX *ctx, X509 *cert, EVP_PKEY *key) | |||
278 | return 1; | 278 | return 1; |
279 | } | 279 | } |
280 | 280 | ||
281 | long MS_CALLBACK bio_dump_callback(BIO *bio, int cmd, const char *argp, | 281 | long bio_dump_callback(BIO *bio, int cmd, const char *argp, |
282 | int argi, long argl, long ret) | 282 | int argi, long argl, long ret) |
283 | { | 283 | { |
284 | BIO *out; | 284 | BIO *out; |
@@ -302,7 +302,7 @@ long MS_CALLBACK bio_dump_callback(BIO *bio, int cmd, const char *argp, | |||
302 | return(ret); | 302 | return(ret); |
303 | } | 303 | } |
304 | 304 | ||
305 | void MS_CALLBACK apps_ssl_info_callback(const SSL *s, int where, int ret) | 305 | void apps_ssl_info_callback(const SSL *s, int where, int ret) |
306 | { | 306 | { |
307 | const char *str; | 307 | const char *str; |
308 | int w; | 308 | int w; |
@@ -339,7 +339,7 @@ void MS_CALLBACK apps_ssl_info_callback(const SSL *s, int where, int ret) | |||
339 | } | 339 | } |
340 | 340 | ||
341 | 341 | ||
342 | void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg) | 342 | void msg_cb(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg) |
343 | { | 343 | { |
344 | BIO *bio = arg; | 344 | BIO *bio = arg; |
345 | const char *str_write_p, *str_version, *str_content_type = "", *str_details1 = "", *str_details2= ""; | 345 | const char *str_write_p, *str_version, *str_content_type = "", *str_details1 = "", *str_details2= ""; |
@@ -655,7 +655,7 @@ void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void * | |||
655 | (void)BIO_flush(bio); | 655 | (void)BIO_flush(bio); |
656 | } | 656 | } |
657 | 657 | ||
658 | void MS_CALLBACK tlsext_cb(SSL *s, int client_server, int type, | 658 | void tlsext_cb(SSL *s, int client_server, int type, |
659 | unsigned char *data, int len, | 659 | unsigned char *data, int len, |
660 | void *arg) | 660 | void *arg) |
661 | { | 661 | { |
@@ -760,7 +760,7 @@ void MS_CALLBACK tlsext_cb(SSL *s, int client_server, int type, | |||
760 | (void)BIO_flush(bio); | 760 | (void)BIO_flush(bio); |
761 | } | 761 | } |
762 | 762 | ||
763 | int MS_CALLBACK generate_cookie_callback(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len) | 763 | int generate_cookie_callback(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len) |
764 | { | 764 | { |
765 | unsigned char *buffer, result[EVP_MAX_MD_SIZE]; | 765 | unsigned char *buffer, result[EVP_MAX_MD_SIZE]; |
766 | unsigned int length, resultlength; | 766 | unsigned int length, resultlength; |
@@ -848,7 +848,7 @@ int MS_CALLBACK generate_cookie_callback(SSL *ssl, unsigned char *cookie, unsign | |||
848 | return 1; | 848 | return 1; |
849 | } | 849 | } |
850 | 850 | ||
851 | int MS_CALLBACK verify_cookie_callback(SSL *ssl, unsigned char *cookie, unsigned int cookie_len) | 851 | int verify_cookie_callback(SSL *ssl, unsigned char *cookie, unsigned int cookie_len) |
852 | { | 852 | { |
853 | unsigned char *buffer, result[EVP_MAX_MD_SIZE]; | 853 | unsigned char *buffer, result[EVP_MAX_MD_SIZE]; |
854 | unsigned int length, resultlength; | 854 | unsigned int length, resultlength; |
diff --git a/src/lib/libssl/src/apps/s_client.c b/src/lib/libssl/src/apps/s_client.c index eb8b8eef67..7559dfc113 100644 --- a/src/lib/libssl/src/apps/s_client.c +++ b/src/lib/libssl/src/apps/s_client.c | |||
@@ -386,7 +386,7 @@ typedef struct tlsextctx_st { | |||
386 | } tlsextctx; | 386 | } tlsextctx; |
387 | 387 | ||
388 | 388 | ||
389 | static int MS_CALLBACK ssl_servername_cb(SSL *s, int *ad, void *arg) | 389 | static int ssl_servername_cb(SSL *s, int *ad, void *arg) |
390 | { | 390 | { |
391 | tlsextctx * p = (tlsextctx *) arg; | 391 | tlsextctx * p = (tlsextctx *) arg; |
392 | const char * hn= SSL_get_servername(s, TLSEXT_NAMETYPE_host_name); | 392 | const char * hn= SSL_get_servername(s, TLSEXT_NAMETYPE_host_name); |
@@ -456,7 +456,7 @@ static int srp_Verify_N_and_g(BIGNUM *N, BIGNUM *g) | |||
456 | primality tests are rather cpu consuming. | 456 | primality tests are rather cpu consuming. |
457 | */ | 457 | */ |
458 | 458 | ||
459 | static int MS_CALLBACK ssl_srp_verify_param_cb(SSL *s, void *arg) | 459 | static int ssl_srp_verify_param_cb(SSL *s, void *arg) |
460 | { | 460 | { |
461 | SRP_ARG *srp_arg = (SRP_ARG *)arg; | 461 | SRP_ARG *srp_arg = (SRP_ARG *)arg; |
462 | BIGNUM *N = NULL, *g = NULL; | 462 | BIGNUM *N = NULL, *g = NULL; |
@@ -491,7 +491,7 @@ static int MS_CALLBACK ssl_srp_verify_param_cb(SSL *s, void *arg) | |||
491 | 491 | ||
492 | #define PWD_STRLEN 1024 | 492 | #define PWD_STRLEN 1024 |
493 | 493 | ||
494 | static char * MS_CALLBACK ssl_give_srp_client_pwd_cb(SSL *s, void *arg) | 494 | static char * ssl_give_srp_client_pwd_cb(SSL *s, void *arg) |
495 | { | 495 | { |
496 | SRP_ARG *srp_arg = (SRP_ARG *)arg; | 496 | SRP_ARG *srp_arg = (SRP_ARG *)arg; |
497 | char *pass = (char *)OPENSSL_malloc(PWD_STRLEN+1); | 497 | char *pass = (char *)OPENSSL_malloc(PWD_STRLEN+1); |
diff --git a/src/lib/libssl/src/apps/s_server.c b/src/lib/libssl/src/apps/s_server.c index 8198d7f065..a36b1a3ad6 100644 --- a/src/lib/libssl/src/apps/s_server.c +++ b/src/lib/libssl/src/apps/s_server.c | |||
@@ -202,7 +202,7 @@ typedef unsigned int u_int; | |||
202 | #endif | 202 | #endif |
203 | 203 | ||
204 | #ifndef OPENSSL_NO_RSA | 204 | #ifndef OPENSSL_NO_RSA |
205 | static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int is_export, int keylength); | 205 | static RSA *tmp_rsa_cb(SSL *s, int is_export, int keylength); |
206 | #endif | 206 | #endif |
207 | static int sv_body(char *hostname, int s, unsigned char *context); | 207 | static int sv_body(char *hostname, int s, unsigned char *context); |
208 | static int www_body(char *hostname, int s, unsigned char *context); | 208 | static int www_body(char *hostname, int s, unsigned char *context); |
@@ -392,7 +392,7 @@ typedef struct srpsrvparm_st | |||
392 | (which would normally occur after a worker has finished) and we | 392 | (which would normally occur after a worker has finished) and we |
393 | set the user parameters. | 393 | set the user parameters. |
394 | */ | 394 | */ |
395 | static int MS_CALLBACK ssl_srp_server_param_cb(SSL *s, int *ad, void *arg) | 395 | static int ssl_srp_server_param_cb(SSL *s, int *ad, void *arg) |
396 | { | 396 | { |
397 | srpsrvparm *p = (srpsrvparm *)arg; | 397 | srpsrvparm *p = (srpsrvparm *)arg; |
398 | if (p->login == NULL && p->user == NULL ) | 398 | if (p->login == NULL && p->user == NULL ) |
@@ -727,7 +727,7 @@ typedef struct tlsextctx_st { | |||
727 | } tlsextctx; | 727 | } tlsextctx; |
728 | 728 | ||
729 | 729 | ||
730 | static int MS_CALLBACK ssl_servername_cb(SSL *s, int *ad, void *arg) | 730 | static int ssl_servername_cb(SSL *s, int *ad, void *arg) |
731 | { | 731 | { |
732 | tlsextctx * p = (tlsextctx *) arg; | 732 | tlsextctx * p = (tlsextctx *) arg; |
733 | const char * servername = SSL_get_servername(s, TLSEXT_NAMETYPE_host_name); | 733 | const char * servername = SSL_get_servername(s, TLSEXT_NAMETYPE_host_name); |
@@ -2386,7 +2386,7 @@ static int init_ssl_connection(SSL *con) | |||
2386 | const char *str; | 2386 | const char *str; |
2387 | X509 *peer; | 2387 | X509 *peer; |
2388 | long verify_error; | 2388 | long verify_error; |
2389 | MS_STATIC char buf[BUFSIZ]; | 2389 | char buf[BUFSIZ]; |
2390 | #ifndef OPENSSL_NO_KRB5 | 2390 | #ifndef OPENSSL_NO_KRB5 |
2391 | char *client_princ; | 2391 | char *client_princ; |
2392 | #endif | 2392 | #endif |
@@ -2956,7 +2956,7 @@ err: | |||
2956 | } | 2956 | } |
2957 | 2957 | ||
2958 | #ifndef OPENSSL_NO_RSA | 2958 | #ifndef OPENSSL_NO_RSA |
2959 | static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int is_export, int keylength) | 2959 | static RSA *tmp_rsa_cb(SSL *s, int is_export, int keylength) |
2960 | { | 2960 | { |
2961 | BIGNUM *bn = NULL; | 2961 | BIGNUM *bn = NULL; |
2962 | static RSA *rsa_tmp=NULL; | 2962 | static RSA *rsa_tmp=NULL; |
diff --git a/src/lib/libssl/src/apps/s_time.c b/src/lib/libssl/src/apps/s_time.c index b823c33c58..6d78afefd2 100644 --- a/src/lib/libssl/src/apps/s_time.c +++ b/src/lib/libssl/src/apps/s_time.c | |||
@@ -340,7 +340,7 @@ int MAIN(int argc, char **argv) | |||
340 | SSL *scon=NULL; | 340 | SSL *scon=NULL; |
341 | long finishtime=0; | 341 | long finishtime=0; |
342 | int ret=1,i; | 342 | int ret=1,i; |
343 | MS_STATIC char buf[1024*8]; | 343 | char buf[1024*8]; |
344 | int ver; | 344 | int ver; |
345 | 345 | ||
346 | apps_startup(); | 346 | apps_startup(); |
diff --git a/src/lib/libssl/src/apps/ts.c b/src/lib/libssl/src/apps/ts.c index 5fa9f7fda0..e066a497ca 100644 --- a/src/lib/libssl/src/apps/ts.c +++ b/src/lib/libssl/src/apps/ts.c | |||
@@ -103,7 +103,7 @@ static TS_RESP *read_PKCS7(BIO *in_bio); | |||
103 | static TS_RESP *create_response(CONF *conf, const char *section, char *engine, | 103 | static TS_RESP *create_response(CONF *conf, const char *section, char *engine, |
104 | char *queryfile, char *passin, char *inkey, | 104 | char *queryfile, char *passin, char *inkey, |
105 | char *signer, char *chain, const char *policy); | 105 | char *signer, char *chain, const char *policy); |
106 | static ASN1_INTEGER * MS_CALLBACK serial_cb(TS_RESP_CTX *ctx, void *data); | 106 | static ASN1_INTEGER * serial_cb(TS_RESP_CTX *ctx, void *data); |
107 | static ASN1_INTEGER *next_serial(const char *serialfile); | 107 | static ASN1_INTEGER *next_serial(const char *serialfile); |
108 | static int save_ts_serial(const char *serialfile, ASN1_INTEGER *serial); | 108 | static int save_ts_serial(const char *serialfile, ASN1_INTEGER *serial); |
109 | 109 | ||
@@ -116,7 +116,7 @@ static TS_VERIFY_CTX *create_verify_ctx(char *data, char *digest, | |||
116 | char *ca_path, char *ca_file, | 116 | char *ca_path, char *ca_file, |
117 | char *untrusted); | 117 | char *untrusted); |
118 | static X509_STORE *create_cert_store(char *ca_path, char *ca_file); | 118 | static X509_STORE *create_cert_store(char *ca_path, char *ca_file); |
119 | static int MS_CALLBACK verify_cb(int ok, X509_STORE_CTX *ctx); | 119 | static int verify_cb(int ok, X509_STORE_CTX *ctx); |
120 | 120 | ||
121 | /* Main function definition. */ | 121 | /* Main function definition. */ |
122 | int MAIN(int, char **); | 122 | int MAIN(int, char **); |
@@ -875,7 +875,7 @@ static TS_RESP *create_response(CONF *conf, const char *section, char *engine, | |||
875 | return response; | 875 | return response; |
876 | } | 876 | } |
877 | 877 | ||
878 | static ASN1_INTEGER * MS_CALLBACK serial_cb(TS_RESP_CTX *ctx, void *data) | 878 | static ASN1_INTEGER * serial_cb(TS_RESP_CTX *ctx, void *data) |
879 | { | 879 | { |
880 | const char *serial_file = (const char *) data; | 880 | const char *serial_file = (const char *) data; |
881 | ASN1_INTEGER *serial = next_serial(serial_file); | 881 | ASN1_INTEGER *serial = next_serial(serial_file); |
@@ -1127,7 +1127,7 @@ static X509_STORE *create_cert_store(char *ca_path, char *ca_file) | |||
1127 | return NULL; | 1127 | return NULL; |
1128 | } | 1128 | } |
1129 | 1129 | ||
1130 | static int MS_CALLBACK verify_cb(int ok, X509_STORE_CTX *ctx) | 1130 | static int verify_cb(int ok, X509_STORE_CTX *ctx) |
1131 | { | 1131 | { |
1132 | /* | 1132 | /* |
1133 | char buf[256]; | 1133 | char buf[256]; |
diff --git a/src/lib/libssl/src/apps/verify.c b/src/lib/libssl/src/apps/verify.c index 893670ff41..ea1a2e6fd9 100644 --- a/src/lib/libssl/src/apps/verify.c +++ b/src/lib/libssl/src/apps/verify.c | |||
@@ -69,7 +69,7 @@ | |||
69 | #undef PROG | 69 | #undef PROG |
70 | #define PROG verify_main | 70 | #define PROG verify_main |
71 | 71 | ||
72 | static int MS_CALLBACK cb(int ok, X509_STORE_CTX *ctx); | 72 | static int cb(int ok, X509_STORE_CTX *ctx); |
73 | static int check(X509_STORE *ctx, char *file, | 73 | static int check(X509_STORE *ctx, char *file, |
74 | STACK_OF(X509) *uchain, STACK_OF(X509) *tchain, | 74 | STACK_OF(X509) *uchain, STACK_OF(X509) *tchain, |
75 | STACK_OF(X509_CRL) *crls, ENGINE *e); | 75 | STACK_OF(X509_CRL) *crls, ENGINE *e); |
@@ -308,7 +308,7 @@ end: | |||
308 | return(ret); | 308 | return(ret); |
309 | } | 309 | } |
310 | 310 | ||
311 | static int MS_CALLBACK cb(int ok, X509_STORE_CTX *ctx) | 311 | static int cb(int ok, X509_STORE_CTX *ctx) |
312 | { | 312 | { |
313 | int cert_error = X509_STORE_CTX_get_error(ctx); | 313 | int cert_error = X509_STORE_CTX_get_error(ctx); |
314 | X509 *current_cert = X509_STORE_CTX_get_current_cert(ctx); | 314 | X509 *current_cert = X509_STORE_CTX_get_current_cert(ctx); |
diff --git a/src/lib/libssl/src/apps/x509.c b/src/lib/libssl/src/apps/x509.c index 3863ab968d..0cee89eea1 100644 --- a/src/lib/libssl/src/apps/x509.c +++ b/src/lib/libssl/src/apps/x509.c | |||
@@ -153,7 +153,7 @@ static const char *x509_usage[]={ | |||
153 | NULL | 153 | NULL |
154 | }; | 154 | }; |
155 | 155 | ||
156 | static int MS_CALLBACK callb(int ok, X509_STORE_CTX *ctx); | 156 | static int callb(int ok, X509_STORE_CTX *ctx); |
157 | static int sign (X509 *x, EVP_PKEY *pkey,int days,int clrext, const EVP_MD *digest, | 157 | static int sign (X509 *x, EVP_PKEY *pkey,int days,int clrext, const EVP_MD *digest, |
158 | CONF *conf, char *section); | 158 | CONF *conf, char *section); |
159 | static int x509_certify (X509_STORE *ctx,char *CAfile,const EVP_MD *digest, | 159 | static int x509_certify (X509_STORE *ctx,char *CAfile,const EVP_MD *digest, |
@@ -1219,7 +1219,7 @@ end: | |||
1219 | return ret; | 1219 | return ret; |
1220 | } | 1220 | } |
1221 | 1221 | ||
1222 | static int MS_CALLBACK callb(int ok, X509_STORE_CTX *ctx) | 1222 | static int callb(int ok, X509_STORE_CTX *ctx) |
1223 | { | 1223 | { |
1224 | int err; | 1224 | int err; |
1225 | X509 *err_cert; | 1225 | X509 *err_cert; |
diff --git a/src/lib/libssl/src/demos/selfsign.c b/src/lib/libssl/src/demos/selfsign.c index 68904c611e..f306d8d8a4 100644 --- a/src/lib/libssl/src/demos/selfsign.c +++ b/src/lib/libssl/src/demos/selfsign.c | |||
@@ -42,15 +42,7 @@ int main() | |||
42 | return(0); | 42 | return(0); |
43 | } | 43 | } |
44 | 44 | ||
45 | #ifdef WIN16 | 45 | static void callback(p, n, arg) |
46 | # define MS_CALLBACK _far _loadds | ||
47 | # define MS_FAR _far | ||
48 | #else | ||
49 | # define MS_CALLBACK | ||
50 | # define MS_FAR | ||
51 | #endif | ||
52 | |||
53 | static void MS_CALLBACK callback(p, n, arg) | ||
54 | int p; | 46 | int p; |
55 | int n; | 47 | int n; |
56 | void *arg; | 48 | void *arg; |
diff --git a/src/lib/libssl/src/ssl/s3_lib.c b/src/lib/libssl/src/ssl/s3_lib.c index c4ef2738d7..6b2739161d 100644 --- a/src/lib/libssl/src/ssl/s3_lib.c +++ b/src/lib/libssl/src/ssl/s3_lib.c | |||
@@ -3082,7 +3082,7 @@ void ssl3_clear(SSL *s) | |||
3082 | } | 3082 | } |
3083 | 3083 | ||
3084 | #ifndef OPENSSL_NO_SRP | 3084 | #ifndef OPENSSL_NO_SRP |
3085 | static char * MS_CALLBACK srp_password_from_info_cb(SSL *s, void *arg) | 3085 | static char * srp_password_from_info_cb(SSL *s, void *arg) |
3086 | { | 3086 | { |
3087 | return BUF_strdup(s->srp_ctx.info) ; | 3087 | return BUF_strdup(s->srp_ctx.info) ; |
3088 | } | 3088 | } |
diff --git a/src/lib/libssl/src/ssl/ssl_task.c b/src/lib/libssl/src/ssl/ssl_task.c index b5ce44b47c..416fb16743 100644 --- a/src/lib/libssl/src/ssl/ssl_task.c +++ b/src/lib/libssl/src/ssl/ssl_task.c | |||
@@ -131,7 +131,7 @@ int LIB$INIT_TIMER(), LIB$SHOW_TIMER(); | |||
131 | #include <openssl/ssl.h> | 131 | #include <openssl/ssl.h> |
132 | #include <openssl/err.h> | 132 | #include <openssl/err.h> |
133 | 133 | ||
134 | int MS_CALLBACK verify_callback(int ok, X509 *xs, X509 *xi, int depth, | 134 | int verify_callback(int ok, X509 *xs, X509 *xi, int depth, |
135 | int error); | 135 | int error); |
136 | BIO *bio_err=NULL; | 136 | BIO *bio_err=NULL; |
137 | BIO *bio_stdout=NULL; | 137 | BIO *bio_stdout=NULL; |
diff --git a/src/lib/libssl/src/ssl/ssltest.c b/src/lib/libssl/src/ssl/ssltest.c index 4f80be8ee4..8a602cc551 100644 --- a/src/lib/libssl/src/ssl/ssltest.c +++ b/src/lib/libssl/src/ssl/ssltest.c | |||
@@ -217,12 +217,12 @@ | |||
217 | #define COMP_RLE 255 | 217 | #define COMP_RLE 255 |
218 | #define COMP_ZLIB 1 | 218 | #define COMP_ZLIB 1 |
219 | 219 | ||
220 | static int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx); | 220 | static int verify_callback(int ok, X509_STORE_CTX *ctx); |
221 | #ifndef OPENSSL_NO_RSA | 221 | #ifndef OPENSSL_NO_RSA |
222 | static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int is_export,int keylength); | 222 | static RSA *tmp_rsa_cb(SSL *s, int is_export,int keylength); |
223 | static void free_tmp_rsa(void); | 223 | static void free_tmp_rsa(void); |
224 | #endif | 224 | #endif |
225 | static int MS_CALLBACK app_verify_callback(X509_STORE_CTX *ctx, void *arg); | 225 | static int app_verify_callback(X509_STORE_CTX *ctx, void *arg); |
226 | #define APP_CALLBACK_STRING "Test Callback Argument" | 226 | #define APP_CALLBACK_STRING "Test Callback Argument" |
227 | struct app_verify_arg | 227 | struct app_verify_arg |
228 | { | 228 | { |
@@ -260,7 +260,7 @@ typedef struct srp_client_arg_st | |||
260 | 260 | ||
261 | #define PWD_STRLEN 1024 | 261 | #define PWD_STRLEN 1024 |
262 | 262 | ||
263 | static char * MS_CALLBACK ssl_give_srp_client_pwd_cb(SSL *s, void *arg) | 263 | static char * ssl_give_srp_client_pwd_cb(SSL *s, void *arg) |
264 | { | 264 | { |
265 | SRP_CLIENT_ARG *srp_client_arg = (SRP_CLIENT_ARG *)arg; | 265 | SRP_CLIENT_ARG *srp_client_arg = (SRP_CLIENT_ARG *)arg; |
266 | return BUF_strdup((char *)srp_client_arg->srppassin); | 266 | return BUF_strdup((char *)srp_client_arg->srppassin); |
@@ -274,7 +274,7 @@ typedef struct srp_server_arg_st | |||
274 | char *pass; | 274 | char *pass; |
275 | } SRP_SERVER_ARG; | 275 | } SRP_SERVER_ARG; |
276 | 276 | ||
277 | static int MS_CALLBACK ssl_srp_server_param_cb(SSL *s, int *ad, void *arg) | 277 | static int ssl_srp_server_param_cb(SSL *s, int *ad, void *arg) |
278 | { | 278 | { |
279 | SRP_SERVER_ARG * p = (SRP_SERVER_ARG *) arg; | 279 | SRP_SERVER_ARG * p = (SRP_SERVER_ARG *) arg; |
280 | 280 | ||
@@ -1230,7 +1230,7 @@ int doit_biopair(SSL *s_ssl, SSL *c_ssl, long count, | |||
1230 | { | 1230 | { |
1231 | /* CLIENT */ | 1231 | /* CLIENT */ |
1232 | 1232 | ||
1233 | MS_STATIC char cbuf[1024*8]; | 1233 | char cbuf[1024*8]; |
1234 | int i, r; | 1234 | int i, r; |
1235 | clock_t c_clock = clock(); | 1235 | clock_t c_clock = clock(); |
1236 | 1236 | ||
@@ -1316,7 +1316,7 @@ int doit_biopair(SSL *s_ssl, SSL *c_ssl, long count, | |||
1316 | { | 1316 | { |
1317 | /* SERVER */ | 1317 | /* SERVER */ |
1318 | 1318 | ||
1319 | MS_STATIC char sbuf[1024*8]; | 1319 | char sbuf[1024*8]; |
1320 | int i, r; | 1320 | int i, r; |
1321 | clock_t s_clock = clock(); | 1321 | clock_t s_clock = clock(); |
1322 | 1322 | ||
@@ -1550,7 +1550,7 @@ end: | |||
1550 | 1550 | ||
1551 | int doit(SSL *s_ssl, SSL *c_ssl, long count) | 1551 | int doit(SSL *s_ssl, SSL *c_ssl, long count) |
1552 | { | 1552 | { |
1553 | MS_STATIC char cbuf[1024*8],sbuf[1024*8]; | 1553 | char cbuf[1024*8],sbuf[1024*8]; |
1554 | long cw_num=count,cr_num=count; | 1554 | long cw_num=count,cr_num=count; |
1555 | long sw_num=count,sr_num=count; | 1555 | long sw_num=count,sr_num=count; |
1556 | int ret=1; | 1556 | int ret=1; |
@@ -1858,7 +1858,7 @@ static int get_proxy_auth_ex_data_idx(void) | |||
1858 | return idx; | 1858 | return idx; |
1859 | } | 1859 | } |
1860 | 1860 | ||
1861 | static int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx) | 1861 | static int verify_callback(int ok, X509_STORE_CTX *ctx) |
1862 | { | 1862 | { |
1863 | char *s,buf[256]; | 1863 | char *s,buf[256]; |
1864 | 1864 | ||
@@ -2232,7 +2232,7 @@ static int process_proxy_cond(unsigned int letters[26], | |||
2232 | return process_proxy_cond_adders(letters, cond, cond_end, &pos, 1); | 2232 | return process_proxy_cond_adders(letters, cond, cond_end, &pos, 1); |
2233 | } | 2233 | } |
2234 | 2234 | ||
2235 | static int MS_CALLBACK app_verify_callback(X509_STORE_CTX *ctx, void *arg) | 2235 | static int app_verify_callback(X509_STORE_CTX *ctx, void *arg) |
2236 | { | 2236 | { |
2237 | int ok=1; | 2237 | int ok=1; |
2238 | struct app_verify_arg *cb_arg = arg; | 2238 | struct app_verify_arg *cb_arg = arg; |
@@ -2326,7 +2326,7 @@ static int MS_CALLBACK app_verify_callback(X509_STORE_CTX *ctx, void *arg) | |||
2326 | #ifndef OPENSSL_NO_RSA | 2326 | #ifndef OPENSSL_NO_RSA |
2327 | static RSA *rsa_tmp=NULL; | 2327 | static RSA *rsa_tmp=NULL; |
2328 | 2328 | ||
2329 | static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int is_export, int keylength) | 2329 | static RSA *tmp_rsa_cb(SSL *s, int is_export, int keylength) |
2330 | { | 2330 | { |
2331 | BIGNUM *bn = NULL; | 2331 | BIGNUM *bn = NULL; |
2332 | if (rsa_tmp == NULL) | 2332 | if (rsa_tmp == NULL) |