diff options
author | Dr. Stephen Henson <steve@openssl.org> | 1999-01-31 17:30:18 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 1999-01-31 17:30:18 +0000 |
commit | 9b3086fe382e7b0f53b8634d0e75f1a659ab2653 (patch) | |
tree | 462330501c21d687e5389fed2b76ab350db16ffa | |
parent | d433f9014edac49202f34ba464534eafd4bf6701 (diff) |
Fix various stuff: that VC++ 5.0 chokes on:
1. Add *lots* of missing prototypes for static ssl functions.
2. VC++ doesn't understand the 'LL' suffix for 64 bits constants: change bn.org
3. Add a few missing prototypes in pem.org
Fix mk1mf.pl so it outputs a Makefile that doesn't choke Win95.
Fix mkdef.pl so it doesn't truncate longer names.
-rw-r--r-- | crypto/bn/bn.org | 5 | ||||
-rw-r--r-- | crypto/pem/pem.org | 4 | ||||
-rw-r--r-- | ssl/s23_clnt.c | 2 | ||||
-rw-r--r-- | ssl/s23_lib.c | 2 | ||||
-rw-r--r-- | ssl/s23_meth.c | 6 | ||||
-rw-r--r-- | ssl/s23_srvr.c | 2 | ||||
-rw-r--r-- | ssl/s2_clnt.c | 2 | ||||
-rw-r--r-- | ssl/s2_meth.c | 6 | ||||
-rw-r--r-- | ssl/s2_srvr.c | 2 | ||||
-rw-r--r-- | ssl/s3_clnt.c | 2 | ||||
-rw-r--r-- | ssl/s3_meth.c | 6 | ||||
-rw-r--r-- | ssl/s3_srvr.c | 2 | ||||
-rw-r--r-- | ssl/ssl.h | 2 | ||||
-rw-r--r-- | ssl/ssl_lib.c | 4 | ||||
-rw-r--r-- | ssl/t1_clnt.c | 6 | ||||
-rw-r--r-- | ssl/t1_meth.c | 6 | ||||
-rw-r--r-- | ssl/t1_srvr.c | 6 | ||||
-rwxr-xr-x | util/mkdef.pl | 6 | ||||
-rw-r--r-- | util/pl/VC-32.pl | 2 |
19 files changed, 67 insertions, 6 deletions
diff --git a/crypto/bn/bn.org b/crypto/bn/bn.org index d8904d7efa..2de26c2f91 100644 --- a/crypto/bn/bn.org +++ b/crypto/bn/bn.org @@ -169,7 +169,12 @@ extern "C" { #define BN_BYTES 4 #define BN_BITS2 32 #define BN_BITS4 16 +#ifdef WIN32 +/* VC++ doesn't like the LL suffix */ +#define BN_MASK (0xffffffffffffffffL) +#else #define BN_MASK (0xffffffffffffffffLL) +#endif #define BN_MASK2 (0xffffffffL) #define BN_MASK2l (0xffff) #define BN_MASK2h1 (0xffff8000L) diff --git a/crypto/pem/pem.org b/crypto/pem/pem.org index 3d78699ffd..f1baa2024d 100644 --- a/crypto/pem/pem.org +++ b/crypto/pem/pem.org @@ -501,6 +501,7 @@ EVP_PKEY *PEM_read_PrivateKey(); PKCS7 *PEM_read_PKCS7(); DH *PEM_read_DHparams(); DSA *PEM_read_DSAparams(); +NETSCAPE_CERT_SEQUENCE *PEM_read_NETSCAPE_CERT_SEQUENCE(); int PEM_write_X509(); int PEM_write_X509_REQ(); int PEM_write_X509_CRL(); @@ -511,6 +512,7 @@ int PEM_write_PrivateKey(); int PEM_write_PKCS7(); int PEM_write_DHparams(); int PEM_write_DSAparams(); +int PEM_write_NETSCAPE_CERT_SEQUENCE(); #endif X509 *PEM_read_bio_X509(); @@ -523,6 +525,7 @@ EVP_PKEY *PEM_read_bio_PrivateKey(); PKCS7 *PEM_read_bio_PKCS7(); DH *PEM_read_bio_DHparams(); DSA *PEM_read_bio_DSAparams(); +NETSCAPE_CERT_SEQUENCE *PEM_read_bio_NETSCAPE_CERT_SEQUENCE(); int PEM_write_bio_X509(); int PEM_write_bio_X509_REQ(); int PEM_write_bio_X509_CRL(); @@ -533,6 +536,7 @@ int PEM_write_bio_PrivateKey(); int PEM_write_bio_PKCS7(); int PEM_write_bio_DHparams(); int PEM_write_bio_DSAparams(); +int PEM_write_bio_NETSCAPE_CERT_SEQUENCE(); #endif /* SSLEAY_MACROS */ diff --git a/ssl/s23_clnt.c b/ssl/s23_clnt.c index 597cc8772e..b607f623e4 100644 --- a/ssl/s23_clnt.c +++ b/ssl/s23_clnt.c @@ -66,9 +66,11 @@ #define BREAK break #ifndef NOPROTO +static SSL_METHOD *ssl23_get_client_method(int ver); static int ssl23_client_hello(SSL *s); static int ssl23_get_server_hello(SSL *s); #else +static SSL_METHOD *ssl23_get_client_method(); static int ssl23_client_hello(); static int ssl23_get_server_hello(); #endif diff --git a/ssl/s23_lib.c b/ssl/s23_lib.c index 9222bf86fb..24b884ff4c 100644 --- a/ssl/s23_lib.c +++ b/ssl/s23_lib.c @@ -88,7 +88,7 @@ static SSL_METHOD SSLv23_data= { ssl_undefined_function, ssl_undefined_function, ssl23_read, - (int (*)())ssl_undefined_function, + (int (*)(struct ssl_st *, char *, int))ssl_undefined_function, ssl23_write, ssl_undefined_function, ssl_undefined_function, diff --git a/ssl/s23_meth.c b/ssl/s23_meth.c index 1eed7a54bc..bbda4ff182 100644 --- a/ssl/s23_meth.c +++ b/ssl/s23_meth.c @@ -60,6 +60,12 @@ #include "objects.h" #include "ssl_locl.h" +#ifndef NOPROTO +static SSL_METHOD *ssl23_get_method(int ver); +#else +static SSL_METHOD *ssl23_get_method(); +#endif + static SSL_METHOD *ssl23_get_method(ver) int ver; { diff --git a/ssl/s23_srvr.c b/ssl/s23_srvr.c index 888ffaca06..5dd9253f9f 100644 --- a/ssl/s23_srvr.c +++ b/ssl/s23_srvr.c @@ -66,8 +66,10 @@ #define BREAK break #ifndef NOPROTO +static SSL_METHOD *ssl23_get_server_method(int ver); int ssl23_get_client_hello(SSL *s); #else +static SSL_METHOD *ssl23_get_server_method(); int ssl23_get_client_hello(); #endif diff --git a/ssl/s2_clnt.c b/ssl/s2_clnt.c index 2170e29289..91fea92e6b 100644 --- a/ssl/s2_clnt.c +++ b/ssl/s2_clnt.c @@ -64,6 +64,7 @@ #include "evp.h" #ifndef NOPROTO +static SSL_METHOD *ssl2_get_client_method(int ver); static int get_server_finished(SSL *s); static int get_server_verify(SSL *s); static int get_server_hello(SSL *s); @@ -74,6 +75,7 @@ static int client_certificate(SSL *s); static int ssl_rsa_public_encrypt(CERT *c, int len, unsigned char *from, unsigned char *to,int padding); #else +static SSL_METHOD *ssl2_get_client_method(); static int get_server_finished(); static int get_server_verify(); static int get_server_hello(); diff --git a/ssl/s2_meth.c b/ssl/s2_meth.c index cfc8828cc7..f28c9162cf 100644 --- a/ssl/s2_meth.c +++ b/ssl/s2_meth.c @@ -60,6 +60,12 @@ #include "objects.h" #include "ssl_locl.h" +#ifndef NOPROTO +static SSL_METHOD *ssl2_get_method(int ver); +#else +static SSL_METHOD *ssl2_get_method(); +#endif + static SSL_METHOD *ssl2_get_method(ver) int ver; { diff --git a/ssl/s2_srvr.c b/ssl/s2_srvr.c index 5ad8b12263..3477d43853 100644 --- a/ssl/s2_srvr.c +++ b/ssl/s2_srvr.c @@ -64,6 +64,7 @@ #include "evp.h" #ifndef NOPROTO +static SSL_METHOD *ssl2_get_server_method(int ver); static int get_client_master_key(SSL *s); static int get_client_hello(SSL *s); static int server_hello(SSL *s); @@ -74,6 +75,7 @@ static int request_certificate(SSL *s); static int ssl_rsa_private_decrypt(CERT *c, int len, unsigned char *from, unsigned char *to,int padding); #else +static SSL_METHOD *ssl2_get_server_method(); static int get_client_master_key(); static int get_client_hello(); static int server_hello(); diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index d4ff1d99c8..88f33d5162 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -74,6 +74,7 @@ SSLerr(SSL_F_SSL3_GET_SERVER_HELLO,SSL_R_SSL3_SESSION_ID_TOO_SHORT); */ #ifndef NOPROTO +static SSL_METHOD *ssl3_get_client_method(int ver); static int ssl3_client_hello(SSL *s); static int ssl3_get_server_hello(SSL *s); static int ssl3_get_certificate_request(SSL *s); @@ -86,6 +87,7 @@ static int ssl3_get_key_exchange(SSL *s); static int ssl3_get_server_certificate(SSL *s); static int ssl3_check_cert_and_algorithm(SSL *s); #else +static SSL_METHOD *ssl3_get_client_method(); static int ssl3_client_hello(); static int ssl3_get_server_hello(); static int ssl3_get_certificate_request(); diff --git a/ssl/s3_meth.c b/ssl/s3_meth.c index 3d66b4643a..387b352370 100644 --- a/ssl/s3_meth.c +++ b/ssl/s3_meth.c @@ -60,6 +60,12 @@ #include "objects.h" #include "ssl_locl.h" +#ifndef NOPROTO +static SSL_METHOD *ssl3_get_method(int ver); +#else +static SSL_METHOD *ssl3_get_method(); +#endif + static SSL_METHOD *ssl3_get_method(ver) int ver; { diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index 09041b2fd9..9bb4560e32 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -75,6 +75,7 @@ */ #ifndef NOPROTO +static SSL_METHOD *ssl3_get_server_method(int ver); static int ssl3_get_client_hello(SSL *s); static int ssl3_send_server_hello(SSL *s); static int ssl3_send_server_key_exchange(SSL *s); @@ -87,6 +88,7 @@ static int ssl3_send_hello_request(SSL *s); #else +static SSL_METHOD *ssl3_get_server_method(); static int ssl3_get_client_hello(); static int ssl3_send_server_hello(); static int ssl3_send_server_key_exchange(); @@ -844,7 +844,7 @@ STACK * SSL_get_peer_cert_chain(SSL *s); int SSL_CTX_get_verify_mode(SSL_CTX *ctx); int (*SSL_CTX_get_verify_callback(SSL_CTX *ctx))(); -void SSL_CTX_set_verify(SSL_CTX *ctx,int mode,int (*callback)()); +void SSL_CTX_set_verify(SSL_CTX *ctx,int mode,int (*callback)(int, X509_STORE_CTX *)); void SSL_CTX_set_cert_verify_cb(SSL_CTX *ctx, int (*cb)(),char *arg); int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa); int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, unsigned char *d, long len); diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 2bc0e3f2b2..c9a2285199 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1043,7 +1043,11 @@ char *arg; void SSL_CTX_set_verify(ctx,mode,cb) SSL_CTX *ctx; int mode; +#ifndef NOPROTO +int (*cb)(int, X509_STORE_CTX *); +#else int (*cb)(); +#endif { ctx->default_verify_mode=mode; ctx->default_verify_callback=cb; diff --git a/ssl/t1_clnt.c b/ssl/t1_clnt.c index 986d2436e2..1a179221e7 100644 --- a/ssl/t1_clnt.c +++ b/ssl/t1_clnt.c @@ -63,6 +63,12 @@ #include "evp.h" #include "ssl_locl.h" +#ifndef NOPROTO +static SSL_METHOD *tls1_get_client_method(int ver); +#else +static SSL_METHOD *tls1_get_client_method(); +#endif + static SSL_METHOD *tls1_get_client_method(ver) int ver; { diff --git a/ssl/t1_meth.c b/ssl/t1_meth.c index 512c2078e7..d64b5f4e67 100644 --- a/ssl/t1_meth.c +++ b/ssl/t1_meth.c @@ -60,6 +60,12 @@ #include "objects.h" #include "ssl_locl.h" +#ifndef NOPROTO +static SSL_METHOD *tls1_get_method(int ver); +#else +static SSL_METHOD *tls1_get_method(); +#endif + static SSL_METHOD *tls1_get_method(ver) int ver; { diff --git a/ssl/t1_srvr.c b/ssl/t1_srvr.c index 8cf0addcd9..8b18572fb0 100644 --- a/ssl/t1_srvr.c +++ b/ssl/t1_srvr.c @@ -64,6 +64,12 @@ #include "x509.h" #include "ssl_locl.h" +#ifndef NOPROTO +static SSL_METHOD *tls1_get_server_method(int ver); +#else +static SSL_METHOD *tls1_get_server_method(); +#endif + static SSL_METHOD *tls1_get_server_method(ver) int ver; { diff --git a/util/mkdef.pl b/util/mkdef.pl index a62e3eef82..5b2f355bb4 100755 --- a/util/mkdef.pl +++ b/util/mkdef.pl @@ -231,12 +231,12 @@ sub print_def_file print OUT <<"EOF"; ; -; Definition file for the DDL version of the $name library from SSLeay +; Definition file for the DLL version of the $name library from OpenSSL ; LIBRARY $name -DESCRIPTION 'SSLeay $name - eay\@cryptsoft.com' +DESCRIPTION 'OpenSSL $name - http://www.openssl.org/' EOF @@ -270,7 +270,7 @@ EOF else { $n=$nums{$func}; - printf OUT " %s%-35s@%d\n",($NT)?"":"_",$func,$n; + printf OUT " %s%-40s@%d\n",($NT)?"":"_",$func,$n; } } printf OUT "\n"; diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl index 9167abfce5..c0d57937a8 100644 --- a/util/pl/VC-32.pl +++ b/util/pl/VC-32.pl @@ -7,7 +7,7 @@ $crypto="libeay32"; $RSAref="RSAref32"; $o='\\'; -$cp='"copy /b nul+ "'; # Timestamps get stuffed otherwise +$cp='copy nul+'; # Timestamps get stuffed otherwise $rm='del'; # C compiler stuff |