under Win32 (9X and NT) again. Note: some signed/unsigned changes recently
checked in were killing the Win32 compile.
13 files changed:
Changes between 0.9.1c and 0.9.2
Changes between 0.9.1c and 0.9.2
+ *) Get the Win32 compile working again. Modify mkdef.pl so it can handle
+ functions that return function pointers and has support for NT specific
+ stuff. Fix mk1mf.pl and VC-32.pl to support NT differences also. Various
+ #ifdef WIN32 and WINNTs sprinkled about the place and some changes from
+ unsigned to signed types: this was killing the Win32 compile.
+ [Steve Henson]
+
*) Add new certificate file to stack functions, SSL_add_cert_file_to_stack()
and SSL_add_cert_dir_to_stack(). These largely supplant
SSL_load_client_CA_file(), and can be used to add multiple certs easily to
*) Add new certificate file to stack functions, SSL_add_cert_file_to_stack()
and SSL_add_cert_dir_to_stack(). These largely supplant
SSL_load_client_CA_file(), and can be used to add multiple certs easily to
this is tested on Win32 but it may also work in Win 3.1 with some modification.
See the end of this file for Eric's original comments.
this is tested on Win32 but it may also work in Win 3.1 with some modification.
See the end of this file for Eric's original comments.
+Note: the default Win32 environment is to leave out any Windows NT specific
+features: (currently only BIO_s_log()) if you want NT specific features see
+the "Tweaks" section later.
+
You will need perl for Win32 (which can be got from various sources) and Visual
C++.
You will need perl for Win32 (which can be got from various sources) and Visual
C++.
have the MASM assembler 'ml' then you can try the assembly language code. To
do this remove the 'no-asm' part from do_ms.bat.
have the MASM assembler 'ml' then you can try the assembly language code. To
do this remove the 'no-asm' part from do_ms.bat.
+If you want to enable the NT specific features of OpenSSL (currently only
+the logging BIO) follow the instructions above but call the batch file
+do_nt.bat instead of do_ms.bat. If you do this then you will no longer be able
+to run the OpenSSL binaries under Windows 95 or 98.
+
You can also build a static version of the library using the Makefile ms\nt.mak
--------------------------------------------------------------------------------
You can also build a static version of the library using the Makefile ms\nt.mak
--------------------------------------------------------------------------------
+#if !defined(WIN32) || defined(WINNT)
+
#include <stdio.h>
#include <errno.h>
#include <stdio.h>
#include <errno.h>
{
BIO_OK_CTX *ctx;
EVP_MD_CTX *md;
{
BIO_OK_CTX *ctx;
EVP_MD_CTX *md;
unsigned char tmp[EVP_MAX_MD_SIZE];
ctx=(BIO_OK_CTX *)b->ptr;
unsigned char tmp[EVP_MAX_MD_SIZE];
ctx=(BIO_OK_CTX *)b->ptr;
if ((sk != NULL) && (sk_num(sk) != 0))
{
unsigned char md_dat[EVP_MAX_MD_SIZE];
if ((sk != NULL) && (sk_num(sk) != 0))
{
unsigned char md_dat[EVP_MAX_MD_SIZE];
ASN1_OCTET_STRING *message_digest;
EVP_DigestFinal(&mdc_tmp,md_dat,&md_len);
ASN1_OCTET_STRING *message_digest;
EVP_DigestFinal(&mdc_tmp,md_dat,&md_len);
int PKCS7_content_new();
int PKCS7_dataVerify();
BIO *PKCS7_dataInit();
int PKCS7_content_new();
int PKCS7_dataVerify();
BIO *PKCS7_dataInit();
+int PKCS7_dataFinal();
+BIO *PKCS7_dataDecode();
PKCS7_SIGNER_INFO *PKCS7_add_signature();
X509 *PKCS7_cert_from_signer_info();
STACK *PKCS7_get_signer_info();
PKCS7_SIGNER_INFO *PKCS7_add_signature();
X509 *PKCS7_cert_from_signer_info();
STACK *PKCS7_get_signer_info();
--- /dev/null
+\r
+perl util\mkfiles.pl >MINFO\r
+perl util\mk1mf.pl VC-NT no-asm >ms\nt.mak\r
+perl util\mk1mf.pl VC-NT dll no-asm >ms\ntdll.mak\r
+\r
+perl util\mkdef.pl NT libeay > ms\libeay32.def\r
+perl util\mkdef.pl NT ssleay > ms\ssleay32.def\r
#include <stdio.h>
#include <sys/types.h>
#include <stdio.h>
#include <sys/types.h>
#include "objects.h"
#include "bio.h"
#include "pem.h"
#include "objects.h"
#include "bio.h"
#include "pem.h"
in=BIO_new(BIO_s_file_internal());
in=BIO_new(BIO_s_file_internal());
- if (ret == NULL || in == NULL)
{
SSLerr(SSL_F_SSL_ADD_CERT_FILE_TO_STACK,ERR_R_MALLOC_FAILURE);
goto err;
{
SSLerr(SSL_F_SSL_ADD_CERT_FILE_TO_STACK,ERR_R_MALLOC_FAILURE);
goto err;
* certs may have been added to \c stack.
*/
* certs may have been added to \c stack.
*/
int SSL_add_cert_dir_to_stack(STACK *stack,const char *dir)
{
DIR *d=opendir(dir);
int SSL_add_cert_dir_to_stack(STACK *stack,const char *dir)
{
DIR *d=opendir(dir);
str_dup 1240
i2s_ASN1_ENUMERATED 1241
i2s_ASN1_ENUMERATED_TABLE 1242
str_dup 1240
i2s_ASN1_ENUMERATED 1241
i2s_ASN1_ENUMERATED_TABLE 1242
+BIO_s_log 1243
+BIO_f_reliable 1244
+PKCS7_dataFinal 1245
+PKCS7_dataDecode 1246
$INSTALLTOP="/usr/local/ssl";
$INSTALLTOP="/usr/local/ssl";
- "VC-WIN32", "Microsoft Visual C++ 4.[01] - Windows NT [34].x",
+ "VC-WIN32", "Microsoft Visual C++ [4-6] - Windows NT or 9X",
+ "VC-NT", "Microsoft Visual C++ [4-6] - Windows NT ONLY",
"VC-W31-16", "Microsoft Visual C++ 1.52 - Windows 3.1 - 286",
"VC-WIN16", "Alias for VC-W31-32",
"VC-W31-32", "Microsoft Visual C++ 1.52 - Windows 3.1 - 386+",
"VC-W31-16", "Microsoft Visual C++ 1.52 - Windows 3.1 - 286",
"VC-WIN16", "Alias for VC-W31-32",
"VC-W31-32", "Microsoft Visual C++ 1.52 - Windows 3.1 - 386+",
# $bin_dir.=$o causes a core dump on my sparc :-(
# $bin_dir.=$o causes a core dump on my sparc :-(
push(@INC,"util/pl","pl");
if ($platform eq "VC-MSDOS")
{
push(@INC,"util/pl","pl");
if ($platform eq "VC-MSDOS")
{
}
elsif (($platform eq "VC-WIN32") || ($platform eq "VC-NT"))
{
}
elsif (($platform eq "VC-WIN32") || ($platform eq "VC-NT"))
{
+ $NT = 1 if $platform eq "VC-NT";
require 'VC-32.pl';
}
elsif ($platform eq "BC-NT")
require 'VC-32.pl';
}
elsif ($platform eq "BC-NT")
$crypto_num="util/libeay.num";
$ssl_num= "util/ssleay.num";
$crypto_num="util/libeay.num";
$ssl_num= "util/ssleay.num";
- $NT=1 if $_ eq "32";
- $NT=0 if $_ eq "16";
+ $W32=1 if $_ eq "32";
+ $W32=0 if $_ eq "16";
+ if($_ eq "NT") {
+ $W32 = 1;
+ $NT = 1;
+ }
$do_ssl=1 if $_ eq "ssleay";
$do_ssl=1 if $_ eq "ssl";
$do_crypto=1 if $_ eq "libeay";
$do_ssl=1 if $_ eq "ssleay";
$do_ssl=1 if $_ eq "ssl";
$do_crypto=1 if $_ eq "libeay";
$tag{$t}= -$tag{$t};
next;
}
$tag{$t}= -$tag{$t};
next;
}
-#printf STDERR "$_\n%2d %2d %2d %2d %2d $NT\n",
+#printf STDERR "$_\n%2d %2d %2d %2d %2d $W32\n",
#$tag{'NOPROTO'},$tag{'FreeBSD'},$tag{'WIN16'},$tag{'PERL5'},$tag{'NO_FP_API'};
$t=undef;
#$tag{'NOPROTO'},$tag{'FreeBSD'},$tag{'WIN16'},$tag{'PERL5'},$tag{'NO_FP_API'};
$t=undef;
{ $t=&do_extern($name,$_); }
elsif ( ($tag{'NOPROTO'} == 1) &&
($tag{'FreeBSD'} != 1) &&
{ $t=&do_extern($name,$_); }
elsif ( ($tag{'NOPROTO'} == 1) &&
($tag{'FreeBSD'} != 1) &&
- (($NT && ($tag{'WIN16'} != 1)) ||
- (!$NT && ($tag{'WIN16'} != -1))) &&
+ (($W32 && ($tag{'WIN16'} != 1)) ||
+ (!$W32 && ($tag{'WIN16'} != -1))) &&
($tag{'PERL5'} != 1) &&
# ($tag{'_WINDLL'} != -1) &&
($tag{'PERL5'} != 1) &&
# ($tag{'_WINDLL'} != -1) &&
- ((!$NT && $tag{'_WINDLL'} != -1) ||
- ($NT && $tag{'_WINDLL'} != 1)) &&
- ((($tag{'NO_FP_API'} != 1) && $NT) ||
- (($tag{'NO_FP_API'} != -1) && !$NT)))
+ ((!$W32 && $tag{'_WINDLL'} != -1) ||
+ ($W32 && $tag{'_WINDLL'} != 1)) &&
+ ((($tag{'NO_FP_API'} != 1) && $W32) ||
+ (($tag{'NO_FP_API'} != -1) && !$W32)))
{ $t=&do_line($name,$_); }
else
{ $t=undef; }
{ $t=&do_line($name,$_); }
else
{ $t=undef; }
{ return($1); }
elsif (/(SSL_get_info_callback)/)
{ return($1); }
{ return($1); }
elsif (/(SSL_get_info_callback)/)
{ return($1); }
- elsif ((!$NT) && /(ERR_load_CRYPTO_strings)/)
+ elsif ((!$W32) && /(ERR_load_CRYPTO_strings)/)
{ return("ERR_load_CRYPTOlib_strings"); }
{ return("ERR_load_CRYPTOlib_strings"); }
- elsif (!$NT && /BIO_s_file/)
+ elsif (!$W32 && /BIO_s_file/)
+ { return(undef); }
+ elsif (!$W32 && /BIO_new_file/)
+ { return(undef); }
+ elsif (!$W32 && /BIO_new_fp/)
- elsif (!$NT && /BIO_new_file/)
+ elsif ($W32 && /BIO_s_file_internal/)
- elsif (!$NT && /BIO_new_fp/)
+ elsif ($W32 && /BIO_new_file_internal/)
- elsif ($NT && /BIO_s_file_internal/)
+ elsif ($W32 && /BIO_new_fp_internal/)
- elsif ($NT && /BIO_new_file_internal/)
+ elsif (/SSL_add_cert_dir_to_stack/)
- elsif ($NT && /BIO_new_fp_internal/)
+ elsif (!$NT && /BIO_s_log/)
{ return(undef); }
else
{
/\s\**(\S+)\s*\(/;
{ return(undef); }
else
{
/\s\**(\S+)\s*\(/;
+ $_ = $1;
+ tr/()*//d;
+#print STDERR "$1 : $_\n";
+ return($_);
local(*OUT,$name,*nums,@functions)=@_;
local($n)=1;
local(*OUT,$name,*nums,@functions)=@_;
local($n)=1;
{ $name.="32"; }
else
{ $name.="16"; }
{ $name.="32"; }
else
{ $name.="16"; }
{
print <<"EOF";
CODE PRELOAD MOVEABLE
{
print <<"EOF";
CODE PRELOAD MOVEABLE
- printf OUT " %s%-40s@%d\n",($NT)?"":"_",$func,$n;
+ printf OUT " %s%-40s@%d\n",($W32)?"":"_",$func,$n;
$lflags.=" /debug";
$mlflags.=' /debug';
}
$lflags.=" /debug";
$mlflags.=' /debug';
}
+$cflags .= " -DWINNT" if $NT == 1;
$obj='.obj';
$ofile="/Fo";
$obj='.obj';
$ofile="/Fo";
SSL_want 182
SSL_library_init 183
SSL_COMP_add_compression_method 184
SSL_want 182
SSL_library_init 183
SSL_COMP_add_compression_method 184
+SSL_add_cert_file_to_stack 185
+SSL_set_tmp_rsa_callback 186
+SSL_set_tmp_dh_callback 187