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.
#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)
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();
int PEM_write_PKCS7();
int PEM_write_DHparams();
int PEM_write_DSAparams();
+int PEM_write_NETSCAPE_CERT_SEQUENCE();
#endif
X509 *PEM_read_bio_X509();
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();
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 */
#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
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,
#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;
{
#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
#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);
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();
#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;
{
#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);
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();
*/
#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);
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();
#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;
{
*/
#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);
#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();
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);
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;
#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;
{
#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;
{
#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;
{
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
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";
$RSAref="RSAref32";
$o='\\';
-$cp='"copy /b nul+ "'; # Timestamps get stuffed otherwise
+$cp='copy nul+'; # Timestamps get stuffed otherwise
$rm='del';
# C compiler stuff